Skip to content

Commit

Permalink
fixed errors from pull request.
Browse files Browse the repository at this point in the history
  • Loading branch information
elgatito committed Oct 27, 2020
1 parent 6db4fd2 commit 9d811fd
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
3 changes: 1 addition & 2 deletions resources/site-packages/elementum/navigation.py
Original file line number Diff line number Diff line change
Expand Up @@ -385,8 +385,7 @@ def run(url_suffix="", retry=0):
for m, menu in enumerate(item["context_menu"]):
if menu[0][0:8] == "LOCALIZE":
menu[0] = getLocalizedLabel(menu[0])
if PLATFORM['kodi'] >= 19 \
and menu[1][0:5] == "XBMC.":
if PLATFORM['kodi'] >= 19 and menu[1][0:5] == "XBMC.":
menu[1] = menu[1][5:]
listItem.addContextMenuItems(item["context_menu"])
listItem.setProperty("isPlayable", item["is_playable"] and "true" or "false")
Expand Down
6 changes: 3 additions & 3 deletions resources/site-packages/elementum/provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def request(url, params={}, headers={}, data=None, method=None):
except Exception as e:
import traceback
map(log.error, traceback.format_exc().split("\n"))
notify(py2_encode("%s: %s" % (getLocalizedString(30224), repr(e), 'utf-8')))
notify(py2_encode("%s: %s" % (getLocalizedString(30224), repr(e)), 'utf-8'))
return None, None


Expand Down Expand Up @@ -171,7 +171,7 @@ def register(search, search_movie, search_episode, search_season=None):
except Exception as e:
import traceback
map(log.error, traceback.format_exc().split("\n"))
notify(py2_encode("%s: %s" % (getLocalizedString(30224), repr(e), 'utf-8')))
notify(py2_encode("%s: %s" % (getLocalizedString(30224), repr(e)), 'utf-8'))
try:
urllib_request.urlopen("%s/provider/%s/failure" % (ELEMENTUMD_HOST, ADDON_ID))
except:
Expand All @@ -187,7 +187,7 @@ def register(search, search_movie, search_episode, search_season=None):
except Exception as e:
import traceback
map(log.error, traceback.format_exc().split("\n"))
notify(py2_encode("%s: %s" % (getLocalizedString(30224), repr(e), 'utf-8')))
notify(py2_encode("%s: %s" % (getLocalizedString(30224), repr(e)), 'utf-8'))
try:
urllib_request.urlopen("%s/provider/%s/failure" % (ELEMENTUMD_HOST, ADDON_ID))
except:
Expand Down
2 changes: 1 addition & 1 deletion resources/site-packages/elementum/rpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ def DialogProgress_Create(self, *args, **kwargs):

def DialogProgress_IsCanceled(self, hwnd, *args, **kwargs):
if PLATFORM['kodi'] < 19:
return int(self._objects[hwnd].iscanceled( *args, **kwargs))
return int(self._objects[hwnd].iscanceled(*args, **kwargs))
else:
heading, message = makeMessage(*args, **kwargs)
return int(self._objects[hwnd].iscanceled(heading, message))
Expand Down

0 comments on commit 9d811fd

Please sign in to comment.