fix startup MediaStreamExtractor error handling

This commit is contained in:
simon 2023-04-29 18:37:54 +07:00
parent e866bb3be5
commit 7c01ad88b2
No known key found for this signature in database
GPG Key ID: 2C15AA5E89985DD4
1 changed files with 2 additions and 2 deletions

View File

@ -218,7 +218,7 @@ class Command(BaseCommand):
youtube_id = missing["youtube_id"]
media_path = os.path.join(videos, media_url)
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
media = MediaStreamExtractor(media_path)
@ -255,13 +255,13 @@ class Command(BaseCommand):
self.stdout.write(
" no videos needed updating in ta_download"
)
return
self.stdout.write(
self.style.SUCCESS(
f"{updated} videos updated in ta_download"
)
)
return
message = " 🗙 ta_download auto_start update failed"
self.stdout.write(self.style.ERROR(message))