mirror of
https://github.com/meeb/tubesync.git
synced 2025-06-22 21:16:38 +00:00
Download again for missing media files
This commit is contained in:
parent
13bbeef5bf
commit
844b4b0493
@ -453,7 +453,13 @@ def download_media(media_id):
|
||||
log.warn(f'Download task triggered for media: {media} (UUID: {media.pk}) but '
|
||||
f'it is now marked to be skipped, not downloading')
|
||||
return
|
||||
if media.downloaded and media.media_file and media.media_file.name:
|
||||
downloaded_file_exists = (
|
||||
media.media_file and
|
||||
media.media_file.path and
|
||||
media.filepath.samefile(media.media_file.path) and
|
||||
media.filepath.exists()
|
||||
)
|
||||
if media.downloaded and downloaded_file_exists:
|
||||
# Media has been marked as downloaded before the download_media task was fired,
|
||||
# skip it
|
||||
log.warn(f'Download task triggered for media: {media} (UUID: {media.pk}) but '
|
||||
|
Loading…
Reference in New Issue
Block a user