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)
|
new ObjectId(ctx.params.comicObjectId)
|
||||||
);
|
);
|
||||||
// 2. Init AirDC++
|
// 2. Init AirDC++
|
||||||
const ADCPPSocket = new AirDCPPSocket(config);
|
|
||||||
await ADCPPSocket.connect();
|
|
||||||
// 3. Get the bundles for the comic object
|
// 3. Get the bundles for the comic object
|
||||||
|
const ADCPPSocket = new AirDCPPSocket(config);
|
||||||
if (comicObject) {
|
if (comicObject) {
|
||||||
// make the call to get the bundles from AirDC++ using the bundleId
|
// make the call to get the bundles from AirDC++ using the bundleId
|
||||||
const bundles =
|
return comicObject.acquisition.directconnect.downloads.map(
|
||||||
comicObject.acquisition.directconnect.downloads.map(
|
async (bundle) =>
|
||||||
async (bundle) => {
|
await ADCPPSocket.get(
|
||||||
return await ADCPPSocket.get(
|
`queue/bundles/${bundle.id}`
|
||||||
`queue/bundles/${bundle.bundleId}`
|
)
|
||||||
);
|
);
|
||||||
}
|
|
||||||
);
|
|
||||||
return Promise.all(bundles);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
throw new Errors.MoleculerError(
|
throw new Errors.MoleculerError(
|
||||||
"Couldn't fetch bundles from AirDC++",
|
"Couldn't fetch bundles from AirDC++",
|
||||||
|
|||||||
Reference in New Issue
Block a user