Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP #248

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

WIP #248

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"python.formatting.autopep8Args": [
"ignore E402"
]
}
1 change: 0 additions & 1 deletion default.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
'''
import sys
from os import path as P

sys.path.append(P.join(P.abspath(P.dirname(__file__)), 'resources', 'lib'))

from qobuz.plugin import Plugin # pylint: disable=C0413
Expand Down
1 change: 1 addition & 0 deletions resources/lib/qobuz/api/easy.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ def login(self, username, password):
::return
True on success, else False
"""
logger.info("LOGIN %s PASS %s" % (username, password))
if common.is_empty(username) and common.is_empty(password):
return True
current_user.set_credentials(username, password)
Expand Down
3 changes: 2 additions & 1 deletion resources/lib/qobuz/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
'''
import os
import sys
from kodi_six import xbmc
import xbmc

from qobuz import exception
from qobuz.cache import cache
Expand Down Expand Up @@ -67,6 +67,7 @@ def init_cache(cls):
@classmethod
def bootstrap_registry(cls):
from qobuz.api import api
logger.info('LOGIN %s' % config.app.registry.get('username'))
if not api.login(
config.app.registry.get('username'),
config.app.registry.get('password')):
Expand Down
3 changes: 2 additions & 1 deletion resources/lib/qobuz/debug.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ def attach_file_logger(logger):


try:
from kodi_six import xbmc, xbmcaddon
import xbmc
import xbmcaddon

class XbmcLogger(logging.Handler):

Expand Down
2 changes: 1 addition & 1 deletion resources/lib/qobuz/extension/kooli/kooli/monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
:license: GPLv3, see LICENSE for more details.
'''
import time
from kodi_six import xbmc # pylint:disable=E0401
import xbmc # pylint:disable=E0401

from qobuz.cache import cache_util
from qobuz.debug import getLogger
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from kooli import log
from kooli import qobuz_lib_path

from kodi_six import xbmc # pylint:disable=E0401
import xbmc # pylint:disable=E0401
from kooli.application import application, shutdown_server, qobuzApp
from kooli.monitor import Monitor
from qobuz import config
Expand Down
3 changes: 1 addition & 2 deletions resources/lib/qobuz/gui/bg_progress.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from kodi_six import xbmcgui # pylint:disable=E0401

import xbmcgui # pylint:disable=E0401

class Progress(xbmcgui.DialogProgressBG):
def __init__(self, heading='Qobuz', message=None, enable=True):
Expand Down
2 changes: 1 addition & 1 deletion resources/lib/qobuz/gui/dialog.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from kodi_six import xbmcgui
import xbmcgui

from qobuz.debug import getLogger

Expand Down
2 changes: 1 addition & 1 deletion resources/lib/qobuz/gui/directory.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
'''
import time

from kodi_six import xbmcplugin # pylint:disable=E0401
import xbmcplugin # pylint:disable=E0401

from qobuz.debug import getLogger
from qobuz.gui.bg_progress import Progress
Expand Down
6 changes: 4 additions & 2 deletions resources/lib/qobuz/gui/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
logger = getLogger(__name__)

try:
from kodi_six import xbmc, xbmcgui, xbmcplugin # pylint:disable=E0401
import xbmc
import xbmcgui
import xbmcplugin # pylint:disable=E0401

class Keyboard(xbmc.Keyboard):
def __init__(self, _default, heading='', _hidden=True):
Expand Down Expand Up @@ -85,7 +87,7 @@ def dialogLoginFailure():
'''
dialog = xbmcgui.Dialog()
if dialog.yesno(lang(30010), lang(30036), lang(30042)):
qobuz.addon.openSettings()
# qobuz.addon.openSettings()
xbmcplugin.endOfDirectory(
handle=int(sys.argv[1]),
succeeded=False,
Expand Down
2 changes: 1 addition & 1 deletion resources/lib/qobuz/node/album/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
:license: GPLv3, see LICENSE for more details.
'''
import time
from kodi_six import xbmcgui # pylint:disable=E0401
import xbmcgui # pylint:disable=E0401

