From c8abbef31a8625dd252d83770f6ae83ea0f0826c Mon Sep 17 00:00:00 2001 From: Harshith Mohan Date: Fri, 31 May 2024 12:56:21 +0530 Subject: [PATCH] Handle FileHashed and FileDetected events (#927) --- src/core/signalr/eventHandlers.ts | 2 ++ src/core/signalr/signalr.ts | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/core/signalr/eventHandlers.ts b/src/core/signalr/eventHandlers.ts index f133123d1..ac8095af3 100644 --- a/src/core/signalr/eventHandlers.ts +++ b/src/core/signalr/eventHandlers.ts @@ -42,6 +42,8 @@ const invalidateSeries = debounce( export const handleEvent = (event: string, data?: SeriesUpdateEventType) => { switch (event) { case 'FileDeleted': + case 'FileDetected': + case 'FileHashed': case 'FileMatched': invalidateDashboard(); invalidateFiles(); diff --git a/src/core/signalr/signalr.ts b/src/core/signalr/signalr.ts index af8d4be84..612d9829f 100644 --- a/src/core/signalr/signalr.ts +++ b/src/core/signalr/signalr.ts @@ -151,6 +151,8 @@ async (action: UnknownAction) => { connectionEvents.on('AVDump:Event', onAvDumpEvent(dispatch)); connectionEvents.on('ShokoEvent:FileDeleted', () => handleEvent('FileDeleted')); + connectionEvents.on('ShokoEvent:FileDetected', () => handleEvent('FileDetected')); + connectionEvents.on('ShokoEvent:FileHashed', () => handleEvent('FileHashed')); connectionEvents.on('ShokoEvent:FileMatched', () => handleEvent('FileMatched')); connectionEvents.on('ShokoEvent:FileMoved', () => handleEvent('FileMoved')); connectionEvents.on('ShokoEvent:FileRenamed', () => handleEvent('FileRenamed'));