1
0
mirror of https://github.com/spaam/svtplay-dl.git synced 2024-11-23 19:55:38 +01:00

Add support for webvtt subtitles in Oppetarkiv

This commit is contained in:
Sebastian Kemi 2020-09-07 17:02:55 +02:00 committed by Johan Andersson
parent 54412eb823
commit 35e3b58453

View File

@ -42,6 +42,8 @@ class OppetArkiv(Service, OpenGraphThumbMixin):
for i in data["subtitleReferences"]:
if i["format"] == "websrt":
yield subtitle(copy.copy(self.config), "wrst", i["url"], output=self.output)
if i["format"] == "webvtt" and "url" in i:
yield subtitle(copy.copy(self.config), "wrst", i["url"], output=self.output)
if len(data["videoReferences"]) == 0:
yield ServiceError("Media doesn't have any associated videos (yet?)")