skip subtitle if not processed yet, #496

This commit is contained in:
Simon 2023-07-24 12:11:21 +07:00
parent 6022bdd3cd
commit efde4b1142
No known key found for this signature in database
GPG Key ID: 2C15AA5E89985DD4

View File

@ -62,7 +62,12 @@ class YoutubeSubtitle:
if not all_formats:
return False
subtitle = [i for i in all_formats if i["ext"] == "json3"][0]
subtitle_json3 = [i for i in all_formats if i["ext"] == "json3"]
if not subtitle_json3:
print(f"{self.video.youtube_id}-{lang}: json3 not processed")
return False
subtitle = subtitle_json3[0]
subtitle.update(
{"lang": lang, "source": "auto", "media_url": media_url}
)