Exemplo n.º 1
0
def fillPlugins(cType="video"):
    utils.addon_log("fillPlugins, type = " + cType)
    json_query = (
        '{"jsonrpc":"2.0","method":"Addons.GetAddons","params":{"type":"xbmc.addon.%s","properties":["name","path","thumbnail","description","fanart","summary"]}, "id": 1 }'
        % cType
    )
    json_detail = jsonUtils.sendJSON(json_query)
    detail = re.compile("{(.*?)}", re.DOTALL).findall(json_detail)
    for f in detail:
        names = re.search('"name" *: *"(.*?)",', f)
        paths = re.search('"addonid" *: *"(.*?)",', f)
        thumbnails = re.search('"thumbnail" *: *"(.*?)",', f)
        fanarts = re.search('"fanart" *: *"(.*?)",', f)
        descriptions = re.search('"description" *: *"(.*?)",', f)
        if not descriptions:
            descriptions = re.search('"summary" *: *"(.*?)",', f)
        if descriptions:
            description = stringUtils.cleanLabels(descriptions.group(1))
        else:
            description = ""
        if names and paths:
            name = stringUtils.cleanLabels(names.group(1))
            path = paths.group(1)
            if cType == "video" and path.startswith("plugin.video") and not path.startswith("plugin.video.osmosis"):
                thumbnail = thumbnails.group(1)  # stringUtils.removeNonAscii(thumbnails.group(1))
                fanart = fanarts.group(1)  # stringUtils.removeNonAscii(fanarts.group(1))
                guiTools.addDir(name, "plugin://" + path, 101, thumbnail, fanart, description, cType, "date", "credits")
            elif cType == "audio" and path.startswith("plugin.audio") and not path.startswith("plugin.video.osmosis"):
                thumbnail = thumbnails.group(1)  # stringUtils.removeNonAscii(thumbnails.group(1))
                fanart = fanarts.group(1)  # stringUtils.removeNonAscii(fanarts.group(1))
                guiTools.addDir(name, "plugin://" + path, 101, thumbnail, fanart, description, cType, "date", "credits")
Exemplo n.º 2
0
def fillPlugins(cType='video'):    
    json_query = ('{"jsonrpc":"2.0","method":"Addons.GetAddons","params":{"type":"xbmc.addon.%s","properties":["name","path","thumbnail","description","fanart","summary", "extrainfo"]}, "id": 1 }' % cType)
    json_details = jsonUtils.sendJSON(json_query)
    for addon in sorted(json_details["addons"], key=lambda json: json['name'].lower()):
        utils.addon_log('fillPlugins entry: ' + str(addon))
        addontypes = []
        for info in addon['extrainfo']:
            if info['key'] == 'provides':
                addontypes = info['value'].split(" ")
                break

        if cType in addontypes and not addon['addonid'] == 'plugin.video.osmosix':
            art = {'thumb': addon['thumbnail'], 'fanart': addon['fanart']}
            guiTools.addDir(addon['name'], 'plugin://' + addon['addonid'], 101, art, addon['description'], cType, 'date', 'credits')
Exemplo n.º 3
0
def fillPlugins(cType='video'):
    utils.addon_log('fillPlugins, type = ' + cType)
    json_query = (
        '{"jsonrpc":"2.0","method":"Addons.GetAddons","params":{"type":"xbmc.addon.%s","properties":["name","path","thumbnail","description","fanart","summary"]}, "id": 1 }'
        % cType)
    json_detail = jsonUtils.sendJSON(json_query)
    detail = re.compile("{(.*?)}", re.DOTALL).findall(json_detail)
    for f in detail:
        names = re.search('"name" *: *"(.*?)",', f)
        paths = re.search('"addonid" *: *"(.*?)",', f)
        thumbnails = re.search('"thumbnail" *: *"(.*?)",', f)
        fanarts = re.search('"fanart" *: *"(.*?)",', f)
        descriptions = re.search('"description" *: *"(.*?)",', f)
        if not descriptions:
            descriptions = re.search('"summary" *: *"(.*?)",', f)
        if descriptions:
            description = stringUtils.cleanLabels(descriptions.group(1))
        else:
            description = ''
        if names and paths:
            name = stringUtils.cleanLabels(names.group(1))
            path = paths.group(1)
            if cType == 'video' and path.startswith(
                    'plugin.video'
            ) and not path.startswith('plugin.video.osmosis'):
                thumbnail = thumbnails.group(
                    1)  #stringUtils.removeNonAscii(thumbnails.group(1))
                fanart = fanarts.group(
                    1)  #stringUtils.removeNonAscii(fanarts.group(1))
                guiTools.addDir(name, 'plugin://' + path, 101, thumbnail,
                                fanart, description, cType, 'date', 'credits')
            elif cType == 'audio' and path.startswith(
                    'plugin.audio'
            ) and not path.startswith('plugin.video.osmosis'):
                thumbnail = thumbnails.group(
                    1)  #stringUtils.removeNonAscii(thumbnails.group(1))
                fanart = fanarts.group(
                    1)  #stringUtils.removeNonAscii(fanarts.group(1))
                guiTools.addDir(name, 'plugin://' + path, 101, thumbnail,
                                fanart, description, cType, 'date', 'credits')