from .props import propsMap, informationTemplate
from qobuz import config
Expand Down
2 changes: 1 addition & 1 deletion resources/lib/qobuz/node/albums_by_artist.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
:license: GPLv3, see LICENSE for more details.
'''
import weakref
from kodi_six import xbmcgui
import xbmcgui

from qobuz.api import api
from qobuz.debug import getLogger
Expand Down
2 changes: 1 addition & 1 deletion resources/lib/qobuz/node/article.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
:copyright: (c) 2012-2018 by Joachim Basmaison, Cyril Leclerc
:license: GPLv3, see LICENSE for more details.
'''
from kodi_six import xbmcgui # pylint:disable=E0401
import xbmcgui # pylint:disable=E0401

from qobuz.api import api
from qobuz.debug import getLogger
Expand Down
2 changes: 1 addition & 1 deletion resources/lib/qobuz/node/artist.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
:copyright: (c) 2012-2018 by Joachim Basmaison, Cyril Leclerc
:license: GPLv3, see LICENSE for more details.
'''
from kodi_six import xbmcgui # pylint:disable=E0401
import xbmcgui # pylint:disable=E0401

from qobuz.api import api
from qobuz.debug import getLogger
Expand Down
2 changes: 1 addition & 1 deletion resources/lib/qobuz/node/favorite.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
:copyright: (c) 2012-2018 by Joachim Basmaison, Cyril Leclerc
:license: GPLv3, see LICENSE for more details.
'''
from kodi_six import xbmcgui # pylint:disable=E0401
import xbmcgui # pylint:disable=E0401

from qobuz import exception
from qobuz.api import api
Expand Down
2 changes: 1 addition & 1 deletion resources/lib/qobuz/node/inode/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ def makeListItem(self, **ka):
return a xbml list item
Class can overload this method
'''
from kodi_six import xbmcgui # pylint:disable=E0401
import xbmcgui # pylint:disable=E0401
if 'url' not in ka:
ka['url'] = self.make_url()
if 'label' not in ka:
Expand Down
2 changes: 1 addition & 1 deletion resources/lib/qobuz/node/playlist/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
:copyright: (c) 2012-2018 by Joachim Basmaison, Cyril Leclerc
:license: GPLv3, see LICENSE for more details.
'''
from kodi_six import xbmcgui # pylint:disable=E0401
import xbmcgui # pylint:disable=E0401

from .context_menu import attach_context_menu
from .props import propsMap
Expand Down
2 changes: 1 addition & 1 deletion resources/lib/qobuz/node/testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from qobuz.node.inode import INode
from time import time
import requests
from kodi_six import xbmcgui # pylint:disable=E0401
import xbmcgui # pylint:disable=E0401

logger = getLogger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion resources/lib/qobuz/node/track/list_item.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from kodi_six import xbmcgui
import xbmcgui

from qobuz.constants import Mode
from qobuz.debug import getLogger
Expand Down
2 changes: 1 addition & 1 deletion resources/lib/qobuz/node/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
:copyright: (c) 2012-2018 by Joachim Basmaison, Cyril Leclerc
:license: GPLv3, see LICENSE for more details.
'''
from kodi_six import xbmcgui # pylint:disable=E0401
import xbmcgui # pylint:disable=E0401

from qobuz.api.user import current as user
from qobuz.debug import getLogger
Expand Down
2 changes: 1 addition & 1 deletion resources/lib/qobuz/player.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
:license: GPLv3, see LICENSE for more details.
'''

from kodi_six import xbmc, xbmcgui # pylint:disable=E0401
import xbmc, xbmcgui # pylint:disable=E0401

from qobuz import config
from qobuz.debug import getLogger
Expand Down
3 changes: 2 additions & 1 deletion resources/lib/qobuz/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
'''
import os

from kodi_six import xbmc, xbmcaddon
import xbmc
import xbmcaddon


class Plugin(object):
Expand Down
2 changes: 1 addition & 1 deletion resources/lib/qobuz/renderer/xbmc.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
:copyright: (c) 2012-2018 by Joachim Basmaison, Cyril Leclerc
:license: GPLv3, see LICENSE for more details.
'''
from kodi_six import xbmcplugin # pylint:disable=E0401
import xbmcplugin # pylint:disable=E0401

from qobuz import config
from qobuz import exception
Expand Down
2 changes: 1 addition & 1 deletion resources/lib/qobuz/xbmcrpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
logger = getLogger(__name__)

try:
from kodi_six import xbmc
import xbmc
except ImportError as e:
logger.warn('ImportError(Outside XBMC): %s', e)

Expand Down