mirror of
https://github.com/spaam/svtplay-dl.git
synced 2024-11-27 21:54:17 +01:00
SVT changed thumbnail path, fix for using the new path (and still old until we know it is completely gone).
This commit is contained in:
parent
4fbf861985
commit
171bd25084
@ -281,18 +281,31 @@ class Svtplay(Service, MetadataThumbMixin):
|
||||
except KeyError:
|
||||
title = data["video"]["titleSlug"]
|
||||
self.output["title_nice"] = title
|
||||
|
||||
try:
|
||||
# Get the image if size/format is not specified in the URL set it to large
|
||||
url = data['state']["titleModel"]["thumbnail"].format(format="large")
|
||||
t = data['state']["titleModel"]["thumbnail"]
|
||||
except KeyError:
|
||||
t = ""
|
||||
if isinstance(t, dict):
|
||||
url = "https://www.svtstatic.se/image/original/default/{id}/{changed}?format=auto&quality=100".format(**t)
|
||||
self.output["showthumbnailurl"] = url
|
||||
except KeyError:
|
||||
pass
|
||||
try:
|
||||
url = data["video"]["thumbnailXL"].format(format="large")
|
||||
self.output["episodethumbnailurl"] = url
|
||||
except KeyError:
|
||||
elif t:
|
||||
# Get the image if size/format is not specified in the URL set it to large
|
||||
url = data["video"]["thumbnail"].format(format="large")
|
||||
url = t.format(format="large")
|
||||
self.output["showthumbnailurl"] = url
|
||||
try:
|
||||
t = data["video"]["thumbnailXL"]
|
||||
except KeyError:
|
||||
try:
|
||||
t = data["video"]["thumbnail"]
|
||||
except KeyError:
|
||||
t = ""
|
||||
if isinstance(t, dict):
|
||||
url = "https://www.svtstatic.se/image/original/default/{id}/{changed}?format=auto&quality=100".format(**t)
|
||||
self.output["episodethumbnailurl"] = url
|
||||
elif t:
|
||||
# Get the image if size/format is not specified in the URL set it to large
|
||||
url = t.format(format="large")
|
||||
self.output["episodethumbnailurl"] = url
|
||||
try:
|
||||
self.output["showdescription"] = data['state']["titleModel"]["description"]
|
||||
|
Loading…
Reference in New Issue
Block a user