From be9c3d2685a64e004dcac6ff400c3a24895225e6 Mon Sep 17 00:00:00 2001 From: TermeHansen Date: Wed, 21 Aug 2024 21:26:16 +0200 Subject: [PATCH] [plugin.video.drnu] 6.4.3 --- plugin.video.drnu/addon.xml | 5 ++++- plugin.video.drnu/changelog.txt | 3 +++ plugin.video.drnu/resources/lib/addon.py | 13 ++++++++----- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/plugin.video.drnu/addon.xml b/plugin.video.drnu/addon.xml index 1b1b2445c..1d2b94e33 100644 --- a/plugin.video.drnu/addon.xml +++ b/plugin.video.drnu/addon.xml @@ -1,5 +1,5 @@ - + @@ -32,6 +32,9 @@ resources/media/Screenshot3.jpg resources/media/Screenshot4.jpg + [B]Version 6.4.3 - 2024-08-20[/B] + - Fix issue of distutils being removed in python 3.12 + [B]Version 6.4.2 - 2024-05-06[/B] - Fix not unfolding my-list diff --git a/plugin.video.drnu/changelog.txt b/plugin.video.drnu/changelog.txt index dd84ff226..3fc8d0164 100644 --- a/plugin.video.drnu/changelog.txt +++ b/plugin.video.drnu/changelog.txt @@ -1,3 +1,6 @@ +[B]Version 6.4.3 - 2024-08-20[/B] +- Fix issue of distutils being removed in python 3.12 + [B]Version 6.4.2 - 2024-05-06[/B] - Fix not unfolding my-list diff --git a/plugin.video.drnu/resources/lib/addon.py b/plugin.video.drnu/resources/lib/addon.py index 5682d106f..33cc75381 100644 --- a/plugin.video.drnu/resources/lib/addon.py +++ b/plugin.video.drnu/resources/lib/addon.py @@ -23,7 +23,6 @@ import traceback import time import urllib.parse as urlparse -from distutils.version import StrictVersion import xbmc import xbmcaddon @@ -71,6 +70,10 @@ def kodi_version_major(): return int(kodi_version().split('.')[0]) +def version(s): + return [int(item) for item in s.split('.')] + + class DrDkTvAddon(object): def __init__(self, plugin_url, plugin_handle): self._plugin_url = plugin_url @@ -102,7 +105,7 @@ def _version_change_fixes(self): if settings_version == '' and kodi_version_major() <= 19: # kodi matrix subtitle handling https://github.com/xbmc/inputstream.adaptive/issues/1037 set_setting('enable.localsubtitles', 'true') - elif addon_V == StrictVersion('6.2.0').version and kodi_version_major() == 20: + elif addon_V == version('6.2.0') and kodi_version_major() == 20: set_setting('enable.localsubtitles', 'false') def _version_check(self): @@ -114,10 +117,10 @@ def _version_check(self): # Compare versions (settings_version was not present in version 6.0.2 and older) if settings_version != '': - settings_V = StrictVersion(settings_version.split('+')[0]).version + settings_V = version(settings_version.split('+')[0]) else: - settings_V = StrictVersion('6.0.2').version - addon_V = StrictVersion(addon_version.split('+')[0]).version + settings_V = version('6.0.2') + addon_V = version(addon_version.split('+')[0]) if addon_V > settings_V: # New version found, save addon version to settings