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:
@@ -354,7 +354,9 @@ def delete_unused_media(playlist_data, media_dir):
|
|||||||
rel_path = os.path.relpath(full_path, media_dir)
|
rel_path = os.path.relpath(full_path, media_dir)
|
||||||
|
|
||||||
# Skip if file is in current playlist
|
# 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
|
continue
|
||||||
|
|
||||||
# Delete unreferenced file
|
# Delete unreferenced file
|
||||||
|
|||||||
Reference in New Issue
Block a user