Fix 3 bugs: delete_unused_media path mismatch, media not downloading on same-version, video EOS not advancing

- delete_unused_media: normalize Windows backslashes to forward slashes
  when comparing with playlist file_name (fixes file deleted after download)
- update_playlist_if_needed: download media even when playlist version matches
- _on_video_eos: now schedules next_media() — was an empty stub
This commit is contained in:
ske087
2026-07-24 16:10:23 +03:00
parent a2add88f04
commit 5a030671a2
+3 -1
View File
@@ -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