Skip to content

Commit

Permalink
Fix to version suffix added from kodi
Browse files Browse the repository at this point in the history
  • Loading branch information
CastagnaIT committed Jun 19, 2022
1 parent bbc66d2 commit a1973ca
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion resources/lib/globals.py
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ def py2_encode(self, value, encoding='utf-8'):
def remove_ver_suffix(version):
"""Remove the codename suffix from version value"""
import re
pattern = re.compile(r'\+\w+\.\d$') # Example: +matrix.1
pattern = re.compile(r'\+\w+$') # Example: +matrix +matrix.1 ...
return re.sub(pattern, '', version)


Expand Down
2 changes: 1 addition & 1 deletion resources/lib/upgrade_actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def migrate_repository():
if not xbmc.getCondVisibility('System.hasAddon(repository.castagnait)'):
return
from xbmcaddon import Addon
if not is_less_version(Addon('repository.castagnait').getAddonInfo('version'), '2.0.0'):
if not is_less_version(G.remove_ver_suffix(Addon('repository.castagnait').getAddonInfo('version')), '2.0.0'):
return
LOG.info('Upgrading add-on repository "repository.castagnait" to version 2.0.0')
repo_folder = G.ADDON_DATA_PATH.replace('plugin.video.netflix', 'repository.castagnait')
Expand Down

0 comments on commit a1973ca

Please sign in to comment.