Ejemplo n.º 1
0
def clearSaved(who, over=False):
    if who == 'all':
        for debrid in DEBRIDID:
            clearSaved(debrid, True)
    elif DEBRIDID[who]:
        file = DEBRIDID[who]['file']
        if os.path.exists(file):
            os.remove(file)
            wiz.LogNotify(
                '[COLOR %s]%s[/COLOR]' % (COLOR1, DEBRIDID[who]['name']),
                '[COLOR %s]Real Debrid Info: Removed![/COLOR]' % COLOR2, 2000,
                DEBRIDID[who]['icon'])
        wiz.setS(DEBRIDID[who]['saved'], '')
    if over == False: wiz.refresh()
Ejemplo n.º 2
0
def clearSaved(who, over=False):
    if who == 'all':
        for trakt in TRAKTID:
            clearSaved(trakt, True)
    elif TRAKTID[who]:
        file = TRAKTID[who]['file']
        if os.path.exists(file):
            os.remove(file)
            wiz.LogNotify(
                "[COLOR %s]%s[/COLOR]" % (COLOR1, TRAKTID[who]['name']),
                '[COLOR %s]Trakt Info: Removed![/COLOR]' % COLOR2, 2000,
                TRAKTID[who]['icon'])
        wiz.setS(TRAKTID[who]['saved'], '')
    if over == False: wiz.refresh()
Ejemplo n.º 3
0
def activateDebrid(who):
    if DEBRIDID[who]:
        if os.path.exists(DEBRIDID[who]['path']):
            act = DEBRIDID[who]['activate']
            addonid = wiz.addonId(DEBRIDID[who]['plugin'])
            if act == '': addonid.openSettings()
            else: url = xbmc.executebuiltin(DEBRIDID[who]['activate'])
        else:
            DIALOG.ok("[COLOR %s]%s[/COLOR]" % (COLOR1, ADDONTITLE),
                      '%s is not currently installed.' % DEBRIDID[who]['name'])
    else:
        wiz.refresh()
        return
    check = 0
    while debridUser(who) == None:
        if check == 30: break
        check += 1
        time.sleep(10)
    wiz.refresh()
Ejemplo n.º 4
0
                    match = wiz.parseDOM(line, 'setting', ret='id')
                    if len(match) == 0: f.write(line)
                    else:
                        if match[0] not in data: f.write(line)
                        else:
                            wiz.log('Removing Line: %s' % line, xbmc.LOGNOTICE)
                f.close()
                wiz.LogNotify(
                    "[COLOR %s]%s[/COLOR]" % (COLOR1, name),
                    '[COLOR %s]Addon Data: Cleared![/COLOR]' % COLOR2, 2000,
                    icon)
            except Exception, e:
                wiz.log(
                    "[Trakt Info] Unable to Clear Addon %s (%s)" %
                    (who, str(e)), xbmc.LOGERROR)
    wiz.refresh()


def autoUpdate(who):
    if who == 'all':
        for log in DEBRIDID:
            if os.path.exists(DEBRIDID[log]['path']):
                autoUpdate(log)
    elif DEBRIDID[who]:
        if os.path.exists(DEBRIDID[who]['path']):
            u = debridUser(who)
            su = wiz.getS(DEBRIDID[who]['saved'])
            n = DEBRIDID[who]['name']
            if u == None or u == '': return
            elif su == '': debridIt('update', who)
            elif not u == su: