Skip to content

Commit a65fe61

Browse files
committed
fix: allow mixed/unknown CollectionType libraries in path matching
The previous type-match guard required an exact CollectionType match (movies or tvshows), which silently dropped notifications for libraries with a null/undefined CollectionType and for "mixed"-type libraries (a common setup for separate Anime / Anime Movies libraries). Now only explicit cross-type mismatches are rejected (movie in a tvshows library, episode in a movies library), consistent with the existing isTypeMatch logic in api/jellyfin.js.
1 parent 5d36a6a commit a65fe61

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

jellyfinWebhook.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -827,8 +827,12 @@ export async function handleJellyfinWebhook(req, res, client, pendingRequests, o
827827
const libTypeLower = lib.CollectionType?.toLowerCase();
828828

829829
let typeMatch = true;
830-
if (itemTypeLower === "movie" && libTypeLower !== "movies") typeMatch = false;
831-
if ((itemTypeLower === "series" || itemTypeLower === "season" || itemTypeLower === "episode") && libTypeLower !== "tvshows") typeMatch = false;
830+
if (libTypeLower) {
831+
// Only reject known cross-type mismatches; allow "mixed" and any
832+
// unrecognised CollectionType (e.g. custom anime libraries) through.
833+
if (itemTypeLower === "movie" && libTypeLower === "tvshows") typeMatch = false;
834+
if ((itemTypeLower === "series" || itemTypeLower === "season" || itemTypeLower === "episode") && libTypeLower === "movies") typeMatch = false;
835+
}
832836

833837
if (typeMatch) {
834838
libraryId = lib.ItemId;

0 commit comments

Comments
 (0)