Skip to content

Commit bdf85b8

Browse files
authored
Merge pull request #4597 from basrieter/retrospect-matrix
[plugin.video.retrospect] v5.7.21
2 parents 7a95a16 + 40dafad commit bdf85b8

File tree

92 files changed

+470
-62
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

92 files changed

+470
-62
lines changed

plugin.video.retrospect/addon.xml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
22
<addon id="plugin.video.retrospect"
3-
version="5.7.20"
3+
version="5.7.21"
44
name="Retrospect"
55
provider-name="Bas Rieter">
66

@@ -123,19 +123,22 @@
123123
<platform>all</platform>
124124
<license>GPL-3.0-or-later</license>
125125
<language>en nl de sv no lt lv fi</language>
126-
<news>[B]Retrospect v5.7.20 - Changelog - 2024-10-21[/B]
126+
<news>[B]Retrospect v5.7.21 - Changelog - 2024-11-26[/B]
127127

128-
Fixed the NPO channel that broke.
128+
Fixed some minor channel issues for Dutch and Swedish channels.
129129

130130
[B]Framework related[/B]
131-
_None_
131+
* Added: Patch option to UriHandler.
132132

133133
[B]GUI/Settings/Language related[/B]
134134
_None_
135135

136136
[B]Channel related[/B]
137-
* Fixed: NPO streams (Fixes #1854).
138-
137+
* Fixed: NPO Plus content not showing (Fixes #1862).
138+
* Fixed: Some TV4 content (with encryption) was not playing (Fixes #1853).
139+
* Fixed: Revoking a device from Videoland.nl broke Retrospect listing (Fixes #1852).
140+
* Fixed: BVN Images did not show (Fixes #1864).
141+
* Fixed: Don&#x27;t use HVEC for SVT (Fixes #1865).
139142
</news>
140143
<assets>
141144
<icon>resources/media/icon.png</icon>

plugin.video.retrospect/channels/channel.be/ketnet/chn_ketnet.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
"channelcode": "ketnet",
1313
"sortorder": 12,
1414
"language": "be",
15-
"fanart": "ketnetfanart.jpg"
15+
"fanart": "ketnetfanart.jpg",
16+
"ignore": true
1617
}
1718
],
1819
"settings": [

plugin.video.retrospect/channels/channel.be/vier/chn_vier.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ def create_season_item(self, result_set):
319319
title = video_info["title"]
320320
url = f"{self.baseUrl}{video_info['path']}"
321321
video_date = video_info["dateCreated"]
322-
description = video_info["description"]
322+
description = video_info.get("description")
323323
# video_id = video_info["uuid"]
324324
episode = video_info.get("episodeNumber", 0)
325325

plugin.video.retrospect/channels/channel.nos/bvntv/chn_bvntv.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,10 @@ def create_episode_item(self, result_set):
101101
if not item.url.endswith("/"):
102102
item.url = "{}/".format(item.url)
103103

104-
item.thumb = "{}{}".format(self.baseUrl, result_set["thumburl"])
104+
thumb_url = result_set["thumburl"]
105+
if "://" not in thumb_url:
106+
item.thumb = "{}{}".format(self.baseUrl, thumb_url)
107+
105108
item.fanart = item.thumb.replace("600/338", "1280/720")
106109
return item
107110

@@ -117,7 +120,10 @@ def create_video_item(self, result_set):
117120
# date_time = DateHelper.get_date_from_string(date_value, "% Y-%m-%d %H:%M:%S")
118121
# item.set_date(*date_time[0:6])
119122

120-
item.thumb = "{}{}".format(self.baseUrl, result_set["thumburl"])
123+
thumb_url = result_set["thumburl"]
124+
if "://" not in thumb_url:
125+
item.thumb = "{}{}".format(self.baseUrl, thumb_url)
126+
121127
item.metaData["pow"] = result_set["pow"]
122128

123129
return item

plugin.video.retrospect/channels/channel.nos/nos2010/chn_nos2010.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1307,7 +1307,7 @@ def __has_premium(self) -> bool:
13071307

13081308
data = UriHandler.open("https://npo.nl/start/api/auth/session")
13091309
json = JsonHelper(data)
1310-
subscriptions = json.get_value("subscription", fallback=None)
1310+
subscriptions = json.get_value("hasSubscription", fallback=None)
13111311
self.__has_premium_cache = subscriptions is not None
13121312
Logger.debug("Found subscriptions: %s", subscriptions)
13131313

plugin.video.retrospect/channels/channel.nos/nosnl/chn_nosnl.py

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
from resources.lib.logger import Logger
88
from resources.lib.mediaitem import MediaItem, FolderItem
9+
from resources.lib.regexer import Regexer
910
from resources.lib.urihandler import UriHandler
1011
from resources.lib.helpers.jsonhelper import JsonHelper
1112
from resources.lib.helpers.encodinghelper import EncodingHelper
@@ -62,8 +63,10 @@ def __init__(self, channel_info):
6263
# No longer used: preprocessor=self.AddNextPage,
6364
json=True,
6465
parser=['items', ],
65-
creator=self.create_json_video, updater=self.update_json_video,
66+
creator=self.create_json_video, # updater=self.update_json_video,
6667
postprocessor=self.filter_duplicate_streams)
68+
69+
self._add_data_parser("https://nos.nl/video/", updater=self.update_video_item)
6770
self._add_data_parser("*",
6871
json=True,
6972
parser=['links', ],
@@ -164,7 +167,8 @@ def create_json_video(self, result_set):
164167
# category = result_set["maincategory"].title()
165168
# subcategory = result_set["subcategory"].title()
166169

167-
url = "https://api.nos.nl/mobile/video/%s/phone.json" % (video_id, )
170+
# url = "https://api.nos.nl/mobile/video/%s/phone.json" % (video_id, )
171+
url = f"https://nos.nl/video/{video_id}"
168172
item = MediaItem(result_set['title'], url, media_type=mediatype.VIDEO)
169173
item.description = result_set["description"]
170174
item.complete = False
@@ -223,6 +227,35 @@ def update_resolved_stream(self, item):
223227
item.complete = M3u8.update_part_with_m3u8_streams(item, url, bitrate=0)
224228
return item
225229

230+
def update_video_item(self, item):
231+
""" Updates an existing MediaItem with more data.
232+
233+
Used to update none complete MediaItems (self.complete = False). This
234+
could include opening the item's URL to fetch more data and then process that
235+
data or retrieve it's real media-URL.
236+
237+
The method should at least:
238+
* cache the thumbnail to disk (use self.noImage if no thumb is available).
239+
* set at least one MediaStream.
240+
* set self.complete = True.
241+
242+
if the returned item does not have a MediaSteam then the self.complete flag
243+
will automatically be set back to False.
244+
245+
:param MediaItem item: the original MediaItem that needs updating.
246+
247+
:return: The original item with more data added to it's properties.
248+
:rtype: MediaItem
249+
250+
"""
251+
252+
Logger.debug('Starting update_video_item: %s', item.name)
253+
254+
data = UriHandler.open(item.url, additional_headers=self.httpHeaders)
255+
stream_url = Regexer.do_regex(r"contentUrl\"\W+\"([^\"]+)\"", data)[0]
256+
item.url = stream_url
257+
return self.update_resolved_stream(item)
258+
226259
def update_json_video(self, item):
227260
""" Updates an existing MediaItem with more data.
228261

plugin.video.retrospect/channels/channel.regionalnl/regiogroei/chn_regiogroei.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,7 @@ def create_program_item(self, result_set):
247247
base = result_set["_links"]["page"]["href"]
248248
slug = result_set["_links"]["web"]["slug"]
249249
origin = result_set["_links"]["web"]["originId"]
250+
# url = f"{self.baseUrl}{base}"
250251
url = "{}{}?slug={}&origin={}".format(self.baseUrl, base, slug, origin)
251252

252253
item = FolderItem(title, url, content_type=contenttype.EPISODES, media_type=mediatype.TVSHOW)

plugin.video.retrospect/channels/channel.se/svt/chn_svt.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1358,11 +1358,12 @@ def __update_item_from_video_references(self, item, videos, subtitles=None, righ
13581358
# For HLS:
13591359
# "hls-cmaf-full" has x264/x264 with 5.1
13601360
# "hls"/"hls-ts-avc" has x264 and 2.0 audio
1361+
# hls-ts-full has x264 with 5.1 audio
13611362

13621363
# LB = Low Bandwidth
13631364

13641365
if in_sweden or not item.isGeoLocked:
1365-
supported_formats = {"hls": 10, "hls-ts-full": 12, "hls-cmaf-full": 13}
1366+
supported_formats = {"hls": 10, "hls-ts-full": 12, "hls-cmaf-full": 0}
13661367
if not is_drm_protected:
13671368
supported_formats.update({"dash": 3, "dash-hbbtv-avc": 4, "dashhbbtv": 4})
13681369
else:

plugin.video.retrospect/channels/channel.se/tv4se/chn_tv4se.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ def __create_item(lang_id: int, url: str, json: Optional[dict] = None):
201201
use_get=True)
202202
items.append(__create_item(LanguageHelper.TvShows, tvshow_url, tvshow_data))
203203

204-
recent_url, recent_data = self.__get_api_query("Panel", {"panelId": "5qGBwTBSPdxO55EzbpOeNg", "limit": self.__max_page_size, "offset": 0})
204+
recent_url, recent_data = self.__get_api_query("Panel", {"panelId": "2K0BCBpDDfhpW1NRLY0jET", "limit": self.__max_page_size, "offset": 0})
205205
items.append(__create_item(LanguageHelper.Recent, recent_url, recent_data))
206206

207207
popular_url, popular_data = self.__get_api_query("Panel", {"panelId": "4nNp00Z12bjEiNboaW2uxB", "limit": self.__max_page_size, "offset": 0})
@@ -951,7 +951,7 @@ def __update_dash_video(self, item, stream_info):
951951

952952
license_info = playback_item.get("license", None)
953953
if license_info is not None:
954-
license_key_token = license_info["token"]
954+
license_key_token = license_info.get("token")
955955
auth_token = license_info["castlabsToken"]
956956
header = {
957957
"x-dt-auth-token": auth_token,

plugin.video.retrospect/channels/channel.videoland/videolandnl/chn_videolandnl.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@
3535
"order": 4,
3636
"value": "type=\"select\" lvalues=\"30126|30127|30128\" default=\"0\" label=\"30081\"",
3737
"id": "filter_premium"
38+
},
39+
{
40+
"order": 5,
41+
"id": "re-authenticate",
42+
"value": "label=\"30129\" type=\"action\" action=\"RunScript(plugin.video.retrospect, 0, ?channel=channel.videoland.videolandnl&amp;action=execute&amp;command=log_off)\" option=\"close\""
3843
}
3944
]
4045
}

0 commit comments

Comments
 (0)