Exemplo n.º 4
0
def fillPluginItems(url, media_type='video', file_type=False, strm=False, strm_name='', strm_type='Other', showtitle='None'):
    initialize_DialogBG("Updating", "Getting content..")
    thisDialog.dialogeBG.update(0, ADDON_NAME + ": Getting: ", stringUtils.getStrmname(strm_name))
    utils.addon_log('fillPluginItems')
    details = []

    if url.find("playMode=play") == -1:
        if not file_type:
            details = jsonUtils.requestList(url, media_type).get('files', [])
        else:
            details = jsonUtils.requestItem(url, media_type).get('files', [])
    else: 
        details.append("palyableSingleMedia")
        details.append(url)

    thisDialog.dialogeBG.close()
    thisDialog.dialogeBG = None  
    if strm_type.find('Cinema') != -1 or strm_type.find('YouTube') != -1 or strm_type.find('Movies') != -1:
        try:
            initialize_DialogBG("Movie", "Adding")
            movieList = addMovies(details, strm_name, strm_type)
            dbMovList = kodiDB.writeMovie(movieList)
            j = 100 / len(dbMovList) if len(dbMovList) > 0 else 1
            # Write strms for all values in movieList
            for entry in dbMovList:
                thisDialog.dialogeBG.update(j, ADDON_NAME + ": Writing Movies: ",  " Video: " + entry.get('title'))
                fileSys.writeSTRM(stringUtils.cleanStrms(entry.get('path')), stringUtils.cleanStrms(entry.get('title')) , "plugin://plugin.video.osmosix/?url=plugin&mode=10&mediaType=movie&id=" + str(entry.get('movieID')) + "|" + entry.get('title'))

                j = j + 100 / len(movieList)
                
            thisDialog.dialogeBG.close()
            thisDialog.dialogeBG = None 
            return      
        except:
            thisDialog.dialogeBG.close()
            thisDialog.dialogeBG = None
            guiTools.infoDialog("Unexpected error: " + str(sys.exc_info()[1])+ (". See your Kodi.log!"))
            utils.addon_log(("Unexpected error: ") + str(sys.exc_info()[1]))
            print ("Unexpected error:"), sys.exc_info()[0]
            raise
        
    if strm_type.find('TV-Show') != -1 or strm_type.find('Shows-Collection') != -1:
        try:
            initialize_DialogBG("Adding TV-Shows", "working..")
            getTVShowFromList(details, strm_name, strm_type)
            thisDialog.dialogeBG.close()
            thisDialog.dialogeBG = None
            return
        except:
            thisDialog.dialogeBG.close()
            thisDialog.dialogeBG = None
            guiTools.infoDialog("Unexpected error: " + str(sys.exc_info()[1])+ (". See your Kodi.log!"))
            utils.addon_log(("Unexpected error: ") + str(sys.exc_info()[1]))
            print ("Unexpected error:"), sys.exc_info()[0]
            raise
        
    if strm_type.find('Album') != -1 :
        try:
            initialize_DialogBG("Album", "Adding")
            addAlbum(details, strm_name, strm_type)
            thisDialog.dialogeBG.close()
            thisDialog.dialogeBG = None       
            return
        except:
            thisDialog.dialogeBG.close()
            thisDialog.dialogeBG = None
            guiTools.infoDialog("Unexpected error: " + str(sys.exc_info()[1])+ (". See your Kodi.log!"))
            utils.addon_log(("Unexpected error: ") + str(sys.exc_info()[1]))
            print ("Unexpected error:"), sys.exc_info()[0]
            raise

    for detail in details:
        filetype = detail['filetype']
        label = stringUtils.cleanLabels(detail['label'])
        file = detail['file'].replace("\\\\", "\\")
        strm_name = str(stringUtils.cleanByDictReplacements(strm_name.strip()))
        plot = stringUtils.cleanLabels(detail.get('plot',''))
        art = detail.get('art',{})
        
        if addon.getSetting('Link_Type') == '0':
            link = sys.argv[0] + "?url=" +urllib.quote_plus(stringUtils.uni(file)) + "&mode=" + str(10) + "&name=" +urllib.quote_plus(stringUtils.uni(label)) + "&fanart=" + urllib.quote_plus(art.get('fanart',''))
        else:
            link = file
    
        if strm_type == 'Audio-Single':
            path = os.path.join('Singles', str(strm_name))
            try:
                album = detail['album'].strip()
                artist = stringUtils.cleanByDictReplacements(", ".join(artist.strip() for artist in detailInfo['artist']) if isinstance(detailInfo['artist'], (list, tuple)) else detailInfo['artist'].strip())
                title = detail['title'].strip()
                type = detail['type'].strip()
                filename = str(strm_name + ' - ' + label).strip()
            except:
                filename = str(strm_name + ' - ' + label).strip()
                               
        if strm_type.find('Audio-Album') != -1:
            path = os.path.join(strm_type, strm_name)
            track = detail.get('track', 0)
            try:
                album = detail['album'].strip()
                artist = stringUtils.cleanByDictReplacements(", ".join(artist.strip() for artist in detailInfo['artist']) if isinstance(detailInfo['artist'], (list, tuple)) else detailInfo['artist'].strip())
                title = stringUtils.cleanByDictReplacements(detail['title'].strip())
                type = stringUtils.cleanByDictReplacements(detail['type'].strip())
                filename = stringUtils.cleanByDictReplacements(label.strip())
            except:
                filename = stringUtils.cleanByDictReplacements(label.strip())

        if strm_type in ['Other']:
            path = os.path.join('Other', strm_name)
            filename = str(strm_name + ' - ' + label)             
                              
        if filetype == 'file':
            if strm:
                if strm_type.find('Audio-Albums') != -1:
                    kodiDB.musicDatabase(album, artist, label, path, link, track)
                fileSys.writeSTRM(stringUtils.cleanStrms((path.rstrip("."))), stringUtils.cleanStrms(filename.rstrip(".")) , link)
            else:
                guiTools.addLink(label, file, 10, art, plot, '', '', '', None, '', total=len(details))
        else:
            if strm:
                fillPluginItems(file, media_type, file_type, strm, label, strm_type)
            else:
                guiTools.addDir(label, file, 101, art, plot, '', '', '')
Exemplo n.º 5
0
def fillPluginItems(url,
                    media_type='video',
                    file_type=False,
                    strm=False,
                    strm_name='',
                    strm_type='Other',
                    showtitle='None'):
    initialize_DialogBG("Updating", "Getting content..")
    thisDialog.dialogeBG.update(0, ADDON_NAME + ": Getting: ",
                                strm_name.replace('++RenamedTitle++', ''))
    utils.addon_log('fillPluginItems')
    detail = []
    if url.find("playMode=play") == -1:
        if not file_type:
            detail = stringUtils.uni(jsonUtils.requestList(url, media_type))
            listLength = len(detail)
        else:
            detail = stringUtils.uni(jsonUtils.requestItem(url, media_type))
    else:
        detail.append("palyableSingleMedia")
        detail.append(url)

    thisDialog.dialogeBG.close()
    thisDialog.dialogeBG = None
    if strm_type.find('Cinema') != -1 or strm_type.find('YouTube') != -1:
        try:
            initialize_DialogBG("Movie", "Adding")
            addMovies(detail, strm_name, strm_type)
            thisDialog.dialogeBG.close()
            thisDialog.dialogeBG = None
            return
        except:
            thisDialog.dialogeBG.close()
            thisDialog.dialogeBG = None
            guiTools.infoDialog("Unexpected error: " + str(sys.exc_info()[1]) +
                                (". Se your Kodi.log!"))
            utils.addon_log(("Unexpected error: ") + str(sys.exc_info()[1]))
            print("Unexpected error:"), sys.exc_info()[0]
            raise

    if strm_type.find('TVShows sub structures') != -1:
        try:
            initialize_DialogBG("TV-Show SST", "Adding")
            addTVShowsSST(detail, strm_name, strm_type)
            thisDialog.dialogeBG.close()
            thisDialog.dialogeBG = None
            return
        except:
            thisDialog.dialogeBG.close()
            thisDialog.dialogeBG = None
            guiTools.infoDialog("Unexpected error: " + str(sys.exc_info()[1]) +
                                (". Se your Kodi.log!"))
            utils.addon_log(("Unexpected error: ") + str(sys.exc_info()[1]))
            print("Unexpected error:"), sys.exc_info()[0]
            raise

    if strm_type.find('TV-Show') != -1:
        try:
            initialize_DialogBG("TV-Show", "Adding")
            addTVShows(detail, strm_name, strm_type)
            thisDialog.dialogeBG.close()
            thisDialog.dialogeBG = None
            return
        except:
            thisDialog.dialogeBG.close()
            thisDialog.dialogeBG = None
            guiTools.infoDialog("Unexpected error: " + str(sys.exc_info()[1]) +
                                (". Se your Kodi.log!"))
            utils.addon_log(("Unexpected error: ") + str(sys.exc_info()[1]))
            print("Unexpected error:"), sys.exc_info()[0]
            raise

    if strm_type.find('Shows-Collection') != -1:
        try:
            initialize_DialogBG("Shows-Collection", "Adding")
            getTVShowFromList(detail, strm_name, strm_type)
            thisDialog.dialogeBG.close()
            thisDialog.dialogeBG = None
            return
        except:
            thisDialog.dialogeBG.close()
            thisDialog.dialogeBG = None
            guiTools.infoDialog("Unexpected error: " + str(sys.exc_info()[1]) +
                                (". Se your Kodi.log!"))
            utils.addon_log(("Unexpected error: ") + str(sys.exc_info()[1]))
            print("Unexpected error:"), sys.exc_info()[0]
            raise

    if strm_type.find('Album') != -1:
        try:
            initialize_DialogBG("Album", "Adding")
            addAlbum(detail, strm_name, strm_type)
            thisDialog.dialogeBG.close()
            thisDialog.dialogeBG = None
            return
        except:
            thisDialog.dialogeBG.close()
            thisDialog.dialogeBG = None
            guiTools.infoDialog("Unexpected error: " + str(sys.exc_info()[1]) +
                                (". Se your Kodi.log!"))
            utils.addon_log(("Unexpected error: ") + str(sys.exc_info()[1]))
            print("Unexpected error:"), sys.exc_info()[0]
            raise


#     if strm_type.find('YouTube') != -1:
#
#         video = pafy.new(url)
#         bestaudio = video.getbestaudio()
#         bestaudio.bitrate #get bit rate
#         bestaudio.extension #extension of audio fileurl
#
#         bestaudio.url #get url
#
#         #download if you want
#         bestaudio.download()
#         return

    for f in detail:
        files = re.search('"file" *: *"(.*?)",', f)
        filetypes = re.search('"filetype" *: *"(.*?)",', f)
        labels = re.search('"label" *: *"(.*?)",', f)
        thumbnails = re.search('"thumbnail" *: *"(.*?)",', f)
        fanarts = re.search('"fanart" *: *"(.*?)",', f)
        descriptions = re.search('"description" *: *"(.*?)",', f)
        tracks = re.search('"track" *: *(.*?),', f)
        durations = re.search('"duration" *: *"(.*?)",', f)

        if filetypes and labels and files:
            filetype = filetypes.group(1)
            label = (stringUtils.cleanLabels(labels.group(1)))
            file = (files.group(1).replace("\\\\", "\\"))
            strm_name = str(
                utils.multiple_reSub(strm_name.strip(), dictReplacements))

            if not descriptions:
                description = ''
            else:
                description = stringUtils.cleanLabels(descriptions.group(1))

            thumbnail = thumbnails.group(
                1)  #stringUtils.removeNonAscii(thumbnails.group(1))
            fanart = fanarts.group(
                1)  #stringUtils.removeNonAscii(fanarts.group(1))

            if addon.getSetting('Link_Type') == '0':
                link = sys.argv[0] + "?url=" + urllib.quote_plus(
                    file) + "&mode=" + str(10) + "&name=" + urllib.quote_plus(
                        label) + "&fanart=" + urllib.quote_plus(fanart)
            else:
                link = file

            if strm_type in ['Audio-Single']:
                path = os.path.join('Singles', str(strm_name))
                try:
                    album = re.search('"album" *: *"(.*?)",',
                                      f).group(1).strip()
                    try:
                        artist = re.search('"artist" *: *"(.*?)",',
                                           f).group(1).strip()
                    except:
                        artist = re.search('"artist"*:*."(.*?)".,',
                                           f).group(1).strip()
                    pass
                    titl = re.search('"title" *: *(.*?),', f).group(1).strip()
                    types = re.search('"type" *: *(.*?),', f).group(1).strip()
                    filename = str(strm_name + ' - ' + label).strip()
                except:
                    filename = str(strm_name + ' - ' + label).strip()

            if strm_type.find('Audio-Album') != -1:
                path = os.path.join(strm_type, strm_name)
                if tracks:
                    track = tracks.group(1)
                try:
                    album = re.search('"album" *: *"(.*?)",',
                                      f).group(1).strip()
                    try:
                        artist = utils.multiple_reSub(
                            re.search('"artist" *: *"(.*?)",',
                                      f).group(1).strip(), dictReplacements)
                    except:
                        artist = utils.multiple_reSub(
                            re.search('"artist"*:*."(.*?)".,',
                                      f).group(1).strip(), dictReplacements)
                    pass
                    titl = utils.multiple_reSub(
                        re.search('"title" *: *(.*?),', f).group(1).strip(),
                        dictReplacements)
                    types = utils.multiple_reSub(
                        re.search('"type" *: *(.*?),', f).group(1).strip(),
                        dictReplacements)
                    filename = utils.multiple_reSub(
                        str(label).strip(), dictReplacements)
                except:
                    filename = utils.multiple_reSub(
                        str(label).strip(), dictReplacements)

            if strm_type in ['Other']:
                path = os.path.join('Other', strm_name)
                filename = str(strm_name + ' - ' + label)

            if filetype == 'file':
                if strm:
                    if strm_type.find('Audio-Albums') != -1:
                        utils.addon_log(str(path + ' ' + filename))
                        #utils.createSongNFO(stringUtils.cleanStrms((path.rstrip("."))), stringUtils.cleanStrms(filename.rstrip(".")), strm_ty=strm_type, artists=artist,albums=album , titls=titl, typese=types)
                        kodiDB.musicDatabase(album, artist, label, path, link,
                                             track)
                    # xbmc.executebuiltin('Notification(%s, %s, %d, %s)'%(path + " - " + filename, " writing...",5000,""))
                    fileSys.writeSTRM(
                        stringUtils.cleanStrms((path.rstrip("."))),
                        stringUtils.cleanStrms(filename.rstrip(".")), link)
                else:
                    guiTools.addLink(label,
                                     file,
                                     10,
                                     thumbnail,
                                     fanart,
                                     description,
                                     '',
                                     '',
                                     '',
                                     None,
                                     '',
                                     total=len(detail))
                    # xbmc.executebuiltin("Container.SetViewMode(500)")
            else:
                if strm:
                    fillPluginItems(file, media_type, file_type, strm, label,
                                    strm_type)
                else:
                    guiTools.addDir(label, file, 101, thumbnail, fanart,
                                    description, '', '', '')
Exemplo n.º 6
0
def fillPluginItems(
    url, media_type="video", file_type=False, strm=False, strm_name="", strm_type="Other", showtitle="None"
):
    utils.addon_log("fillPluginItems")

    if not file_type:
        detail = stringUtils.uni(jsonUtils.requestList(url, media_type))
        listLength = len(detail)
    else:
        detail = stringUtils.uni(jsonUtils.requestItem(url, media_type))

    if strm_type.find("Cinema") != -1:
        addMovies(detail, strm_name, strm_type)
        return
    if strm_type.find("TV-Show") != -1:
        addTVShows(detail, strm_name, strm_type)
        return
    if strm_type.find("Shows-Collection") != -1:
        getTVShowFromList(detail, strm_name, strm_type)
        return
    #     if strm_type.find('YouTube') != -1:
    #
    #         video = pafy.new(url)
    #         bestaudio = video.getbestaudio()
    #         bestaudio.bitrate #get bit rate
    #         bestaudio.extension #extension of audio fileurl
    #
    #         bestaudio.url #get url
    #
    #         #download if you want
    #         bestaudio.download()
    #         return

    for f in detail:
        files = re.search('"file" *: *"(.*?)",', f)
        filetypes = re.search('"filetype" *: *"(.*?)",', f)
        labels = re.search('"label" *: *"(.*?)",', f)
        thumbnails = re.search('"thumbnail" *: *"(.*?)",', f)
        fanarts = re.search('"fanart" *: *"(.*?)",', f)
        descriptions = re.search('"description" *: *"(.*?)",', f)

        if filetypes and labels and files:
            filetype = filetypes.group(1)
            label = stringUtils.cleanLabels(labels.group(1))
            file = files.group(1).replace("\\\\", "\\")
            strm_name = str(utils.multiple_reSub(strm_name.rstrip(), dictReplacements))

            if not descriptions:
                description = ""
            else:
                description = stringUtils.cleanLabels(descriptions.group(1))

            thumbnail = thumbnails.group(1)  # stringUtils.removeNonAscii(thumbnails.group(1))
            fanart = fanarts.group(1)  # stringUtils.removeNonAscii(fanarts.group(1))

            if addon.getSetting("Link_Type") == "0":
                link = (
                    sys.argv[0]
                    + "?url="
                    + urllib.quote_plus(file)
                    + "&mode="
                    + str(10)
                    + "&name="
                    + urllib.quote_plus(label)
                    + "&fanart="
                    + urllib.quote_plus(fanart)
                )
            else:
                link = file

            if strm_type.find("TV(") != -1:
                path = os.path.join(strm_type, strm_name)
                filename = str(label)

            if strm_type.find("Movie") != -1:
                path = os.path.join(strm_type, strm_name)
                filename = str(label)

            if strm_type in ["Audio-Album"]:
                path = os.path.join(strm_type, strm_name)
                try:
                    album = re.search('"album" *: *"(.*?)",', f).group(1)
                    try:
                        artist = re.search('"artist" *: *"(.*?)",', f).group(1)
                    except:
                        artist = re.search('"artist"*:*."(.*?)".,', f).group(1)
                    pass
                    titl = re.search('"title" *: *(.*?),', f).group(1)
                    types = re.search('"type" *: *(.*?),', f).group(1)
                    filename = str(strm_name + " - " + label)
                except:
                    filename = str(strm_name + " - " + label)

            if strm_type in ["Audio-Single"]:
                path = os.path.join("Singles", str(strm_name))
                try:
                    album = re.search('"album" *: *"(.*?)",', f).group(1)
                    try:
                        artist = re.search('"artist" *: *"(.*?)",', f).group(1)
                    except:
                        artist = re.search('"artist"*:*."(.*?)".,', f).group(1)
                    pass
                    titl = re.search('"title" *: *(.*?),', f).group(1)
                    types = re.search('"type" *: *(.*?),', f).group(1)
                    filename = str(strm_name + " - " + label)
                except:
                    filename = str(strm_name + " - " + label)

            if strm_type in ["Other"]:
                path = os.path.join("Other", strm_name)
                filename = str(strm_name + " - " + label)

            if filetype == "file":
                if strm:
                    if strm_type == "Audio-Album":
                        utils.addon_log(str(path + " " + filename))
                        utils.createSongNFO(
                            stringUtils.cleanStrms((path.rstrip("."))),
                            stringUtils.cleanStrms(filename.rstrip(".")),
                            strm_ty=strm_type,
                            artists=artist,
                            albums=album,
                            titls=titl,
                            typese=types,
                        )
                    # xbmc.executebuiltin('Notification(%s, %s, %d, %s)'%(path + " - " + filename, " writing...",5000,""))
                    fileSys.writeSTRM(
                        stringUtils.cleanStrms((path.rstrip("."))), stringUtils.cleanStrms(filename.rstrip(".")), link
                    )
                else:
                    guiTools.addLink(
                        label, file, 10, thumbnail, fanart, description, "", "", "", None, "", total=len(detail)
                    )
                    # xbmc.executebuiltin("Container.SetViewMode(500)")
            else:
                if strm:
                    fillPluginItems(file, media_type, file_type, strm, label, strm_type)
                else:
                    guiTools.addDir(label, file, 101, thumbnail, fanart, description, "", "", "")