Autodownload loop #4

Merged
rishighan merged 14 commits from autodownload-loop into main 2025-02-17 20:42:22 +00:00
Showing only changes of commit e0954eb3e8 - Show all commits

View File

@@ -122,10 +122,10 @@ export default class ComicProcessorService extends Service {
await this.broker.call("socket.search", { await this.broker.call("socket.search", {
query: dcppSearchQuery, query: dcppSearchQuery,
config: { config: {
hostname: "192.168.1.119:5600", hostname: "localhost:5600",
protocol: "http", protocol: "http",
username: "admin", username: "user",
password: "password", password: "pass",
}, },
namespace: "/automated", namespace: "/automated",
}); });
@@ -247,21 +247,19 @@ export default class ComicProcessorService extends Service {
}); });
// Handle searchResultAdded event // Handle searchResultAdded event
this.socketIOInstance.on( this.socketIOInstance.on("searchResultAdded", ({ result }: SearchResult) => {
"searchResultAdded", console.log(result);
({ groupedResult, instanceId }: SearchResultPayload) => { this.logger.info(
this.logger.info( "AirDC++ Search result added:",
"Received search result added:", JSON.stringify(result, null, 4),
JSON.stringify(groupedResult, null, 4), );
); // if (!this.airDCPPSearchResults.has(instanceId)) {
if (!this.airDCPPSearchResults.has(instanceId)) { // this.airDCPPSearchResults.set(instanceId, []);
this.airDCPPSearchResults.set(instanceId, []); // }
} // if (!isUndefined(groupedResult?.result)) {
if (!isUndefined(groupedResult?.result)) { // this.airDCPPSearchResults.get(instanceId).push(groupedResult.result);
this.airDCPPSearchResults.get(instanceId).push(groupedResult.result); // }
} });
},
);
// Handle searchResultUpdated event // Handle searchResultUpdated event
this.socketIOInstance.on( this.socketIOInstance.on(