From 7c01ad88b2ec134e25c984e2ee4f7771c0d238d1 Mon Sep 17 00:00:00 2001 From: simon Date: Sat, 29 Apr 2023 18:37:54 +0700 Subject: [PATCH] fix startup MediaStreamExtractor error handling --- tubearchivist/config/management/commands/ta_startup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tubearchivist/config/management/commands/ta_startup.py b/tubearchivist/config/management/commands/ta_startup.py index e204bf2..a1c4adf 100644 --- a/tubearchivist/config/management/commands/ta_startup.py +++ b/tubearchivist/config/management/commands/ta_startup.py @@ -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))