From 75cd9d382de8db8cc1cb760c84f740de13ba3fe4 Mon Sep 17 00:00:00 2001 From: simon Date: Tue, 22 Mar 2022 12:59:39 +0700 Subject: [PATCH] fix duration builder on reindex by ignoring vtt files --- tubearchivist/home/src/index/video.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tubearchivist/home/src/index/video.py b/tubearchivist/home/src/index/video.py index 9968cc7..cbeb69b 100644 --- a/tubearchivist/home/src/index/video.py +++ b/tubearchivist/home/src/index/video.py @@ -369,7 +369,7 @@ class YoutubeVideo(YouTubeItem, YoutubeSubtitle): channel_dir = os.path.join(self.app_conf["videos"], channel) all_files = os.listdir(channel_dir) for file in all_files: - if self.youtube_id in file: + if self.youtube_id in file and file.endswith(".mp4"): vid_path = os.path.join(channel_dir, file) break else: