fix duration builder on reindex by ignoring vtt files

This commit is contained in:
simon 2022-03-22 12:59:39 +07:00
parent 22a3d3f6cd
commit 75cd9d382d
No known key found for this signature in database
GPG Key ID: 2C15AA5E89985DD4

View File

@ -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: