Пример #1
0
def getMainCategoryList():
    ## Get the account details
    ## account
    accountLoader = APAccountLoader.APAccountLoader(__properties)
    jsonAccountDictionary = accountLoader.loadURL()
    xbmc.log('accountURL --> %s' % (accountLoader.getQuery()), xbmc.LOGDEBUG)

    # get programs category
    rootCategoryId = ''
    #try:
    #    extensionsStr = jsonAccountDictionary["account"]["extensions"]
    #    extensions = APExtensions.APExtensions(json.loads(extensionsStr, 'utf-8'))
    #    rootCategoryId = extensions.getProgramsCategoryId()
    #    if __DEBUG__:
    #        xbmc.log('Programs category id --> %s' % rootCategoryId, xbmc.LOGERROR)
    #except:
    #    pass

    if '' == rootCategoryId:
        ## broadcaster and main category from previous incarnation of the plugin
        broadcaster = APBroadcaster.APBroadcaster(
            __properties['broadcasterId'],
            jsonAccountDictionary["account"]["broadcasters"])
        xbmc.log('Main Category --> %s' % (broadcaster.getRootCategory()),
                 xbmc.LOGDEBUG)
        rootCategoryId = broadcaster.getRootCategory()

    # get the main categories list
    getCategory(rootCategoryId)
Пример #2
0
def getMainCategoryList():
    global rootCategoryId
    ## Get the account details
    ## account
    accountLoader = APAccountLoader.APAccountLoader(__properties)
    jsonAccountDictionary = accountLoader.loadURL()    
    xbmc.log('accountURL --> %s' % (accountLoader.getQuery()), xbmc.LOGDEBUG)
    
    # get programs category
    rootCategoryId = ''
    
    if '' == rootCategoryId:
        ## broadcaster and main category from previous incarnation of the plugin
        broadcaster = APBroadcaster.APBroadcaster(__properties['broadcasterId'], jsonAccountDictionary["account"]["broadcasters"])
        xbmc.log('Main Category --> %s' % (broadcaster.getRootCategory()), xbmc.LOGDEBUG)
        rootCategoryId = broadcaster.getRootCategory()
    
    # get the main categories list
    getCategory(rootCategoryId)
Пример #3
0
def getMainCategoryList():
    ## Get the account details
    ## account
    accountLoader = APAccountLoader.APAccountLoader(__properties)
    jsonAccountDictionary = accountLoader.loadURL()
    if __DEBUG__:
        xbmc.log('accountURL --> %s' % (accountLoader.getQuery()),
                 xbmc.LOGERROR)

    ## broadcaster and main category
    broadcaster = APBroadcaster.APBroadcaster(
        __properties['broadcasterId'],
        jsonAccountDictionary["account"]["broadcasters"])
    if __DEBUG__:
        xbmc.log('Main Category --> %s' % (broadcaster.getRootCategory()),
                 xbmc.LOGERROR)
    mainCategory = broadcaster.getRootCategory()

    # get the main categories list
    getCategory(mainCategory)