mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2025-05-13 04:45:06 +00:00
Fix linting, flake8 and sonarcloud issues
This commit is contained in:
parent
87af711c94
commit
3f63e7c213
27 changed files with 162 additions and 169 deletions
|
@ -34,8 +34,11 @@ class ContextMenu(xbmcgui.WindowXMLDialog):
|
|||
|
||||
xbmcgui.WindowXMLDialog.__init__(self, *args, **kwargs)
|
||||
|
||||
def set_options(self, options=[]):
|
||||
self._options = options
|
||||
def set_options(self, options=None):
|
||||
if options is None:
|
||||
self._options = []
|
||||
else:
|
||||
self._options = options
|
||||
|
||||
def is_selected(self):
|
||||
return True if self.selected_option else False
|
||||
|
|
|
@ -3,12 +3,10 @@ from __future__ import division, absolute_import, print_function, unicode_litera
|
|||
|
||||
##################################################################################################
|
||||
|
||||
import os
|
||||
|
||||
from six import iteritems
|
||||
from kodi_six import xbmcgui, xbmcaddon
|
||||
from kodi_six import xbmcgui
|
||||
|
||||
from helper import translate, addon_id
|
||||
from helper import translate
|
||||
from helper import LazyLogger
|
||||
|
||||
##################################################################################################
|
||||
|
@ -97,9 +95,8 @@ class LoginManual(xbmcgui.WindowXMLDialog):
|
|||
if action in (ACTION_BACK, ACTION_PARENT_DIR, ACTION_PREVIOUS_MENU):
|
||||
self.close()
|
||||
|
||||
def _add_editcontrol(self, x, y, height, width, password=0):
|
||||
def _add_editcontrol(self, x, y, height, width, password=False):
|
||||
|
||||
media = os.path.join(xbmcaddon.Addon(addon_id()).getAddonInfo('path'), 'resources', 'skins', 'default', 'media')
|
||||
control = xbmcgui.ControlEdit(0, 0, 0, 0,
|
||||
label="User",
|
||||
font="font13",
|
||||
|
|
|
@ -46,12 +46,12 @@ class ResumeDialog(xbmcgui.WindowXMLDialog):
|
|||
if action in (ACTION_BACK, ACTION_PARENT_DIR, ACTION_PREVIOUS_MENU):
|
||||
self.close()
|
||||
|
||||
def onClick(self, controlID):
|
||||
def onClick(self, control_id):
|
||||
|
||||
if controlID == RESUME:
|
||||
if control_id == RESUME:
|
||||
self.selected_option = 1
|
||||
self.close()
|
||||
|
||||
if controlID == START_BEGINNING:
|
||||
if control_id == START_BEGINNING:
|
||||
self.selected_option = 0
|
||||
self.close()
|
||||
|
|
|
@ -3,13 +3,12 @@ from __future__ import division, absolute_import, print_function, unicode_litera
|
|||
|
||||
##################################################################################################
|
||||
|
||||
import os
|
||||
import re
|
||||
|
||||
from six import iteritems
|
||||
from kodi_six import xbmcgui, xbmcaddon
|
||||
from kodi_six import xbmcgui
|
||||
|
||||
from helper import translate, addon_id
|
||||
from helper import translate
|
||||
from jellyfin.connection_manager import CONNECTION_STATE
|
||||
from helper import LazyLogger
|
||||
|
||||
|
@ -98,7 +97,6 @@ class ServerManual(xbmcgui.WindowXMLDialog):
|
|||
|
||||
def _add_editcontrol(self, x, y, height, width):
|
||||
|
||||
media = os.path.join(xbmcaddon.Addon(addon_id()).getAddonInfo('path'), 'resources', 'skins', 'default', 'media')
|
||||
control = xbmcgui.ControlEdit(0, 0, 0, 0,
|
||||
label="User",
|
||||
font="font13",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue