Compare commits
1 Commits
getbundles
...
automated-
| Author | SHA1 | Date | |
|---|---|---|---|
| 0f47750bc2 |
2033
package-lock.json
generated
2033
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -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++",
|
||||
|
||||
Reference in New Issue
Block a user