Skip to content

Commit

Permalink
fix pep8 stayle and bug in recentlywatched
Browse files Browse the repository at this point in the history
  • Loading branch information
TermeHansen committed Apr 10, 2023
1 parent 701765c commit da05fce
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions resources/lib/addon.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,10 @@ def _version_check(self):
addon_version = get_addon_info('version')

# Compare versions (settings_version was not present in version 6.0.2 and older)
settings_V = StrictVersion(settings_version.split('+')[0]).version if settings_version != '' else StrictVersion('6.0.2').version
if settings_version != '':
settings_V = StrictVersion(settings_version.split('+')[0]).version
else:
settings_V = StrictVersion('6.0.2').version
addon_V = StrictVersion(addon_version.split('+')[0]).version

if addon_V > settings_V:
Expand Down Expand Up @@ -267,7 +270,7 @@ def showRecentlyWatched(self):
for path in self.recentlyWatched:
try:
item = self.api.get_programcard(path)
if item is None:
if item is None or len(item['entries']) != 1:
self.recentlyWatched.remove(path)
else:
videos.append(item['entries'][0]['item'])
Expand All @@ -288,7 +291,7 @@ def getIptvLiveChannels(self):

lowername = api_channel['title'].lower().replace(' ', '')
if not bool_setting('iptv.channels.include.' + lowername):
continue
continue

iptv_channel = {
'name': api_channel['title'],
Expand Down

0 comments on commit da05fce

Please sign in to comment.