Skip to content

Commit

Permalink
Merge pull request #4615 from basrieter/retrospect-matrix
Browse files Browse the repository at this point in the history
[plugin.video.retrospect] v5.7.23
  • Loading branch information
basrieter authored Jan 25, 2025
2 parents f2e9c8e + 7dc3828 commit eabe384
Show file tree
Hide file tree
Showing 9 changed files with 37 additions and 39 deletions.
19 changes: 8 additions & 11 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.22"
version="5.7.23"
name="Retrospect"
provider-name="Bas Rieter">

Expand Down Expand Up @@ -133,23 +133,20 @@
<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.22 - Changelog - 2024-12-20[/B]
<news>[B]Retrospect v5.7.23 - Changelog - 2025-01-25[/B]

Fixed some channel related stuff.
Some small channel bugfixes and Python 3.13 support.

[B]Framework related[/B]
_None_
* Fixed: Import issue with Python 3.13 and above.
* Fixed: Remove search history item with space or special chars.

[B]GUI/Settings/Language related[/B]
* Fixed: Show notification on logon failure (Fixes #1842).
* Added: Allow clearing of search history or history items (Fixes #1874).
* Fixed: Show notification on logon failure (Fixes #1842).
_None_

[B]Channel related[/B]
* Fixed: NPO &#x27;Recent&#x27; items broke if there were too many season results (Fixes #1871).
* Fixed: Tweede kamer streams broke (Fixes #1872).
* Fixed: SVT date parsing.
* Changed: Make login optional for NPO (See #1842).
* Fixed: Video land duplicate entries.
* Fixed: TV4 Latest News.

</news>
<assets>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"guid": "ED8FDB9C-3870-11E2-B1C2-192A6288709B",
"name": "NPO Start",
"description": {
"en": "Broadcast of the Dutch public broadcasters via www.npostart.nl.\n\nA [COLOR=yellow]NPO Start account[/COLOR] can be configured via the add-on settings. This makes the 'subscribed' shows available within Retrospect.",
"nl": "Uitzendingen van de publieke zenders beschikbaar via www.npostart.nl.\n\nVia de add-on instellingen kan een [COLOR=yellow]NPO Start account[/COLOR] worden geconfigureerd zodat de 'gevolgde' programma's beschikbaar komen binnen Retrospect."
"en": "Broadcast of the Dutch public broadcasters via https://npo.nl/start.\n\nA [COLOR=yellow]NPO Start account[/COLOR] can be configured via the add-on settings. This makes the 'subscribed' shows available within Retrospect.",
"nl": "Uitzendingen van de publieke zenders beschikbaar https://npo.nl/start.\n\nVia de add-on instellingen kan een [COLOR=yellow]NPO Start account[/COLOR] worden geconfigureerd zodat de 'gevolgde' programma's beschikbaar komen binnen Retrospect."
},
"icon": "npolarge.png",
"category": "National",
Expand All @@ -14,7 +14,7 @@
"language": "nl",
"fanart": "nosfanart4.jpg",
"poster": "npoposter.png",
"message": "By using the NPO Start channel you are accepting the NPO Terms of Use: https://www.npostart.nl/npo-id-gebruiksvoorwaarden.",
"message": "By using the NPO Start channel you are accepting the NPO Terms of Use: https://npo.nl/start/npo-plus-gebruiksvoorwaarden.",
"hasIptv": true
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ def __create_item(lang_id: int, url: str, json: Optional[dict] = None):
popular_url, popular_data = self.__get_api_query("Panel", {"panelId": "4nNp00Z12bjEiNboaW2uxB", "limit": self.__max_page_size, "offset": 0})
items.append(__create_item(LanguageHelper.Popular, popular_url, popular_data))

latest_news_url, latest_news_data = self.__get_api_query("Panel", {"panelId": "5Rqb0w0SN16A6YHt5Mx8BU", "limit": self.__max_page_size, "offset": 0})
latest_news_url, latest_news_data = self.__get_api_query("Panel", {"panelId": "1aF6XTvnEEmvAP6usqWYl1", "limit": self.__max_page_size, "offset": 0})
items.append(__create_item(LanguageHelper.LatestNews, latest_news_url, latest_news_data))

category_url, json_data = self.__get_api_query("PageList", {"pageListId": "categories"})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,11 @@ def add_others_and_check_correct_url(self, data: str) -> Tuple[JsonHelper, List[
# need to check that and retry otherwise.
json_data = JsonHelper(data)
blockes = json_data.get_value("blocks")
if len(blockes) > 10:
if len(blockes) < 10:
fallback = [
{
"title": {"long": LanguageHelper.get_localized_string(LanguageHelper.Popular)},
"id": "page_65a44d889f7982.33185461--6d1869d5-ef61-461c-b634-226a1bb29c7d",
"id": "page_678591b18340e0.89781000--f9da1016-dc0d-4d0d-a38f-241c0d451e09",
"featureId": "programs_by_segment"
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
msgid ""
msgstr ""
"Project-Id-Version: Retrospect Add-on\n"
"Report-Msgid-Bugs-To: https://github.com/retrospect-addon/plugin.video.retrospect/issues\n"
"Report-Msgid-Bugs-To: translations@kodi.tv\n"
"POT-Creation-Date: YEAR-MO-DA HO:MI+ZONE\n"
"PO-Revision-Date: 2022-02-22 01:13+0000\n"
"Last-Translator: Christian Gade <gade@kodi.tv>\n"
"PO-Revision-Date: 2025-01-21 06:27+0000\n"
"Last-Translator: Heiko Berner <berner.h@gmail.com>\n"
"Language-Team: Afrikaans (South Africa) <https://kodi.weblate.cloud/projects/kodi-add-ons-video/plugin-video-retrospect/af_za/>\n"
"Language: af_za\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.10.1\n"
"X-Generator: Weblate 5.9.2\n"

msgctxt "Addon Summary"
msgid "Retrospect allows you to watch re-runs/catch-ups of TV shows made available via their official broadcasters."
Expand Down Expand Up @@ -64,7 +64,7 @@ msgstr ""

msgctxt "#30009"
msgid "General"
msgstr ""
msgstr "Algemeen"

msgctxt "#30010"
msgid "Channels"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
msgid ""
msgstr ""
"Project-Id-Version: Retrospect Add-on\n"
"Report-Msgid-Bugs-To: https://github.com/retrospect-addon/plugin.video.retrospect/issues\n"
"Report-Msgid-Bugs-To: translations@kodi.tv\n"
"POT-Creation-Date: YEAR-MO-DA HO:MI+ZONE\n"
"PO-Revision-Date: 2024-11-04 17:05+0000\n"
"Last-Translator: Alfonso Cachero <alfonso.cachero@gmail.com>\n"
"PO-Revision-Date: 2024-12-22 10:36+0000\n"
"Last-Translator: José Antonio Alvarado <jalvarado0.eses@gmail.com>\n"
"Language-Team: Spanish (Spain) <https://kodi.weblate.cloud/projects/kodi-add-ons-video/plugin-video-retrospect/es_es/>\n"
"Language: es_es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 5.8.2\n"
"X-Generator: Weblate 5.9.2\n"

msgctxt "Addon Summary"
msgid "Retrospect allows you to watch re-runs/catch-ups of TV shows made available via their official broadcasters."
Expand Down Expand Up @@ -777,11 +777,11 @@ msgstr "Seguir Viendo"

msgctxt "#30377"
msgid "Clear Search History"
msgstr ""
msgstr "Borrar Historial de Búsqueda"

msgctxt "#30378"
msgid "Remove Item"
msgstr ""
msgstr "Quitar Elemento"

# empty strings from id 30365 to 30400
msgctxt "#30401"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@
msgid ""
msgstr ""
"Project-Id-Version: Retrospect Add-on\n"
"Report-Msgid-Bugs-To: https://github.com/retrospect-addon/plugin.video.retrospect/issues\n"
"Report-Msgid-Bugs-To: translations@kodi.tv\n"
"POT-Creation-Date: YEAR-MO-DA HO:MI+ZONE\n"
"PO-Revision-Date: 2024-11-02 13:46+0000\n"
"Last-Translator: bas <bas@kodi.tv>\n"
"PO-Revision-Date: 2025-01-08 18:27+0000\n"
"Last-Translator: Smarttube01 da gamer <smarttubed@gmail.com>\n"
"Language-Team: Dutch <https://kodi.weblate.cloud/projects/kodi-add-ons-video/plugin-video-retrospect/nl_nl/>\n"
"Language: nl_nl\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 5.8.2\n"
"X-Generator: Weblate 5.9.2\n"

msgctxt "Addon Summary"
msgid "Retrospect allows you to watch re-runs/catch-ups of TV shows made available via their official broadcasters."
Expand Down Expand Up @@ -780,7 +780,7 @@ msgstr "Doorgaan met kijken"

msgctxt "#30377"
msgid "Clear Search History"
msgstr "Zoekhistorie wissen"
msgstr "Zoekgeschiedenis wissen"

msgctxt "#30378"
msgid "Remove Item"
Expand Down
9 changes: 4 additions & 5 deletions plugin.video.retrospect/resources/lib/channelinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import os
import io
import sys
import importlib

import xbmcgui

Expand Down Expand Up @@ -91,12 +92,10 @@ def get_channel(self):
Logger.trace("Importing module %s from path %s", self.moduleName, self.path)

sys.path.append(self.path)
exec("import {}".format(self.moduleName))

channel_command = '%s.Channel(self)' % (self.moduleName,)
channel_module = importlib.import_module(self.moduleName)
try:
Logger.trace("Running command: %s", channel_command)
channel = eval(channel_command)
Logger.trace(f"Creating channel: {self}")
channel = channel_module.Channel(self)
except:
Logger.error("Cannot Create channel for %s", self, exc_info=True)
return None
Expand Down
4 changes: 3 additions & 1 deletion plugin.video.retrospect/resources/lib/menu.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ def __init__(self, menu_action):
super(Menu, self).__init__(name, -1, params)

self.channelObject = self.__get_channel()
self.params["menu_command"] = menu_action
Logger.debug(self)

def hide_channel(self):
Expand Down Expand Up @@ -137,7 +138,8 @@ def remove_search_item(self):

settings = AddonSettings.store(LOCAL)
history: List[str] = settings.get_setting("search", self.channelObject, []) # type: ignore
needle = self.params[keyword.NEEDLE]
needle: str = self.params[keyword.NEEDLE]
needle = HtmlEntityHelper.url_decode(needle)
history.remove(needle)
settings.set_setting("search", history, self.channelObject)
self.refresh()
Expand Down

0 comments on commit eabe384

Please sign in to comment.