diff --git a/src/get_playlists_v2.py b/src/get_playlists_v2.py index 8e039c9..c773b46 100644 --- a/src/get_playlists_v2.py +++ b/src/get_playlists_v2.py @@ -354,7 +354,9 @@ def delete_unused_media(playlist_data, media_dir): rel_path = os.path.relpath(full_path, media_dir) # Skip if file is in current playlist - if rel_path in referenced_files: + # Normalize paths to handle Windows backslashes vs server forward slashes + normalized_rel = rel_path.replace('\\', '/') + if normalized_rel in referenced_files or rel_path in referenced_files: continue # Delete unreferenced file