|
|
@ -106,8 +106,14 @@ class SVT(Channel):
|
|
|
|
entries = get_svt_category(self.m_id)
|
|
|
|
entries = get_svt_category(self.m_id)
|
|
|
|
for entry in entries:
|
|
|
|
for entry in entries:
|
|
|
|
elem = entry["item"]
|
|
|
|
elem = entry["item"]
|
|
|
|
|
|
|
|
imgformat = "wide"
|
|
|
|
|
|
|
|
if not "wide" in elem["images"].keys():
|
|
|
|
|
|
|
|
if "cleanWide" in elem["images"].keys():
|
|
|
|
|
|
|
|
imgformat = "cleanWide"
|
|
|
|
|
|
|
|
else:
|
|
|
|
|
|
|
|
continue
|
|
|
|
url = elem["urls"]["svtplay"]
|
|
|
|
url = elem["urls"]["svtplay"]
|
|
|
|
video_id = hash_string(url.split('/')[1])
|
|
|
|
video_id = hash_string(url)
|
|
|
|
svt_id = elem["videoSvtId"]
|
|
|
|
svt_id = elem["videoSvtId"]
|
|
|
|
resolved_link = self.resolve_link(svt_id)
|
|
|
|
resolved_link = self.resolve_link(svt_id)
|
|
|
|
if not resolved_link:
|
|
|
|
if not resolved_link:
|
|
|
@ -116,8 +122,8 @@ class SVT(Channel):
|
|
|
|
description = str(entry["description"])
|
|
|
|
description = str(entry["description"])
|
|
|
|
published_parsed = datetime.now()
|
|
|
|
published_parsed = datetime.now()
|
|
|
|
thumbnail_link = get_svt_thumb_from_id_changed(
|
|
|
|
thumbnail_link = get_svt_thumb_from_id_changed(
|
|
|
|
elem['images']["wide"]["id"],
|
|
|
|
elem['images'][imgformat]["id"],
|
|
|
|
elem['images']["wide"]["changed"],
|
|
|
|
elem['images'][imgformat]["changed"],
|
|
|
|
size=self.m_screen_width)
|
|
|
|
size=self.m_screen_width)
|
|
|
|
thumbnail = make_bitmap_from_url(
|
|
|
|
thumbnail = make_bitmap_from_url(
|
|
|
|
thumbnail_link, wx.Size(int(self.m_screen_width), 150), video_id)
|
|
|
|
thumbnail_link, wx.Size(int(self.m_screen_width), 150), video_id)
|
|
|
|