mirror of
https://github.com/spaam/svtplay-dl.git
synced 2024-11-24 04:05:39 +01:00
viaplay: check if its vtt or sami
This commit is contained in:
parent
ec0f2a4feb
commit
3173beef4a
@ -142,9 +142,17 @@ class Viaplay(Service, OpenGraphThumbMixin):
|
||||
self.options.output = title
|
||||
|
||||
if dataj["sami_path"]:
|
||||
yield subtitle(copy.copy(self.options), "sami", dataj["sami_path"])
|
||||
if dataj["sami_path"].endswith("vtt"):
|
||||
subtype = "wrst"
|
||||
else:
|
||||
subtype = "sami"
|
||||
yield subtitle(copy.copy(self.options), subtype, dataj["sami_path"])
|
||||
if dataj["subtitles_for_hearing_impaired"]:
|
||||
yield subtitle(copy.copy(self.options), "sami", dataj["subtitles_for_hearing_impaired"])
|
||||
if dataj["subtitles_for_hearing_impaired"].endswith("vtt"):
|
||||
subtype = "wrst"
|
||||
else:
|
||||
subtype = "sami"
|
||||
yield subtitle(copy.copy(self.options), subtype, dataj["subtitles_for_hearing_impaired"])
|
||||
|
||||
if streamj["streams"]["medium"]:
|
||||
filename = streamj["streams"]["medium"]
|
||||
|
Loading…
Reference in New Issue
Block a user