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
1 changed files with 6 additions and 1 deletions

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"{}-{lang}: json3 not processed")
return False
subtitle = subtitle_json3[0]
{"lang": lang, "source": "auto", "media_url": media_url}