mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2025-06-24 09:00:31 +00:00
Tool black: auto-format Python code
This commit is contained in:
parent
e4d8084c25
commit
7763762212
54 changed files with 6545 additions and 4723 deletions
|
@ -47,8 +47,8 @@ class ContextMenu(xbmcgui.WindowXMLDialog):
|
|||
|
||||
def onInit(self):
|
||||
|
||||
if window('JellyfinUserImage'):
|
||||
self.getControl(USER_IMAGE).setImage(window('JellyfinUserImage'))
|
||||
if window("JellyfinUserImage"):
|
||||
self.getControl(USER_IMAGE).setImage(window("JellyfinUserImage"))
|
||||
|
||||
LOG.info("options: %s", self._options)
|
||||
self.list_ = self.getControl(LIST)
|
||||
|
@ -63,21 +63,35 @@ class ContextMenu(xbmcgui.WindowXMLDialog):
|
|||
if action in (ACTION_BACK, ACTION_PARENT_DIR, ACTION_PREVIOUS_MENU):
|
||||
self.close()
|
||||
|
||||
if action in (ACTION_SELECT_ITEM, ACTION_MOUSE_LEFT_CLICK) and self.getFocusId() == LIST:
|
||||
if (
|
||||
action in (ACTION_SELECT_ITEM, ACTION_MOUSE_LEFT_CLICK)
|
||||
and self.getFocusId() == LIST
|
||||
):
|
||||
|
||||
option = self.list_.getSelectedItem()
|
||||
self.selected_option = ensure_text(option.getLabel())
|
||||
LOG.info('option selected: %s', self.selected_option)
|
||||
LOG.info("option selected: %s", self.selected_option)
|
||||
|
||||
self.close()
|
||||
|
||||
def _add_editcontrol(self, x, y, height, width, password=0):
|
||||
|
||||
media = os.path.join(xbmcaddon.Addon(addon_id()).getAddonInfo('path'), 'resources', 'skins', 'default', 'media')
|
||||
control = xbmcgui.ControlImage(0, 0, 0, 0,
|
||||
filename=os.path.join(media, "white.png"),
|
||||
aspectRatio=0,
|
||||
colorDiffuse="ff111111")
|
||||
media = os.path.join(
|
||||
xbmcaddon.Addon(addon_id()).getAddonInfo("path"),
|
||||
"resources",
|
||||
"skins",
|
||||
"default",
|
||||
"media",
|
||||
)
|
||||
control = xbmcgui.ControlImage(
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
filename=os.path.join(media, "white.png"),
|
||||
aspectRatio=0,
|
||||
colorDiffuse="ff111111",
|
||||
)
|
||||
control.setPosition(x, y)
|
||||
control.setHeight(height)
|
||||
control.setWidth(width)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue