From 17b10edbbc264182e0fb7709c6a7692b705cc754 Mon Sep 17 00:00:00 2001 From: Jarian Cottingham Date: Wed, 25 Feb 2026 00:33:07 -0600 Subject: [PATCH] Fix show name extraction to remove leading semicolons - Add regex to strip leading semicolons/colons from show folder name - This fixes filenames like ';Demon Slayer S05E01-03' -> 'Demon Slayer S05E01-03' --- main.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main.js b/main.js index ff0af5f..3e6c51f 100644 --- a/main.js +++ b/main.js @@ -296,7 +296,9 @@ ipcMain.handle('begin-mapping', async (event, { directory, files, tvdbId }) => { // Extract clean show name (without tvdbid bracket if present) // Matches [tvdbid-XXXXX] or [tvdbid-series-XXXXX] formats - const showName = showFolderName.replace(/\s*\[tvdbid-[^\]]+\]/, '').trim(); + // Also removes leading semicolons or other problematic characters + let showName = showFolderName.replace(/\s*\[tvdbid-[^\]]+\]/, '').trim(); + showName = showName.replace(/^[;:]+/, '').trim(); // Rename each file first (using original paths) let successCount = 0;