From c26ef012c15b0388c2874ba04f196cb74fbb8cdb Mon Sep 17 00:00:00 2001 From: simon Date: Thu, 11 Aug 2022 11:10:58 +0700 Subject: [PATCH] raise ValueError when not matching media files --- tubearchivist/home/src/index/filesystem.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tubearchivist/home/src/index/filesystem.py b/tubearchivist/home/src/index/filesystem.py index 13a0ae5a..38d790b8 100644 --- a/tubearchivist/home/src/index/filesystem.py +++ b/tubearchivist/home/src/index/filesystem.py @@ -250,6 +250,10 @@ class ImportFolderScanner: def process_videos(self): """loop through all videos""" for current_video in self.to_import: + if not current_video["media"]: + print(f"{current_video}: no matching media file found.") + raise ValueError + self._detect_youtube_id(current_video) self._dump_thumb(current_video) self._convert_thumb(current_video)