From 94cf860e806bfa369182180b1f252dde95ae39e5 Mon Sep 17 00:00:00 2001 From: Heckie75 Date: Sun, 21 Jan 2024 10:33:57 +0100 Subject: [PATCH] [plugin.audio.podcasts] 2.3.2 --- plugin.audio.podcasts/addon.xml | 19 ++++++++----------- .../download_gpodder_subscriptions_action.py | 3 ++- .../podcasts/actions/export_opml_action.py | 6 +++--- .../lib/podcasts/actions/remote_action.py | 2 +- .../resources/lib/podcasts/opml_file.py | 6 ++++-- .../resources/lib/podcasts/podcastsaddon.py | 7 +++---- 6 files changed, 21 insertions(+), 22 deletions(-) diff --git a/plugin.audio.podcasts/addon.xml b/plugin.audio.podcasts/addon.xml index 84f3a674c3..0fdd88feb9 100644 --- a/plugin.audio.podcasts/addon.xml +++ b/plugin.audio.podcasts/addon.xml @@ -1,5 +1,5 @@ - + @@ -26,6 +26,12 @@ Dateien direkt eingehÃĪngt werden. https://github.com/Heckie75/kodi-addon-podcast https://github.com/Heckie75/kodi-addon-podcast +v2.3.2 (2024-01-21) +- Fixed bug #23: Addon crashes immediately after starting it (prob. MS Windows only) + +v2.3.1 (2023-10-02) +- Fixed bug #1, support network paths like smb:// + v2.3.0 (2023-08-06) - Added feature in order to search for podcasts in fyyd.de podcast directory - Support for Nextcloud Gpoddersync @@ -55,16 +61,7 @@ v2.1.1 (2021-08-13) v2.1.0 (2021-05-24) - Added support for importing subscriptions from your gPodder account or from local files - Added information like duration and plot for video podcasts -- many refactorings and bugfixes - -v2.0.2 (2021-05-14) -- Bugfix according missing HTTP header and improved exception handling: - - see https://github.com/Heckie75/kodi-addon-podcast/issues/4 - - see https://github.com/Heckie75/kodi-addon-podcast/issues/5 -- new setting for anchor for latest item in order to turn it on/off - -v2.0.1 (2021-05-12) -- Bugfix for Kodi v19 which has no order by date. Only availble in Kodi v20 +- many refactorings and bugfixes resources/assets/icon.png diff --git a/plugin.audio.podcasts/resources/lib/podcasts/actions/download_gpodder_subscriptions_action.py b/plugin.audio.podcasts/resources/lib/podcasts/actions/download_gpodder_subscriptions_action.py index 7e270214fe..bd1bfb104e 100644 --- a/plugin.audio.podcasts/resources/lib/podcasts/actions/download_gpodder_subscriptions_action.py +++ b/plugin.audio.podcasts/resources/lib/podcasts/actions/download_gpodder_subscriptions_action.py @@ -1,6 +1,7 @@ import re import xbmcgui +import xbmcvfs import xmltodict from resources.lib.podcasts.actions.action import Action from resources.lib.podcasts.gpodder import GPodder @@ -62,7 +63,7 @@ def _save_opml_file(self, data: str) -> 'tuple[str,str]': try: fullpath = "%s%s" % (path, filename) - with open(fullpath, "w", encoding="utf-8") as _file: + with xbmcvfs.File(fullpath, 'w') as _file: _file.write(data) return fullpath, filename diff --git a/plugin.audio.podcasts/resources/lib/podcasts/actions/export_opml_action.py b/plugin.audio.podcasts/resources/lib/podcasts/actions/export_opml_action.py index afbae4a471..0cb0a11696 100644 --- a/plugin.audio.podcasts/resources/lib/podcasts/actions/export_opml_action.py +++ b/plugin.audio.podcasts/resources/lib/podcasts/actions/export_opml_action.py @@ -1,6 +1,7 @@ from datetime import datetime import xbmcgui +import xbmcvfs from resources.lib.podcasts.actions.opml_action import OpmlAction from resources.lib.podcasts.util import get_asset_path @@ -45,9 +46,8 @@ def _escape(str: str) -> str: title, created, "".join(outlines)) try: - with open("%s%s.opml" % (path, title), mode="w") as _file: - _file.writelines(_xml) - _file.close() + with xbmcvfs.File("%s%s.opml" % (path, title), 'w') as _file: + _file.write(_xml) return True diff --git a/plugin.audio.podcasts/resources/lib/podcasts/actions/remote_action.py b/plugin.audio.podcasts/resources/lib/podcasts/actions/remote_action.py index 54936abf87..c79f0ce8f5 100644 --- a/plugin.audio.podcasts/resources/lib/podcasts/actions/remote_action.py +++ b/plugin.audio.podcasts/resources/lib/podcasts/actions/remote_action.py @@ -8,7 +8,7 @@ class RemoteAction(OpmlAction): def __init__(self) -> None: super().__init__() - def subscribe_feeds(self, feeds: list[dict]) -> 'tuple[list[dict], bool]': + def subscribe_feeds(self, feeds: 'list[dict]') -> 'tuple[list[dict], bool]': items: 'list[xbmcgui.ListItem]' = list() for f in feeds: diff --git a/plugin.audio.podcasts/resources/lib/podcasts/opml_file.py b/plugin.audio.podcasts/resources/lib/podcasts/opml_file.py index 1d2f649cb1..6c7e483bcb 100644 --- a/plugin.audio.podcasts/resources/lib/podcasts/opml_file.py +++ b/plugin.audio.podcasts/resources/lib/podcasts/opml_file.py @@ -1,8 +1,10 @@ import re import xbmcaddon +import xbmcvfs import xmltodict + def parse_opml(data: str, limit=0) -> 'tuple[str,list[dict]]': def parse_outlines_from_opml(outline): @@ -29,7 +31,7 @@ def parse_outlines_from_opml(outline): if "@type" in o and o["@type"] == "rss" and "@xmlUrl" in o: entry["params"] = [{ "rss": o["@xmlUrl"], - "limit" : str(limit) + "limit": str(limit) }] entries.append(entry) @@ -59,5 +61,5 @@ def parse_outlines_from_opml(outline): def open_opml_file(path: str) -> str: - with open(path, encoding="utf-8") as _opml_file: + with xbmcvfs.File(path, 'r') as _opml_file: return _opml_file.read() diff --git a/plugin.audio.podcasts/resources/lib/podcasts/podcastsaddon.py b/plugin.audio.podcasts/resources/lib/podcasts/podcastsaddon.py index 7f41d8c233..bb96d7a71b 100644 --- a/plugin.audio.podcasts/resources/lib/podcasts/podcastsaddon.py +++ b/plugin.audio.podcasts/resources/lib/podcasts/podcastsaddon.py @@ -1,8 +1,8 @@ -import os from datetime import datetime import xbmc import xbmcplugin +import xbmcvfs from resources.lib.podcasts.opml_file import open_opml_file, parse_opml from resources.lib.rssaddon.abstract_rss_addon import AbstractRssAddon @@ -81,9 +81,8 @@ def _build_dir_structure(self) -> None: if self.addon.getSetting("opml_file_%i" % g) == "": continue - path = os.path.join( - self.addon_dir, self.addon.getSetting("opml_file_%i" % g)) - + path = xbmcvfs.translatePath( + self.addon.getSetting("opml_file_%i" % g)) try: name, nodes = parse_opml(open_opml_file(path), limit=limit) groups.append({