コード例 #1
0
def removeItemsFromMediaList(action='list'):
    utils.addon_log('removingitemsdialog')

    selectedItems = getMediaListDialog()

    if selectedItems is not None:
        fileSys.removeMediaList(selectedItems)
        selectedLabels = [stringUtils.getStrmname(item.split('|')[1]) for item in selectedItems]
        xbmcgui.Dialog().notification("Finished deleting:", "{0}".format(", ".join(label for label in selectedLabels)))
コード例 #2
0
ファイル: create.py プロジェクト: kodinerds/repo
def removeItemsFromMediaList(action="list"):
    utils.addon_log("removingitemsdialog")
    thelist = fileSys.readMediaList(purge=False)
    items = [((thelist[i]).strip().split("|")[1]).format(i) for i in range(len(thelist))]
    dialog = dialoge.MultiChoiceDialog("Select items", items)
    dialog.doModal()

    fileSys.removeMediaList(dialog.selected, dictReplacements)

    xbmcgui.Dialog().notification("Finished deleting:", "{0}".format(str(dialog.selectedLabels)))
    del dialog
コード例 #3
0
ファイル: create.py プロジェクト: kiliantv/repo
def removeItemsFromMediaList(action='list'):
    utils.addon_log('removingitemsdialog')
    thelist = fileSys.readMediaList(purge=False)
    items = [((thelist[i]).strip().split('|')[1]).format(i)
             for i in range(len(thelist))]
    dialog = dialoge.MultiChoiceDialog("Select items", items)
    dialog.doModal()

    fileSys.removeMediaList(dialog.selected, dictReplacements)

    xbmcgui.Dialog().notification("Finished deleting:",
                                  "{0}".format(str(dialog.selectedLabels)))
    del dialog