예제 #1
0
#
#     xbmc-qobuz is distributed in the hope that it will be useful,
#     but WITHOUT ANY WARRANTY; without even the implied warranty of
#     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.   See the
#     GNU General Public License for more details.
#
#     You should have received a copy of the GNU General Public License
#     along with xbmc-qobuz.   If not, see <http://www.gnu.org/licenses/>.

import os
import sys
import xbmcaddon
import xbmc

__addon__        = xbmcaddon.Addon(id='plugin.audio.qobuz')
__addonversion__ = __addon__.getAddonInfo('version')
__addonid__      = __addon__.getAddonInfo('id')
__cwd__          = __addon__.getAddonInfo('path')

addonDir  = __addon__.getAddonInfo('path')
libDir = xbmc.translatePath(os.path.join(addonDir, 'resources', 'lib'))
qobuzDir = xbmc.translatePath(os.path.join(libDir, 'qobuz'))
sys.path.append(libDir)
sys.path.append(qobuzDir)

from bootstrap import QobuzBootstrap
import qobuz
boot = QobuzBootstrap(__addon__, int(sys.argv[1]))
sys.exit(boot.bootstrap_app())

예제 #2
0
import os
pluginId = 'plugin.audio.qobuz'
__addon__ = xbmcaddon.Addon(id=pluginId)
__addonversion__ = __addon__.getAddonInfo('version')
__addonid__ = __addon__.getAddonInfo('id')
__cwd__ = __addon__.getAddonInfo('path')
__addondir__ = __addon__.getAddonInfo('path')
__libdir__ = xbmc.translatePath(os.path.join(__addondir__, 'resources', 'lib'))
__qobuzdir__ = xbmc.translatePath(os.path.join(__libdir__, 'qobuz'))
sys.path.append(__libdir__)
sys.path.append(__qobuzdir__)

from bootstrap import QobuzBootstrap
__handle__ = -1
boot = QobuzBootstrap(__addon__, __handle__)
boot.bootstrap_directories()

def try_get_settings():
    global username, password
    username = __addon__.getSetting('username')
    password = __addon__.getSetting('password')
    if username and password:
        return True
    return False

while not (try_get_settings()):
    xbmc.sleep(5000)

import qobuz
from api import api
예제 #3
0
import os
pluginId = 'plugin.audio.qobuz'
__addon__ = xbmcaddon.Addon(id=pluginId)
__addonversion__ = __addon__.getAddonInfo('version')
__addonid__ = __addon__.getAddonInfo('id')
__cwd__ = __addon__.getAddonInfo('path')
__addondir__ = __addon__.getAddonInfo('path')
__libdir__ = xbmc.translatePath(os.path.join(__addondir__, 'resources', 'lib'))
__qobuzdir__ = xbmc.translatePath(os.path.join(__libdir__, 'qobuz'))
sys.path.append(__libdir__)
sys.path.append(__qobuzdir__)

from bootstrap import QobuzBootstrap
__handle__ = -1
boot = QobuzBootstrap(__addon__, __handle__)
boot.bootstrap_directories()


def try_get_settings():
    global username, password
    username = __addon__.getSetting('username')
    password = __addon__.getSetting('password')
    if username and password:
        return True
    return False


while not (try_get_settings()):
    xbmc.sleep(5000)
예제 #4
0
        try:
            if xbmc.getGlobalIdleTime() >= since:
                return True
            return False
        except:
            return False

    def cache_remove_old(self, **ka):
        self.last_garbage_on = time()
        clean_old(cache)

    def onSettingsChanged(self):
        pass


boot = QobuzBootstrap(__addon__, 0)
logLabel = "QobuzMonitor"
import pprint

try:
    boot.bootstrap_app()
    monitor = Monitor()
    player = MyPlayer()
    alive = True
    while alive:
        alive = False
        try:
            alive = not monitor.abortRequested
        except Exception as e:
            print "Exception while getting abortRequested..."
            raise e
예제 #5
0
        try:
            if xbmc.getGlobalIdleTime() >= since:
                return True
            return False
        except:
            return False

    def cache_remove_old(self, **ka):
        self.last_garbage_on = time()
        clean_old(cache)

    def onSettingsChanged(self):
        pass


boot = QobuzBootstrap(__addon__, 0)
logLabel = 'QobuzMonitor'
import pprint
try:
    boot.bootstrap_app()
    monitor = Monitor()
    player = MyPlayer()
    alive = True
    while alive:
        alive = False
        try:
            alive = not monitor.abortRequested
        except Exception as e:
            print "Exception while getting abortRequested..."
            raise e
        if not alive:
예제 #6
0
#     along with xbmc-qobuz.   If not, see <http://www.gnu.org/licenses/>.

import os
import sys
import xbmcaddon
import xbmc

pluginId = 'plugin.audio.qobuz'
__addon__ = xbmcaddon.Addon(id=pluginId)
__addonversion__ = __addon__.getAddonInfo('version')
__addonid__ = __addon__.getAddonInfo('id')
__cwd__ = __addon__.getAddonInfo('path')
__addondir__ = __addon__.getAddonInfo('path')
__libdir__ = xbmc.translatePath(os.path.join(__addondir__, 'resources', 'lib'))
__qobuzdir__ = xbmc.translatePath(os.path.join(__libdir__, 'qobuz'))
sys.path.append(__libdir__)
sys.path.append(__qobuzdir__)

from exception import QobuzXbmcError
from bootstrap import QobuzBootstrap
from debug import warn

__handle__ = int(sys.argv[1])
boot = QobuzBootstrap(__addon__, __handle__)

try:
    boot.bootstrap_app()
    boot.dispatch()
except QobuzXbmcError as e:
    warn('[' + pluginId + ']', "Exception while running plugin")