fix(retrievers): Use unique key to prevent Sonarr/Radarr collision
All checks were successful
All checks were successful
When Sonarr and Radarr had the same instance ID (e.g., 'i3omb'), the Radarr retriever would overwrite the Sonarr retriever in the Map. This caused webhook refreshes to show '0 instance(s)' for Sonarr. Now uses ':' as the unique key so both can coexist.
This commit is contained in:
@@ -51,8 +51,9 @@ const arrRetrieverRegistry = {
|
||||
}
|
||||
|
||||
const retriever = new RetrieverClass(config);
|
||||
this.retrievers.set(config.id, retriever);
|
||||
logToFile(`[ArrRetrieverRegistry] Created ${config.type} retriever: ${config.name} (${config.id})`);
|
||||
const uniqueKey = `${config.type}:${config.id}`;
|
||||
this.retrievers.set(uniqueKey, retriever);
|
||||
logToFile(`[ArrRetrieverRegistry] Created ${config.type} retriever: ${config.name} (${uniqueKey})`);
|
||||
} catch (error) {
|
||||
logToFile(`[ArrRetrieverRegistry] Failed to create retriever ${config.id}: ${error.message}`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user