diff --git a/backend/appsettings/src/manual.py b/backend/appsettings/src/manual.py index 007922ee..08e5b8e3 100644 --- a/backend/appsettings/src/manual.py +++ b/backend/appsettings/src/manual.py @@ -407,8 +407,11 @@ class ManualImport: media_path=self.current_video["media"], ) if not video.json_data: - print(f"{video_id}: manual import failed, and no metadata found.") - raise ValueError + message = ( + f"{video_id}: manual import failed, and no metadata found." + ) + print(message) + raise ValueError(message) video.check_subtitles(subtitle_files=self.current_video["subtitle"]) video.upload_to_es() diff --git a/backend/channel/src/index.py b/backend/channel/src/index.py index 2745bbf5..bc3b6853 100644 --- a/backend/channel/src/index.py +++ b/backend/channel/src/index.py @@ -42,6 +42,10 @@ class YoutubeChannel(YouTubeItem): if not self.youtube_meta and fallback: self._video_fallback(fallback) else: + if not self.json_data: + message = f"{self.youtube_id}: Failed to get metadata" + raise ValueError(message) + self.process_youtube_meta() self.get_channel_art() diff --git a/backend/requirements-dev.txt b/backend/requirements-dev.txt index a5037149..bd641c5c 100644 --- a/backend/requirements-dev.txt +++ b/backend/requirements-dev.txt @@ -1,6 +1,6 @@ -r requirements.txt ipython==8.31.0 -pre-commit==4.0.1 +pre-commit==4.1.0 pylint-django==2.6.1 pylint==3.3.3 pytest-django==4.9.0