Skip to content

Commit

Permalink
buttonssetup fix issue on 64 bit system change find str function
Browse files Browse the repository at this point in the history
  • Loading branch information
atvcaptain committed Dec 31, 2018
1 parent d0e80a0 commit 5f4e53c
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions lib/python/Screens/ButtonSetup.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,21 +155,21 @@ def getButtonSetupFunctions():
pluginlist.sort(key=lambda p: p.name)
for plugin in pluginlist:
if plugin.name not in twinPlugins and plugin.path and 'selectedevent' not in plugin.__call__.func_code.co_varnames:
if twinPaths.has_key(plugin.path[24:]):
twinPaths[plugin.path[24:]] += 1
if twinPaths.has_key(plugin.path[plugin.path.rfind("Plugins"):]):
twinPaths[plugin.path[plugin.path.rfind("Plugins"):]] += 1
else:
twinPaths[plugin.path[24:]] = 1
ButtonSetupFunctions.append((plugin.name, plugin.path[24:] + "/" + str(twinPaths[plugin.path[24:]]) , "EPG"))
twinPaths[plugin.path[plugin.path.rfind("Plugins"):]] = 1
ButtonSetupFunctions.append((plugin.name, plugin.path[plugin.path.rfind("Plugins"):] + "/" + str(twinPaths[plugin.path[plugin.path.rfind("Plugins"):]]) , "EPG"))
twinPlugins.append(plugin.name)
pluginlist = plugins.getPlugins([PluginDescriptor.WHERE_PLUGINMENU, PluginDescriptor.WHERE_EXTENSIONSMENU, PluginDescriptor.WHERE_EVENTINFO])
pluginlist.sort(key=lambda p: p.name)
for plugin in pluginlist:
if plugin.name not in twinPlugins and plugin.path:
if twinPaths.has_key(plugin.path[24:]):
twinPaths[plugin.path[24:]] += 1
if twinPaths.has_key(plugin.path[plugin.path.rfind("Plugins"):]):
twinPaths[plugin.path[plugin.path.rfind("Plugins"):]] += 1
else:
twinPaths[plugin.path[24:]] = 1
ButtonSetupFunctions.append((plugin.name, plugin.path[24:] + "/" + str(twinPaths[plugin.path[24:]]) , "Plugins"))
twinPaths[plugin.path[plugin.path.rfind("Plugins"):]] = 1
ButtonSetupFunctions.append((plugin.name, plugin.path[plugin.path.rfind("Plugins"):] + "/" + str(twinPaths[plugin.path[plugin.path.rfind("Plugins"):]]) , "Plugins"))
twinPlugins.append(plugin.name)
ButtonSetupFunctions.append((_("Show vertical Program Guide"), "Infobar/openVerticalEPG", "EPG"))
ButtonSetupFunctions.append((_("Show graphical multi EPG"), "Infobar/openGraphEPG", "EPG"))
Expand Down Expand Up @@ -585,23 +585,23 @@ def execButtonSetup(self, selected):
pluginlist.sort(key=lambda p: p.name)
for plugin in pluginlist:
if plugin.name not in twinPlugins and plugin.path and 'selectedevent' not in plugin.__call__.func_code.co_varnames:
if twinPaths.has_key(plugin.path[24:]):
twinPaths[plugin.path[24:]] += 1
if twinPaths.has_key(plugin.path[plugin.path.rfind("Plugins"):]):
twinPaths[plugin.path[plugin.path.rfind("Plugins"):]] += 1
else:
twinPaths[plugin.path[24:]] = 1
if plugin.path[24:] + "/" + str(twinPaths[plugin.path[24:]]) == "/".join(selected):
twinPaths[plugin.path[plugin.path.rfind("Plugins"):]] = 1
if plugin.path[plugin.path.rfind("Plugins"):] + "/" + str(twinPaths[plugin.path[plugin.path.rfind("Plugins"):]]) == "/".join(selected):
self.runPlugin(plugin)
return
twinPlugins.append(plugin.name)
pluginlist = plugins.getPlugins([PluginDescriptor.WHERE_PLUGINMENU, PluginDescriptor.WHERE_EXTENSIONSMENU])
pluginlist.sort(key=lambda p: p.name)
for plugin in pluginlist:
if plugin.name not in twinPlugins and plugin.path:
if twinPaths.has_key(plugin.path[24:]):
twinPaths[plugin.path[24:]] += 1
if twinPaths.has_key(plugin.path[plugin.path.rfind("Plugins"):]):
twinPaths[plugin.path[plugin.path.rfind("Plugins"):]] += 1
else:
twinPaths[plugin.path[24:]] = 1
if plugin.path[24:] + "/" + str(twinPaths[plugin.path[24:]]) == "/".join(selected):
twinPaths[plugin.path[plugin.path.rfind("Plugins"):]] = 1
if plugin.path[plugin.path.rfind("Plugins"):] + "/" + str(twinPaths[plugin.path[plugin.path.rfind("Plugins"):]]) == "/".join(selected):
self.runPlugin(plugin)
return
twinPlugins.append(plugin.name)
Expand Down

0 comments on commit 5f4e53c

Please sign in to comment.