Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[plugin.video.retrospect] v5.7.19 #4586

Merged
merged 1 commit into from
Oct 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions plugin.video.retrospect/addon.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="plugin.video.retrospect"
version="5.7.18"
version="5.7.19"
name="Retrospect"
provider-name="Bas Rieter">

Expand Down Expand Up @@ -123,19 +123,23 @@
<platform>all</platform>
<license>GPL-3.0-or-later</license>
<language>en nl de sv no lt lv fi</language>
<news>[B]Retrospect v5.7.18 - Changelog - 2024-09-29[/B]
<news>[B]Retrospect v5.7.19 - Changelog - 2024-10-17[/B]

Updated: Minor channel updates.
Updated a number of channels that were broken.

[B]Framework related[/B]
* Fixed: Logging out when no username is set.
_None_

[B]GUI/Settings/Language related[/B]
_None_

[B]Channel related[/B]
* Fixed: NPO Start recent items broke due to an API change (Fixes #1838).
* Removed: Nickelodeon &amp; MTV channels as they no longer provide videos.
* Fixed: SVT category listings broke (Fixes #1843).
* Fixed: TV4 API issues.
* Fixed: RegioGroei Broke.
* Fixed: Vier parsing (Fixes #1846).
* Fixed: TV4 Category listing (Fixes #1844).
* Fixed: UR Play Category listing (Fixes #1847).

</news>
<assets>
Expand Down
5 changes: 3 additions & 2 deletions plugin.video.retrospect/channels/channel.be/vier/chn_vier.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ def __init__(self, regex: str):
def __call__(self, data: str) -> Tuple[JsonHelper, List[MediaItem]]:
nextjs_regex = self.__regex
try:
nextjs_data = Regexer.do_regex(nextjs_regex, data)[0]
result = Regexer.do_regex(nextjs_regex, data)
nextjs_data = result[0]
except:
Logger.debug(f"RAW NextJS: {data}")
raise
Expand Down Expand Up @@ -106,7 +107,7 @@ def __init__(self, channel_info):
parser=[], creator=self.create_typed_nextjs_item)

self._add_data_parser("https://www.goplay.be/", json=True, name="Main show parser",
preprocessor=NextJsParser(r"{\"playlists\":(.+)}\]}\]\]$"),
preprocessor=NextJsParser(r"{\"playlists\":(.+)}\]}\]\][\r\n]"),
parser=[], creator=self.create_season_item,
postprocessor=self.show_single_season)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ def create_video_item(self, result_set, epg_item=False):
return None

program_title = result_set["programTitle"]
episode_title = result_set["episodeTitle"]
episode_title = result_set.get("episodeTitle")
url = "{}{}".format(self.baseUrl, result_set["_links"]["page"]["href"])

item = MediaItem(episode_title or program_title, url, media_type=mediatype.EPISODE)
Expand All @@ -301,13 +301,18 @@ def create_video_item(self, result_set, epg_item=False):
date_time = date_time.astimezone(self.__timezone)
item.set_date(date_time.year, date_time.month, date_time.day,
date_time.hour, date_time.minute, date_time.second)

if epg_item:
if episode_title and program_title:
item.name = "{:02d}:{:02d} - {} - {}".format(date_time.hour, date_time.minute,
program_title, episode_title)
else:
item.name = "{:02d}:{:02d} - {}".format(date_time.hour, date_time.minute,
item.title)
elif not episode_title:
item.name = f"{item.name} {date_time.year}-{date_time.month:02}-{date_time.day:02}"



item.complete = False
return item
Expand Down
8 changes: 4 additions & 4 deletions plugin.video.retrospect/channels/channel.se/svt/chn_svt.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ def add_live_items_and_genres(self, data):
LanguageHelper.get_localized_string(LanguageHelper.CurrentlyPlayingEpisodes): (
self.__get_api_url(
"GridPage",
"a8248fc130da34208aba94c4d5cc7bd44187b5f36476d8d05e03724321aafb40",
"1e2d15ff7ffa578d33ebf1287d3f7af7fd47125552b564e96fd277a744345a69",
variables={"includeFullOppetArkiv": True, "selectionId": "live_start"}),
False),

Expand Down Expand Up @@ -964,7 +964,7 @@ def fetch_genre_api_data(self, data):

data = UriHandler.open(url)
json_data = JsonHelper(data)
possible_lists = json_data.get_value("data", "categoryPage", "lazyLoadedTabs", 1, "selections")
possible_lists = json_data.get_value("data", "categoryPage", "lazyLoadedTabs", -1, "selections")
program_items = [genres["items"] for genres in possible_lists if
genres["selectionType"] == "all"]
json_data.json = {
Expand Down Expand Up @@ -1362,11 +1362,11 @@ def __update_item_from_video_references(self, item, videos, subtitles=None, righ
# LB = Low Bandwidth

if in_sweden or not item.isGeoLocked:
supported_formats = {"hls": 0, "hls-ts-full": 2, "hls-cmaf-full": 3}
supported_formats = {"hls": 10, "hls-ts-full": 12, "hls-cmaf-full": 13}
if not is_drm_protected:
supported_formats.update({"dash": 3, "dash-hbbtv-avc": 4, "dashhbbtv": 4})
else:
supported_formats = {"hls": 0, "hls-ts-avc-51": 1}
supported_formats = {"hls": 10, "hls-ts-avc-51": 11}
if not is_drm_protected:
supported_formats.update({"dash": 2, "dash-avc-51": 3})

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def __init__(self, channel_info):
if self.channelCode == "tv4segroup":
self.noImage = "tv4image.png"
self.httpHeaders = {"Content-Type": "application/json", "Client-Name": "tv4-web",
"Client-Version": "4.0.0"}
"Client-Version": "5.2.0"}
else:
raise Exception("Invalid channel code")

Expand Down Expand Up @@ -782,7 +782,6 @@ def __get_api_query(self, operation: str, variables: dict, use_get: bool = False
"SportEventVideoFields": "fragment SportEventVideoFields on SportEvent { title id slug isLiveContent isDrmProtected access { hasAccess } synopsis { medium } images { logo { ...ImageFieldsLight } main16x9 { ...ImageFieldsLight source } brandLogo { ...ImageFieldsLight } } playableUntil { isoString humanDateTime } playableFrom { humanDateTime isoString readableDistance } liveEventEnd { isoString } }",
"SurveyPollFields": "fragment SurveyPollFields on SurveyPoll { buttonText color endTime id image { main4x3 { ...ImageFieldsFull } } inactiveSubtitle inactiveTitle liveTriggerTimestamps options { id image { option1x1 { ...ImageFieldsLight } } text } publishing { metadataIds videoAssetIds } resultConfiguration { isResultPublic isResultStatic } resultSubtitle resultTitle status subtitle title vodTriggerTimes }",
"ThemePanelFields": "fragment ThemePanelFields on ThemePanel { id title pitch hexColor images { image16x9 { ...ImageFieldsFull } } link { ... on ThemePanelSeriesLink { series { id slug genres numberOfAvailableSeasons parentalRating { ...ParentalRatingFields } images { brandLogo { ...ImageFieldsLight } } upsell { tierId } } } ... on ThemePanelMovieLink { movie { id slug genres productionCountries { countryCode name } productionYear parentalRating { ...ParentalRatingFields } images { brandLogo { ...ImageFieldsLight } } upsell { tierId } } } ... on ThemePanelEpisodeLink { episode { id slug upsell { tierId } } } ... on ThemePanelClipLink { clip { id slug } } ... on ThemePanelPageLink { page { id } } ... on ThemePanelUrlsLink { webUrl } ... on ThemePanelSportEventLink { sportEvent { id slug arena league round playableFrom { humanDateTime isoString readableDate } images { brandLogo { ...ImageFieldsLight } } upsell { tierId } } } } themePanelLinkText: linkText showMetadataForLink subtitle trailers { ...TrailerFields } showUpsellLabel }",
"TierPanels": "fragment TierPanels on TiersPanel { id title }",
"TrailerFields": "fragment TrailerFields on Trailers { mp4 webm }",
"UpcomingEpisodeFields": "fragment UpcomingEpisodeFields on UpcomingEpisode { id title seasonTitle playableFrom { humanDateTime isoString readableDateShort } image { main16x9 { ...ImageFieldsLight } } upsell { tierId } } ",
"VideoFields": "fragment VideoFields on Video { id duration { readableShort readableMinutes seconds } isLiveContent access { hasAccess } isDrmProtected }",
Expand Down Expand Up @@ -860,7 +859,6 @@ def __get_api_query(self, operation: str, variables: dict, use_get: bool = False
query = """
query Page($pageId: ID!, $input: PageContentInput!) { page(id: $pageId) { id title content(input: $input) { pageInfo { ...PageInfoFields } panels {
__typename
... on TiersPanel { __typename id title detailed }
... on ContinueWatchingPanel { __typename id title }
... on MediaPanel { __typename id slug title displayHint { mediaPanelImageRatio } }
... on SportEventPanel { __typename id title }
Expand All @@ -871,7 +869,6 @@ def __get_api_query(self, operation: str, variables: dict, use_get: bool = False
... on ChannelPanel { __typename id title type }
... on ThemePanel { __typename ...ThemePanelFields }
... on SinglePanel { __typename ...SinglePanelFields }
... on TiersPanel { __typename id title }
} } } }
%(PageInfoFields)s %(ThemePanelFields)s %(SinglePanelFields)s %(ImageFieldsFull)s %(ParentalRatingFields)s
%(ImageFieldsLight)s %(TrailerFields)s %(SportEventFieldsLight)s %(SeriesFieldsLight)s %(MovieFieldsLight)s
Expand Down
Loading
Loading