diff --git a/backend/novasonic-server.js b/backend/novasonic-server.js index b415e8f..177bc65 100644 --- a/backend/novasonic-server.js +++ b/backend/novasonic-server.js @@ -119,7 +119,12 @@ function _findFileByStem(dir, titleStem, depth = 0) { // Match: exact, or "Artist - Title" ending with our title stem if (bareStem === normTitle || bareStem.endsWith(' - ' + normTitle) || - bareStem.endsWith(normTitle)) { + bareStem.endsWith(normTitle) || + // Release-suffix desync: Navidrome's title-derived stem ("… - recognize") + // may lack the "- Single"/"- EP" suffix the on-disk filename still carries + // ("… - recognize - single"), or vice-versa. Match on the structured prefix. + bareStem.startsWith(normTitle + ' - ') || + normTitle.startsWith(bareStem + ' - ')) { return path.join(dir, entry.name); } }