1 Commits

Author SHA1 Message Date
0f47750bc2 Merge branch 'master' into automated-download-loop 2024-10-23 14:27:44 -04:00
2 changed files with 1197 additions and 856 deletions

2033
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

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