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;