Compare commits
23 Commits
automated-
...
ux-refinem
| Author | SHA1 | Date | |
|---|---|---|---|
| 1dad0cfd7e | |||
| 1d48499c64 | |||
| c9ecbb911a | |||
| 30168844f3 | |||
| 2e60e2e3d5 | |||
| 8254ec2093 | |||
| 7381d03045 | |||
| 2247411ac8 | |||
| e61ecb1143 | |||
| e01421f17b | |||
| cc271021e0 | |||
| cc772504ae | |||
| 8dcb17a6a0 | |||
| a06896ffcc | |||
| 03f6623ed0 | |||
| 66f9d63b44 | |||
| a936df3144 | |||
| dc9dabca48 | |||
| 4680fd0875 | |||
| 323548c0ff | |||
| f4563c12c6 | |||
| 1b0cada848 | |||
| 750a74cd9f |
2235
package-lock.json
generated
2235
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -792,19 +792,21 @@ export default class ImportService 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++",
|
||||
|
||||
@@ -127,9 +127,10 @@ export default class SocketService extends Service {
|
||||
await ADCPPSocket.addListener(
|
||||
`search`,
|
||||
`search_result_added`,
|
||||
(groupedResult) => {
|
||||
console.log(JSON.stringify(groupedResult, null, 4));
|
||||
namespacedInstance.emit("searchResultAdded", groupedResult);
|
||||
(groupedResult, entityId: number) => {
|
||||
namespacedInstance.emit("searchResultAdded", {
|
||||
groupedResult: { entityId, payload: groupedResult?.result },
|
||||
});
|
||||
},
|
||||
instance.id
|
||||
);
|
||||
@@ -137,8 +138,10 @@ export default class SocketService extends Service {
|
||||
await ADCPPSocket.addListener(
|
||||
`search`,
|
||||
`search_result_updated`,
|
||||
(updatedResult) => {
|
||||
namespacedInstance.emit("searchResultUpdated", updatedResult);
|
||||
(updatedResult, entityId: number) => {
|
||||
namespacedInstance.emit("searchResultUpdated", {
|
||||
updatedResult: { entityId, payload: updatedResult?.result },
|
||||
});
|
||||
},
|
||||
instance.id
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user