fix startup MediaStreamExtractor error handling
This commit is contained in:
parent
e866bb3be5
commit
7c01ad88b2
|
@ -218,7 +218,7 @@ class Command(BaseCommand):
|
||||||
youtube_id = missing["youtube_id"]
|
youtube_id = missing["youtube_id"]
|
||||||
media_path = os.path.join(videos, media_url)
|
media_path = os.path.join(videos, media_url)
|
||||||
if not os.path.exists(media_path):
|
if not os.path.exists(media_path):
|
||||||
self.stdout.errors(f" file not found: {media_path}")
|
self.stdout.write(f" file not found: {media_path}")
|
||||||
continue
|
continue
|
||||||
|
|
||||||
media = MediaStreamExtractor(media_path)
|
media = MediaStreamExtractor(media_path)
|
||||||
|
@ -255,13 +255,13 @@ class Command(BaseCommand):
|
||||||
self.stdout.write(
|
self.stdout.write(
|
||||||
" no videos needed updating in ta_download"
|
" no videos needed updating in ta_download"
|
||||||
)
|
)
|
||||||
|
return
|
||||||
|
|
||||||
self.stdout.write(
|
self.stdout.write(
|
||||||
self.style.SUCCESS(
|
self.style.SUCCESS(
|
||||||
f" ✓ {updated} videos updated in ta_download"
|
f" ✓ {updated} videos updated in ta_download"
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
return
|
|
||||||
|
|
||||||
message = " 🗙 ta_download auto_start update failed"
|
message = " 🗙 ta_download auto_start update failed"
|
||||||
self.stdout.write(self.style.ERROR(message))
|
self.stdout.write(self.style.ERROR(message))
|
||||||
|
|
Loading…
Reference in New Issue