4 Commits

Author SHA1 Message Date
30168844f3 Merge branch 'master' into getbundles-fix 2024-10-24 10:47:31 -04:00
2e60e2e3d5 Added package-lock.json 2024-10-24 10:45:19 -04:00
8254ec2093 ⌫ package.json deleted 2024-10-24 10:41:59 -04:00
7381d03045 🔧 Fixed getBundles endpoint 2024-10-23 23:14:21 -04:00
2 changed files with 878 additions and 1219 deletions

2077
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -768,19 +768,21 @@ export default class LibraryService extends Service {
new ObjectId(ctx.params.comicObjectId)
);
// 2. Init AirDC++
// 3. Get the bundles for the comic object
const ADCPPSocket = new AirDCPPSocket(config);
await ADCPPSocket.connect();
// 3. Get the bundles for the comic object
if (comicObject) {
// make the call to get the bundles from AirDC++ using the bundleId
return comicObject.acquisition.directconnect.downloads.map(
async (bundle) =>
await ADCPPSocket.get(
`queue/bundles/${bundle.id}`
)
);
const bundles =
comicObject.acquisition.directconnect.downloads.map(
async (bundle) => {
return await ADCPPSocket.get(
`queue/bundles/${bundle.bundleId}`
);
}
);
return Promise.all(bundles);
}
return false;
} catch (error) {
throw new Errors.MoleculerError(
"Couldn't fetch bundles from AirDC++",