Ejemplo n.º 1
0
def updateDebrid(do, who):
    file = DEBRIDID[who]['file']
    settings = DEBRIDID[who]['settings']
    data = DEBRIDID[who]['data']
    addonid = wiz.addonId(DEBRIDID[who]['plugin'])
    saved = DEBRIDID[who]['saved']
    default = DEBRIDID[who]['default']
    user = addonid.getSetting(default)
    suser = wiz.getS(saved)
    name = DEBRIDID[who]['name']
    icon = DEBRIDID[who]['icon']

    if do == 'update':
        if not user == '':
            try:
                with open(file, 'w') as f:
                    for debrid in data:
                        f.write(
                            '<debrid>\n\t<id>%s</id>\n\t<value>%s</value>\n</debrid>\n'
                            % (debrid, addonid.getSetting(debrid)))
                    f.close()
                user = addonid.getSetting(default)
                wiz.setS(saved, user)
                wiz.LogNotify("[COLOR %s]%s[/COLOR]" % (COLOR1, name),
                              '[COLOR %s]Debrid Info: Saved![/COLOR]' % COLOR2,
                              2000, icon)
            except Exception, e:
                wiz.log(
                    "[Debrid Info] Unable to Update %s (%s)" % (who, str(e)),
                    xbmc.LOGERROR)
        else:
            wiz.LogNotify(
                "[COLOR %s]%s[/COLOR]" % (COLOR1, name),
                '[COLOR %s]Debrid Info: Not Registered![/COLOR]' % COLOR2,
                2000, icon)
Ejemplo n.º 2
0
def debridIt(do, who):
    if not os.path.exists(ADDONDATA): os.makedirs(ADDONDATA)
    if not os.path.exists(REALFOLD): os.makedirs(REALFOLD)
    if who == 'all':
        for log in ORDER:
            if os.path.exists(DEBRIDID[log]['path']):
                try:
                    addonid = wiz.addonId(DEBRIDID[log]['plugin'])
                    default = DEBRIDID[log]['default']
                    user = addonid.getSetting(default)
                    if user == '' and do == 'update': continue
                    updateDebrid(do, log)
                except:
                    pass
            else:
                wiz.log(
                    '[Debrid Info] %s(%s) is not installed' %
                    (DEBRIDID[log]['name'], DEBRIDID[log]['plugin']),
                    xbmc.LOGERROR)
        wiz.setS('debridlastsave', str(THREEDAYS))
    else:
        if DEBRIDID[who]:
            if os.path.exists(DEBRIDID[who]['path']):
                updateDebrid(do, who)
        else:
            wiz.log('[Debrid Info] Invalid Entry: %s' % who, xbmc.LOGERROR)
Ejemplo n.º 3
0
def updateTrakt(do, who):
	file      = TRAKTID[who]['file']
	settings  = TRAKTID[who]['settings']
	data      = TRAKTID[who]['data']
	addonid   = wiz.addonId(TRAKTID[who]['plugin'])
	saved     = TRAKTID[who]['saved']
	default   = TRAKTID[who]['default']
	user      = addonid.getSetting(default)
	suser     = wiz.getS(saved)
	name      = TRAKTID[who]['name']
	icon      = TRAKTID[who]['icon']

	if do == 'update':
		if not user == '':
			try:
				with open(file, 'w') as f:
					for trakt in data:
						f.write('<trakt>\n\t<id>%s</id>\n\t<value>%s</value>\n</trakt>\n' % (trakt, addonid.getSetting(trakt)))
					f.close()
				user = addonid.getSetting(default)
				wiz.setS(saved, user)
				wiz.LogNotify("[COLOR %s]%s[/COLOR]" % (COLOR1, name), '[COLOR %s]Trakt Data: Saved![/COLOR]' % COLOR2, 2000, icon)
			except Exception, e:
				wiz.log("[Trakt Data] Unable to Update %s (%s)" % (who, str(e)), xbmc.LOGERROR)
		else: wiz.LogNotify("[COLOR %s]%s[/COLOR]" % (COLOR1, name), '[COLOR %s]Trakt Data: Not Registered![/COLOR]' % COLOR2, 2000, icon)
Ejemplo n.º 4
0
def updateDebrid(do, who):
	file      = DEBRIDID[who]['file']
	settings  = DEBRIDID[who]['settings']
	data      = DEBRIDID[who]['data']
	addonid   = wiz.addonId(DEBRIDID[who]['plugin'])
	saved     = DEBRIDID[who]['saved']
	default   = DEBRIDID[who]['default']
	user      = addonid.getSetting(default)
	suser     = wiz.getS(saved)
	name      = DEBRIDID[who]['name']
	icon      = DEBRIDID[who]['icon']

	if do == 'update':
		if not user == '':
			try:
				with open(file, 'w') as f:
					for debrid in data: 
						f.write('<debrid>\n\t<id>%s</id>\n\t<value>%s</value>\n</debrid>\n' % (debrid, addonid.getSetting(debrid)))
					f.close()
				user = addonid.getSetting(default)
				wiz.setS(saved, user)
				wiz.LogNotify("[COLOR %s]%s[/COLOR]" % (COLOR1, name), '[COLOR %s]Datos de Real Debrid: Guardados![/COLOR]' % COLOR2, 2000, icon)
			except Exception, e:
				wiz.log("[Real Debrid Data] Unable to Update %s (%s)" % (who, str(e)), xbmc.LOGERROR)
		else: wiz.LogNotify("[COLOR %s]%s[/COLOR]" % (COLOR1, name), '[COLOR %s]Datos de Real Debrid: No registrado![/COLOR]' % COLOR2, 2000, icon)
def updateAlluc(do, who):
    file = ALLUCID[who]['file']
    settings = ALLUCID[who]['settings']
    data = ALLUCID[who]['data']
    addonid = wiz.addonId(ALLUCID[who]['plugin'])
    saved = ALLUCID[who]['saved']
    default = ALLUCID[who]['default']
    user = addonid.getSetting(default)
    suser = wiz.getS(saved)
    name = ALLUCID[who]['name']
    icon = ALLUCID[who]['icon']

    if do == 'update':
        if not user == '':
            try:
                with open(file, 'w') as f:
                    for alluc in data:
                        f.write(
                            '<alluc>\n\t<id>%s</id>\n\t<value>%s</value>\n</alluc>\n'
                            % (alluc, addonid.getSetting(alluc)))
                    f.close()
                user = addonid.getSetting(default)
                wiz.setS(saved, user)
                wiz.LogNotify("[COLOR %s]%s[/COLOR]" % (COLOR1, name),
                              '[COLOR %s]Alluc Data: Saved![/COLOR]' % COLOR2,
                              2000, icon)
            except Exception, e:
                wiz.log(
                    "[Alluc Data] Unable to Update %s (%s)" % (who, str(e)),
                    xbmc.LOGERROR)
        else:
            wiz.LogNotify(
                "[COLOR %s]%s[/COLOR]" % (COLOR1, name),
                '[COLOR %s]Alluc Data: Not Registered![/COLOR]' % COLOR2, 2000,
                icon)
def allucIt(do, who):
    if not os.path.exists(ADDONDATA): os.makedirs(ADDONDATA)
    if not os.path.exists(ALLUCFOLD): os.makedirs(ALLUCFOLD)
    if who == 'all':
        for log in ORDER:
            if os.path.exists(ALLUCID[log]['path']):
                try:
                    addonid = wiz.addonId(ALLUCID[log]['plugin'])
                    default = ALLUCID[log]['default']
                    user = addonid.getSetting(default)
                    if user == '' and do == 'update': continue
                    updateAlluc(do, log)
                except:
                    pass
            else:
                wiz.log(
                    '[Alluc Data] %s(%s) is not installed' %
                    (ALLUCID[log]['name'], ALLUCID[log]['plugin']),
                    xbmc.LOGERROR)
        wiz.setS('alluclastsave', str(THREEDAYS))
    else:
        if ALLUCID[who]:
            if os.path.exists(ALLUCID[who]['path']):
                updateAlluc(do, who)
        else:
            wiz.log('[Alluc Data] Invalid Entry: %s' % who, xbmc.LOGERROR)
Ejemplo n.º 7
0
def traktUser(who):
	user=None
	if who == 'exodus'       and os.path.exists(PATHEXODUS):     ADD_EXODUS       = wiz.addonId(EXODUS);       user = ADD_EXODUS.getSetting('trakt.user')
	if who == 'velocity'     and os.path.exists(PATHVELOCITY):   ADD_VELOCITY     = wiz.addonId(VELOCITY);     user = ADD_VELOCITY.getSetting('trakt_username')
	if who == 'velocitykids' and os.path.exists(PATHVELOCITYKI): ADD_VELOCITYKIDS = wiz.addonId(VELOCITYKIDS); user = ADD_VELOCITYKIDS.getSetting('trakt_username')
	if who == 'salts'        and os.path.exists(PATHSALTS):      ADD_SALTS        = wiz.addonId(SALTS);        user = ADD_SALTS.getSetting('trakt_user')
	if who == 'saltshd'      and os.path.exists(PATHSALTSHD):    ADD_SALTSHD      = wiz.addonId(SALTSHD);      user = ADD_SALTSHD.getSetting('trakt_user')
	if who == 'royalwe'      and os.path.exists(PATHROYALWE):    ADD_ROYALWE      = wiz.addonId(ROYALWE);      user = ADD_ROYALWE.getSetting('trakt_account')
	if who == 'specto'       and os.path.exists(PATHSPECTO):     ADD_SPECTO       = wiz.addonId(SPECTO);       user = ADD_SPECTO.getSetting('trakt.user')
	if who == 'trakt'        and os.path.exists(PATHTRAKT):      ADD_TRAKT        = wiz.addonId(TRAKT);        user = ADD_TRAKT.getSetting('user')
	return user
Ejemplo n.º 8
0
def loginUser(who):
	user=None
	if LOGINID[who]:
		if os.path.exists(LOGINID[who]['path']):
			try:
				add = wiz.addonId(LOGINID[who]['plugin'])
				user = add.getSetting(LOGINID[who]['default'])
			except:
				pass
	return user
Ejemplo n.º 9
0
def debridUser(who):
    user = None
    if DEBRIDID[who]:
        if os.path.exists(DEBRIDID[who]['path']):
            try:
                add = wiz.addonId(DEBRIDID[who]['plugin'])
                user = add.getSetting(DEBRIDID[who]['default'])
            except:
                pass
    return user
Ejemplo n.º 10
0
def debridUser(who):
	user=None
	if DEBRIDID[who]:
		if os.path.exists(DEBRIDID[who]['path']):
			try:
				add = wiz.addonId(DEBRIDID[who]['plugin'])
				user = add.getSetting(DEBRIDID[who]['default'])
			except:
				pass
	return user
Ejemplo n.º 11
0
def traktUser(who):
	user=None
	if TRAKTID[who]:
		if os.path.exists(TRAKTID[who]['path']):
			try:
				add = wiz.addonId(TRAKTID[who]['plugin'])
				user = add.getSetting(TRAKTID[who]['default'])
			except:
				return None
	return user
Ejemplo n.º 12
0
def loginUser(who):
    user = None
    if LOGINID[who]:
        if os.path.exists(LOGINID[who]['path']):
            try:
                add = wiz.addonId(LOGINID[who]['plugin'])
                user = add.getSetting(LOGINID[who]['default'])
            except:
                pass
    return user
Ejemplo n.º 13
0
def traktUser(who):
    user = None
    if TRAKTID[who]:
        if os.path.exists(TRAKTID[who]['path']):
            try:
                add = wiz.addonId(TRAKTID[who]['plugin'])
                user = add.getSetting(TRAKTID[who]['default'])
            except:
                return None
    return user
def allucUser(who):
    user = None
    if ALLUCID[who]:
        if os.path.exists(ALLUCID[who]['path']):
            try:
                add = wiz.addonId(ALLUCID[who]['plugin'])
                user = add.getSetting(ALLUCID[who]['default'])
            except:
                pass
    return user
Ejemplo n.º 15
0
def updateDebrid(do, who):
	file      = DEBRIDID[who]['file']
	settings  = DEBRIDID[who]['settings']
	data      = DEBRIDID[who]['data']
	addonid   = wiz.addonId(DEBRIDID[who]['plugin'])
	saved     = DEBRIDID[who]['saved']
	default   = DEBRIDID[who]['default']
	user      = addonid.getSetting(default)
	suser     = wiz.getS(saved)
	name      = DEBRIDID[who]['name']
	icon      = DEBRIDID[who]['icon']

	if do == 'update':
		if not user == '':
			with open(file, 'w') as f:
				for debrid in data: f.write('<debrid>\n\t<id>%s</id>\n\t<value>%s</value>\n</debrid>\n' % (debrid, addonid.getSetting(debrid)))
			f.close()
			user = addonid.getSetting(default)
			wiz.setS(saved, user)
			wiz.LogNotify(name,'Real Debrid Data: [COLOR green]Saved![/COLOR]', 2000, icon)
		else: wiz.LogNotify(name,'Real Debrid Data: [COLOR red]Not Registered![/COLOR]', 2000, icon)
	elif do == 'restore':
		if os.path.exists(file):
			f = open(file,mode='r'); g = f.read().replace('\n','').replace('\r','').replace('\t',''); f.close();
			match = re.compile('<debrid><id>(.+?)</id><value>(.+?)</value></debrid>').findall(g)
			if len(match) > 0:
				for debrid, value in match:
					addonid.setSetting(debrid, value)
			user = addonid.getSetting(default)
			wiz.setS(saved, user)
			wiz.LogNotify(name,'Real Debrid: [COLOR green]Restored![/COLOR]', 2000, icon)
		#else: wiz.LogNotify(name,'Real Debrid Data: [COLOR red]Not Found![/COLOR]', 2000, icon)
	elif do == 'clearaddon':
		wiz.log('%s SETTINGS: %s' % (name, settings))
		if os.path.exists(settings):
			f = open(settings,"r"); lines = f.readlines(); f.close()
			f = open(settings,"w")
			for line in lines:
				match = re.compile('<setting.+?id="(.+?)".+?/>').findall(line)
				if len(match) == 0: f.write(line)
				elif match[0] not in data: f.write(line)
				else: wiz.log('[Debrid Clear Addon] Removing Line: %s' % line)
			f.close()
			wiz.LogNotify(name,'Addon Data: [COLOR green]Cleared![/COLOR]', 2000, icon)
		else: wiz.LogNotify(name,'Addon Data: [COLOR red]Clear Failed![/COLOR]', 2000, icon)
	xbmc.executebuiltin('Container.Refresh')
Ejemplo n.º 16
0
def activateTrakt(who):
	if TRAKTID[who]:
		if os.path.exists(TRAKTID[who]['path']): 
			act     = TRAKTID[who]['activate']
			addonid = wiz.addonId(TRAKTID[who]['plugin'])
			if act == '': addonid.openSettings()
			else: url = xbmc.executebuiltin(TRAKTID[who]['activate'])
		else: DIALOG.ok(ADDONTITLE, '%s is not currently installed.' % TRAKTID[who]['name'])
	else: 
		xbmc.executebuiltin('Container.Refresh')
		return
	check = 0
	while traktUser(who) == None:
		if check == 30: break
		check += 1
		time.sleep(10)
	xbmc.executebuiltin('Container.Refresh')
Ejemplo n.º 17
0
def updateTrakt(do, who):
	file      = TRAKTID[who]['file']
	settings  = TRAKTID[who]['settings']
	data      = TRAKTID[who]['data']
	addonid   = wiz.addonId(TRAKTID[who]['plugin'])
	saved     = TRAKTID[who]['saved']
	default   = TRAKTID[who]['default']
	user      = addonid.getSetting(default)
	suser     = wiz.getS(saved)
	name      = TRAKTID[who]['name']
	icon      = TRAKTID[who]['icon']

	if do == 'update':
		if not user == '':
			with open(file, 'w') as f:
				for trakt in data: f.write('<trakt>\n\t<id>%s</id>\n\t<value>%s</value>\n</trakt>\n' % (trakt, addonid.getSetting(trakt)))
			f.close()
			user = addonid.getSetting(default)
			wiz.setS(saved, user)
			wiz.LogNotify(name,'Trakt Data: [COLOR green]Saved![/COLOR]', 2000, icon)
		else: wiz.LogNotify(name,'Trakt Data: [COLOR red]Not Registered![/COLOR]', 2000, icon)
	elif do == 'restore':
		if os.path.exists(file):
			f = open(file,mode='r'); g = f.read().replace('\n','').replace('\r','').replace('\t',''); f.close();
			match = re.compile('<trakt><id>(.+?)</id><value>(.+?)</value></trakt>').findall(g)
			if len(match) > 0:
				for trakt, value in match:
					addonid.setSetting(trakt, value)
			user = addonid.getSetting(default)
			wiz.setS(saved, user)
			wiz.LogNotify(name,'Trakt: [COLOR green]Restored![/COLOR]', 2000, icon)
		#else: wiz.LogNotify(name,'Trakt Data: [COLOR red]Not Found![/COLOR]', 2000, icon)
	elif do == 'clearaddon':
		wiz.log('%s SETTINGS: %s' % (name, settings))
		if os.path.exists(settings):
			f = open(set,"r"); lines = f.readlines(); f.close()
			f = open(settings,"w")
			for line in lines:
				match = re.compile('<setting.+?id="(.+?)".+?/>').findall(line)
				if len(match) == 0: f.write(line)
				elif match[0] not in data: f.write(line)
				else: wiz.log('Removing Line: %s' % line)
			f.close()
			wiz.LogNotify(name,'Addon Data: [COLOR green]Cleared![/COLOR]', 2000, icon)
		else: wiz.LogNotify(name,'Addon Data: [COLOR red]Clear Failed![/COLOR]', 2000, icon)
	xbmc.executebuiltin('Container.Refresh')
Ejemplo n.º 18
0
def activateTrakt(who):
	if TRAKTID[who]:
		if os.path.exists(TRAKTID[who]['path']):
			act     = TRAKTID[who]['activate']
			addonid = wiz.addonId(TRAKTID[who]['plugin'])
			if act == '': addonid.openSettings()
			else: url = xbmc.executebuiltin(TRAKTID[who]['activate'])
		else: DIALOG.ok(ADDONTITLE, '%s is not currently installed.' % TRAKTID[who]['name'])
	else:
		wiz.refresh()
		return
	check = 0
	while traktUser(who) == None:
		if check == 30: break
		check += 1
		time.sleep(10)
	wiz.refresh()
Ejemplo n.º 19
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(ADDONTITLE, '%s no esta actualmente instalado.' % 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.º 20
0
def updateDebrid(do, who):
	file      = DEBRIDID[who]['file']
	settings  = DEBRIDID[who]['settings']
	data      = DEBRIDID[who]['data']
	addonid   = wiz.addonId(DEBRIDID[who]['plugin'])
	saved     = DEBRIDID[who]['saved']
	default   = DEBRIDID[who]['default']
	user      = addonid.getSetting(default)
	suser     = wiz.getS(saved)
	name      = DEBRIDID[who]['name']
	icon      = DEBRIDID[who]['icon']

	if do == 'update':
		if not user == '':
			with open(file, 'w') as f:
				for debrid in data: f.write('<debrid>\n\t<id>%s</id>\n\t<value>%s</value>\n</debrid>\n' % (debrid, addonid.getSetting(debrid)))
			f.close()
			user = addonid.getSetting(default)
			wiz.setS(saved, user)
			wiz.LogNotify("[COLOR %s]%s[/COLOR]" % (COLOR1, name), '[COLOR %s]Real Debrid Data: Saved![/COLOR]' % COLOR2, 2000, icon)
		else: wiz.LogNotify("[COLOR %s]%s[/COLOR]" % (COLOR1, name), '[COLOR %s]Real Debrid Data: Not Registered![/COLOR]' % COLOR2, 2000, icon)
	elif do == 'restore':
		if os.path.exists(file):
			f = open(file,mode='r'); g = f.read().replace('\n','').replace('\r','').replace('\t',''); f.close();
			match = re.compile('<debrid><id>(.+?)</id><value>(.+?)</value></debrid>').findall(g)
			if len(match) > 0:
				for debrid, value in match:
					addonid.setSetting(debrid, value)
			user = addonid.getSetting(default)
			wiz.setS(saved, user)
			wiz.LogNotify("[COLOR %s]%s[/COLOR]" % (COLOR1, name), '[COLOR %s]Real Debrid: Restored![/COLOR]' % COLOR2, 2000, icon)
		#else: wiz.LogNotify(name,'Real Debrid Data: [COLOR red]Not Found![/COLOR]', 2000, icon)
	elif do == 'clearaddon':
		wiz.log('%s SETTINGS: %s' % (name, settings), xbmc.LOGDEBUG)
		if os.path.exists(settings):
			f = open(settings,"r"); lines = f.readlines(); f.close()
			f = open(settings,"w")
			for line in lines:
				match = re.compile('<setting.+?id="(.+?)".+?/>').findall(line)
				if len(match) == 0: f.write(line)
				elif match[0] not in data: f.write(line)
				else: wiz.log('[Debrid Clear Addon] 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)
		else: wiz.LogNotify("[COLOR %s]%s[/COLOR]" % (COLOR1, name), '[COLOR %s]Addon Data: Clear Failed![/COLOR]' % COLOR2, 2000, icon)
	wiz.refresh()
Ejemplo n.º 21
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(ADDONTITLE, '%s is not currently installed.' % DEBRIDID[who]['name'])
	else: 
		xbmc.executebuiltin('Container.Refresh')
		return
	check = 0
	while debridUser(who) == None:
		if check == 30: break
		check += 1
		time.sleep(10)
	xbmc.executebuiltin('Container.Refresh')
Ejemplo n.º 22
0
def activateLogin(who):
	if LOGINID[who]:
		if os.path.exists(LOGINID[who]['path']): 
			act     = LOGINID[who]['activate']
			addonid = wiz.addonId(LOGINID[who]['plugin'])
			if act == '': addonid.openSettings()
			else: url = xbmc.executebuiltin(LOGINID[who]['activate'])
		else: DIALOG.ok(ADDONTITLE, '%s no esta instalado.' % LOGINID[who]['name'])
	else: 
		wiz.refresh()
		return
	check = 0
	while loginUser(who) == None or loginUser(who) == "":
		if check == 30: break
		check += 1
		time.sleep(10)
	wiz.refresh()
Ejemplo n.º 23
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(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.º 24
0
def activateTrakt(who):
	if TRAKTID[who]:
		if os.path.exists(TRAKTID[who]['path']): 
			act     = TRAKTID[who]['activate']
			addonid = wiz.addonId(TRAKTID[who]['plugin'])
			if act == '': addonid.openSettings()
			else: url = xbmc.executebuiltin(TRAKTID[who]['activate'])
		else: DIALOG.ok(ADDONTITLE, '%s no esta actualmente instalado.' % TRAKTID[who]['name'])
	else: 
		wiz.refresh()
		return
	check = 0
	while traktUser(who) == None:
		if check == 30: break
		check += 1
		time.sleep(10)
	wiz.refresh()
Ejemplo n.º 25
0
def activateLogin(who):
    if LOGINID[who]:
        if os.path.exists(LOGINID[who]['path']):
            act = LOGINID[who]['activate']
            addonid = wiz.addonId(LOGINID[who]['plugin'])
            if act == '': addonid.openSettings()
            else: url = xbmc.executebuiltin(LOGINID[who]['activate'])
        else:
            DIALOG.ok("[COLOR %s]%s[/COLOR]" % (COLOR1, ADDONTITLE),
                      '%s is not currently installed.' % LOGINID[who]['name'])
    else:
        wiz.refresh()
        return
    check = 0
    while loginUser(who) == None or loginUser(who) == "":
        if check == 30: break
        check += 1
        time.sleep(10)
    wiz.refresh()
Ejemplo n.º 26
0
def traktIt(do, who):
	if not os.path.exists(ADDONDATA): os.makedirs(ADDONDATA)
	if not os.path.exists(TRAKTFOLD): os.makedirs(TRAKTFOLD)
	if who == 'all':
		for log in ORDER:
			if os.path.exists(TRAKTID[log]['path']):
				try:
					addonid   = wiz.addonId(TRAKTID[log]['plugin'])
					default   = TRAKTID[log]['default']
					user      = addonid.getSetting(default)
					if user == '' and do == 'update': continue
					updateTrakt(do, log)
				except: pass
			else: wiz.log('[Trakt Data] %s(%s) is not installed' % (TRAKTID[log]['name'],TRAKTID[log]['plugin']), xbmc.LOGERROR)
		wiz.setS('traktlastsave', str(THREEDAYS))
	else:
		if TRAKTID[who]:
			if os.path.exists(TRAKTID[who]['path']):
				updateTrakt(do, who)
		else: wiz.log('[Trakt Data] Invalid Entry: %s' % who, xbmc.LOGERROR)
Ejemplo n.º 27
0
def debridIt(do, who):
	if not os.path.exists(ADDONDATA): os.makedirs(ADDONDATA)
	if not os.path.exists(REALFOLD):  os.makedirs(REALFOLD)
	if who == 'all':
		for log in ORDER:
			if os.path.exists(DEBRIDID[log]['path']):
				try:
					addonid   = wiz.addonId(DEBRIDID[log]['plugin'])
					default   = DEBRIDID[log]['default']
					user      = addonid.getSetting(default)
					if user == '' and do == 'update': continue
					updateDebrid(do, log)
				except: pass
			else: wiz.log('[Real Debrid Data] %s(%s) is not installed' % (DEBRIDID[log]['name'],DEBRIDID[log]['plugin']), xbmc.LOGERROR)
		wiz.setS('debridlastsave', str(THREEDAYS))
	else:
		if DEBRIDID[who]:
			if os.path.exists(DEBRIDID[who]['path']):
				updateDebrid(do, who)
		else: wiz.log('[Real Debrid Data] Invalid Entry: %s' % who, xbmc.LOGERROR)
Ejemplo n.º 28
0
def loginIt(do, who):
	if not os.path.exists(ADDONDATA): os.makedirs(ADDONDATA)
	if not os.path.exists(LOGINFOLD):  os.makedirs(LOGINFOLD)
	if who == 'all':
		for log in ORDER:
			if os.path.exists(LOGINID[log]['path']):
				try:
					addonid   = wiz.addonId(LOGINID[log]['plugin'])
					default   = LOGINID[log]['default']
					user      = addonid.getSetting(default)
					if user == '' and do == 'update': continue
					updateLogin(do, log)
				except: pass
			else: wiz.log('[Login Info] %s(%s) is not installed' % (LOGINID[log]['name'],LOGINID[log]['plugin']), xbmc.LOGERROR)
		wiz.setS('loginlastsave', str(THREEDAYS))
	else:
		if LOGINID[who]:
			if os.path.exists(LOGINID[who]['path']):
				updateLogin(do, who)
		else: wiz.log('[Login Info] Invalid Entry: %s' % who, xbmc.LOGERROR)
Ejemplo n.º 29
0
def trakt_VelocityKids(do):
	VELOCITYKIDSFILE  = os.path.join(TRAKTFOLD, 'velocitykids_trakt')
	VELOCITYKSETTINGS = os.path.join(USERDATA, 'addon_data', VELOCITYKIDS,'settings.xml')
	VELOKIDS_TRAKT    = ['trakt_authorized', 'trakt_username', 'trakt_oauth_token', 'trakt_refresh_token']
	ADD_VELOCITYKIDS  = wiz.addonId(VELOCITYKIDS)
	TRAKTVELOCITYKIDS = ADD_VELOCITYKIDS.getSetting('trakt_username')
	if do == 'update':
		if ADD_VELOCITYKIDS.getSetting('trakt_authorized') == 'true':
			with open(VELOCITYKIDSFILE, 'w') as f:
				for trakt in VELOKIDS_TRAKT: f.write('<trakt>\n\t<id>%s</id>\n\t<value>%s</value>\n</trakt>\n' % (trakt, ADD_VELOCITYKIDS.getSetting(trakt)))
			f.closed
			wiz.setS('velocitykids', ADD_VELOCITYKIDS.getSetting('trakt_username'))
			wiz.LogNotify('Velocity Kids','Trakt Data: [COLOR green]Saved![/COLOR]', 2000, os.path.join(PATHVELOCITYKI,'icon.png'))
		else: wiz.LogNotify('Velocity Kids','Trakt Data: [COLOR red]Not Registered![/COLOR]', 2000, os.path.join(PATHVELOCITYKI,'icon.png'))
	elif do == 'restore':
		if os.path.exists(VELOCITYKIDSFILE):
			f = open(VELOCITYKIDSFILE,mode='r'); g = f.read().replace('\n','').replace('\r','').replace('\t',''); f.close();
			match = re.compile('<trakt><id>(.+?)</id><value>(.+?)</value></trakt>').findall(g)
			if len(match) > 0:
				for trakt, value in match:
					ADD_VELOCITYKIDS.setSetting(trakt, value)
				wiz.setS('velocitykids', ADD_VELOCITYKIDS.getSetting('trakt_username'))
			wiz.LogNotify('Velocity Kids','Trakt Data: [COLOR green]Restored![/COLOR]', 2000, os.path.join(PATHVELOCITYKI,'icon.png'))
		else: wiz.LogNotify('Velocity Kids','Trakt Data: [COLOR red]Not Found![/COLOR]', 2000, os.path.join(PATHVELOCITYKI,'icon.png'))
	elif do == 'clearaddon':
		wiz.log('Velocity Kids SETTINGS: %s' % VELOCITYKSETTINGS)
		if os.path.exists(VELOCITYKSETTINGS):
			f = open(VELOCITYKSETTINGS,"r"); lines = f.readlines(); f.close()
			f = open(VELOCITYKSETTINGS,"w")
			for line in lines:
				match = re.compile('<setting.+?id="(.+?)".+?/>').findall(line)
				if len(match) == 0: f.write(line)
				elif match[0] not in VELOKIDS_TRAKT: f.write(line)
				else: wiz.log('Removing Line: %s' % line)
			f.close()
			wiz.LogNotify('Velocity Kids','Addon Data: [COLOR green]Cleared![/COLOR]', 2000, os.path.join(PATHVELOCITYKI,'icon.png'))
		else: wiz.LogNotify('Velocity Kids','Addon Data: [COLOR red]Clear Failed![/COLOR]', 2000, os.path.join(PATHVELOCITYKI,'icon.png'))
	xbmc.executebuiltin('Container.Refresh')
Ejemplo n.º 30
0
def debrid_Url(do):
	URLFILE         = os.path.join(REALFOLD, 'url_debrid')
	URLSETTINGS     = os.path.join(USERDATA, 'addon_data', URLRESOLVER,'settings.xml')
	URL_DEBRID      = ['RealDebridResolver_enabled', 'RealDebridResolver_autopick', 'RealDebridResolver_token', 'RealDebridResolver_refresh', 'RealDebridResolver_client_id', 'RealDebridResolver_client_secret']
	ADD_URL         = wiz.addonId(URLRESOLVER)
	DEBRIDURL       = ADD_URL.getSetting('RealDebridResolver_client_id')
	if do == 'update':
		if not ADD_URL.getSetting('RealDebridResolver_client_id') == '':
			with open(URLFILE, 'w') as f:
				for debrid in URL_DEBRID: f.write('<debrid>\n\t<id>%s</id>\n\t<value>%s</value>\n</debrid>\n' % (debrid, ADD_URL.getSetting(debrid)))
			f.closed
			wiz.setS('urlresolver', ADD_URL.getSetting('RealDebridResolver_client_id'))
			wiz.LogNotify('Url Resolver','Real Debrid Data: [COLOR green]Saved![/COLOR]', 2000, os.path.join(PATHURL,'icon.png'))
		else: wiz.LogNotify('Url Resolver','Real Debrid Data: [COLOR red]Not Registered![/COLOR]', 2000, os.path.join(PATHURL,'icon.png'))
	elif do == 'restore':
		if os.path.exists(URLFILE):
			f = open(URLFILE,mode='r'); g = f.read().replace('\n','').replace('\r','').replace('\t',''); f.close();
			match = re.compile('<debrid><id>(.+?)</id><value>(.+?)</value></debrid>').findall(g)
			if len(match) > 0:
				for debrid, value in match:
					ADD_URL.setSetting(debrid, value)
				wiz.setS('urlresolver', ADD_URL.getSetting('RealDebridResolver_client_id'))
			wiz.LogNotify('Url Resolver','Real Debrid Data: [COLOR green]Restored![/COLOR]', 2000, os.path.join(PATHURL,'icon.png'))
		else: wiz.LogNotify('Url Resolver','Real Debrid Data: [COLOR red]Not Found![/COLOR]', 2000, os.path.join(PATHURL,'icon.png'))
	elif do == 'clearaddon':
		wiz.log('Url Resolver SETTINGS: %s' % URLSETTINGS)
		if os.path.exists(URLSETTINGS):
			f = open(URLSETTINGS,"r"); lines = f.readlines(); f.close()
			f = open(URLSETTINGS,"w")
			for line in lines:
				match = re.compile('<setting.+?id="(.+?)".+?/>').findall(line)
				if len(match) == 0: f.write(line)
				elif match[0] not in URL_DEBRID: f.write(line)
				else: wiz.log('Removing Line: %s' % line)
			f.close()
			wiz.LogNotify('Url Resolver','Addon Data: [COLOR green]Cleared![/COLOR]', 2000, os.path.join(PATHURL,'icon.png'))
		else: wiz.LogNotify('Url Resolver','Addon Data: [COLOR red]Clear Failed![/COLOR]', 2000, os.path.join(PATHURL,'icon.png'))
	xbmc.executebuiltin('Container.Refresh')
Ejemplo n.º 31
0
def trakt_Trakt(do):
	TRAKTFILE       = os.path.join(TRAKTFOLD, 'trakt_trakt')
	TRAKTSETTINGS   = os.path.join(USERDATA, 'addon_data', TRAKT,'settings.xml')
	TRAKT_TRAKT     = ['user', 'Auth_Info', 'authorization']
	ADD_TRAKT       = wiz.addonId(TRAKT)
	TRAKTTRAKT      = ADD_TRAKT.getSetting('user')
	if do == 'update':
		if not ADD_TRAKT.getSetting('user') == '':
			with open(TRAKTFILE, 'w') as f:
				for trakt in TRAKT_TRAKT: f.write('<trakt>\n\t<id>%s</id>\n\t<value>%s</value>\n</trakt>\n' % (trakt, ADD_TRAKT.getSetting(trakt)))
			f.closed
			wiz.setS('trakt', ADD_TRAKT.getSetting('user'))
			wiz.LogNotify('Trakt','Trakt Data: [COLOR green]Saved![/COLOR]', 2000, os.path.join(PATHTRAKT,'icon.png'))
		else: wiz.LogNotify('Trakt','Trakt Data: [COLOR red]Not Registered![/COLOR]', 2000, os.path.join(PATHTRAKT,'icon.png'))
	elif do == 'restore':
		if os.path.exists(TRAKTFILE):
			f = open(TRAKTFILE,mode='r'); g = f.read().replace('\n','').replace('\r','').replace('\t',''); f.close();
			match = re.compile('<trakt><id>(.+?)</id><value>(.+?)</value></trakt>').findall(g)
			if len(match) > 0:
				for trakt, value in match:
					ADD_TRAKT.setSetting(trakt, value)
				wiz.setS('trakt', ADD_TRAKT.getSetting('user'))
			wiz.LogNotify('Trakt','Trakt Data: [COLOR green]Restored![/COLOR]', 2000, os.path.join(PATHTRAKT,'icon.png'))
		else: wiz.LogNotify('Trakt','Trakt Data: [COLOR red]Not Found![/COLOR]', 2000, os.path.join(PATHTRAKT,'icon.png'))
	elif do == 'clearaddon':
		wiz.log('Trakt SETTINGS: %s' % TRAKTSETTINGS)
		if os.path.exists(TRAKTSETTINGS):
			f = open(TRAKTSETTINGS,"r"); lines = f.readlines(); f.close()
			f = open(TRAKTSETTINGS,"w")
			for line in lines:
				match = re.compile('<setting.+?id="(.+?)".+?/>').findall(line)
				if len(match) == 0: f.write(line)
				elif match[0] not in TRAKT_TRAKT: f.write(line)
				else: wiz.log('Removing Line: %s' % line)
			f.close()
			wiz.LogNotify('Specto','Addon Data: [COLOR green]Cleared![/COLOR]', 2000, os.path.join(PATHTRAKT,'icon.png'))
		else: wiz.LogNotify('Specto','Addon Data: [COLOR red]Clear Failed![/COLOR]', 2000, os.path.join(PATHTRAKT,'icon.png'))
	xbmc.executebuiltin('Container.Refresh')
Ejemplo n.º 32
0
def trakt_TheRoyalWe(do):
	ROYALWEFILE     = os.path.join(TRAKTFOLD, 'royalwe_trakt')
	ROYALWESETTINGS = os.path.join(USERDATA, 'addon_data', ROYALWE,'settings.xml')
	ROYAL_TRAKT     = ['trakt_authorized', 'trakt_account', 'trakt_client_id', 'trakt_oauth_token', 'trakt_refresh_token', 'trakt_secret']
	ADD_ROYALWE     = wiz.addonId(ROYALWE)
	TRAKTROYAL      = ADD_ROYALWE.getSetting('trakt_account')
	if do == 'update':
		if ADD_ROYALWE.getSetting('trakt_authorized') == 'true':
			with open(ROYALWEFILE, 'w') as f:
				for trakt in ROYAL_TRAKT: f.write('<trakt>\n\t<id>%s</id>\n\t<value>%s</value>\n</trakt>\n' % (trakt, ADD_ROYALWE.getSetting(trakt)))
			f.closed
			wiz.setS('royalwe', ADD_ROYALWE.getSetting('trakt_account'))
			wiz.LogNotify('The Royal We','Trakt Data: [COLOR green]Saved![/COLOR]', 2000, os.path.join(PATHROYALWE,'icon.png'))
		else: wiz.LogNotify('The Royal We','Trakt Data: [COLOR red]Not Registered![/COLOR]', 2000, os.path.join(PATHROYALWE,'icon.png'))
	elif do == 'restore':
		if os.path.exists(ROYALWEFILE):
			f = open(ROYALWEFILE,mode='r'); g = f.read().replace('\n','').replace('\r','').replace('\t',''); f.close();
			match = re.compile('<trakt><id>(.+?)</id><value>(.+?)</value></trakt>').findall(g)
			if len(match) > 0:
				for trakt, value in match:
					ADD_ROYALWE.setSetting(trakt, value)
				wiz.setS('royalwe', ADD_ROYALWE.getSetting('trakt_account'))
			wiz.LogNotify('The Royal We','Trakt Data: [COLOR green]Restored![/COLOR]', 2000, os.path.join(PATHROYALWE,'icon.png'))
		else: wiz.LogNotify('The Royal We','Trakt Data: [COLOR red]Not Found![/COLOR]', 2000, os.path.join(PATHROYALWE,'icon.png'))
	elif do == 'clearaddon':
		wiz.log('The Royal We SETTINGS: %s' % ROYALWESETTINGS)
		if os.path.exists(ROYALWESETTINGS):
			f = open(ROYALWESETTINGS,"r"); lines = f.readlines(); f.close()
			f = open(ROYALWESETTINGS,"w")
			for line in lines:
				match = re.compile('<setting.+?id="(.+?)".+?/>').findall(line)
				if len(match) == 0: f.write(line)
				elif match[0] not in ROYAL_TRAKT: f.write(line)
				else: wiz.log('Removing Line: %s' % line)
			f.close()
			wiz.LogNotify('The Royal We','Addon Data: [COLOR green]Cleared![/COLOR]', 2000, os.path.join(PATHROYALWE,'icon.png'))
		else: wiz.LogNotify('The Royal We','Addon Data: [COLOR red]Clear Failed![/COLOR]', 2000, os.path.join(PATHROYALWE,'icon.png'))
	xbmc.executebuiltin('Container.Refresh')
Ejemplo n.º 33
0
def debrid_Exodus(do):
	EXODUSFILE      = os.path.join(REALFOLD, 'exodus_debrid')
	EXODUSSETTINGS  = os.path.join(USERDATA, 'addon_data', EXODUS,'settings.xml')
	EXODUS_DEBRID   = ['realdebrid.auth', 'realdebrid.id', 'realdebrid.secret', 'realdebrid.token', 'realdebrid.refresh']
	ADD_EXODUS      = wiz.addonId(EXODUS)
	TRAKTEXODUS     = ADD_EXODUS.getSetting('realdebrid.id')
	if do == 'update':
		if not TRAKTEXODUS == '':
			with open(EXODUSFILE, 'w') as f:
				for debrid in EXODUS_DEBRID: f.write('<debrid>\n\t<id>%s</id>\n\t<value>%s</value>\n</debrid>\n' % (debrid, ADD_EXODUS.getSetting(debrid)))
			f.closed
			wiz.setS('realexodus', ADD_EXODUS.getSetting('realdebrid.id'))
			wiz.LogNotify('Exodus','Real Debrid Data: [COLOR green]Saved![/COLOR]', 2000, os.path.join(PATHEXODUS,'icon.png'))
		else: wiz.LogNotify('Exodus','Real Debrid Data: [COLOR red]Not Registered![/COLOR]', 2000, os.path.join(PATHEXODUS,'icon.png'))
	elif do == 'restore':
		if os.path.exists(EXODUSFILE):
			f = open(EXODUSFILE,mode='r'); g = f.read().replace('\n','').replace('\r','').replace('\t',''); f.close();
			match = re.compile('<debrid><id>(.+?)</id><value>(.+?)</value></debrid>').findall(g)
			if len(match) > 0:
				for debrid, value in match:
					ADD_EXODUS.setSetting(debrid, value)
			wiz.setS('realexodus', ADD_EXODUS.getSetting('realdebrid.id'))
			wiz.LogNotify('Exodus','Real Debrid: [COLOR green]Restored![/COLOR]', 2000, os.path.join(PATHEXODUS,'icon.png'))
		else: wiz.LogNotify('Exodus','Real Debrid Data: [COLOR red]Not Found![/COLOR]', 2000, os.path.join(PATHEXODUS,'icon.png'))
	elif do == 'clearaddon':
		wiz.log('Exodus SETTINGS: %s' % EXODUSSETTINGS)
		if os.path.exists(EXODUSSETTINGS):
			f = open(EXODUSSETTINGS,"r"); lines = f.readlines(); f.close()
			f = open(EXODUSSETTINGS,"w")
			for line in lines:
				match = re.compile('<setting.+?id="(.+?)".+?/>').findall(line)
				if len(match) == 0: f.write(line)
				elif match[0] not in EXODUS_DEBRID: f.write(line)
				else: wiz.log('Removing Line: %s' % line)
			f.close()
			wiz.LogNotify('Exodus','Addon Data: [COLOR green]Cleared![/COLOR]', 2000, os.path.join(PATHEXODUS,'icon.png'))
		else: wiz.LogNotify('Exodus','Addon Data: [COLOR red]Clear Failed![/COLOR]', 2000, os.path.join(PATHEXODUS,'icon.png'))
	xbmc.executebuiltin('Container.Refresh')
Ejemplo n.º 34
0
def debrid_Specto(do):
	SPECTOFILE      = os.path.join(REALFOLD, 'specto_debrid')
	SPECTOSETTINGS  = os.path.join(USERDATA, 'addon_data', SPECTO,'settings.xml')
	SPECTO_DEBRID   = ['realdebrid_auth', 'realdebrid_token', 'realdebrid_refresh', 'realdebrid_client_id', 'realdebrid_client_secret']
	ADD_SPECTO      = wiz.addonId(SPECTO)
	DEBRIDSPECTO    = ADD_SPECTO.getSetting('realdebrid_client_id')
	if do == 'update':
		if not ADD_SPECTO.getSetting('realdebrid_client_id') == '':
			with open(SPECTOFILE, 'w') as f:
				for debrid in SPECTO_DEBRID: f.write('<debrid>\n\t<id>%s</id>\n\t<value>%s</value>\n</debrid>\n' % (debrid, ADD_SPECTO.getSetting(debrid)))
			f.closed
			wiz.setS('realspecto', ADD_SPECTO.getSetting('realdebrid_client_id'))
			wiz.LogNotify('Specto','Real Debrid Data: [COLOR green]Saved![/COLOR]', 2000, os.path.join(PATHSPECTO,'icon.png'))
		else: wiz.LogNotify('Specto','Real Debrid Data: [COLOR red]Not Registered![/COLOR]', 2000, os.path.join(PATHSPECTO,'icon.png'))
	elif do == 'restore':
		if os.path.exists(SPECTOFILE):
			f = open(SPECTOFILE,mode='r'); g = f.read().replace('\n','').replace('\r','').replace('\t',''); f.close();
			match = re.compile('<debrid><id>(.+?)</id><value>(.+?)</value></debrid>').findall(g)
			if len(match) > 0:
				for debrid, value in match:
					ADD_SPECTO.setSetting(debrid, value)
				wiz.setS('realspecto', ADD_SPECTO.getSetting('realdebrid_client_id'))
			wiz.LogNotify('Specto','Real Debrid Data: [COLOR green]Restored![/COLOR]', 2000, os.path.join(PATHSPECTO,'icon.png'))
		else: wiz.LogNotify('Specto','Real Debrid Data: [COLOR red]Not Found![/COLOR]', 2000, os.path.join(PATHSPECTO,'icon.png'))
	elif do == 'clearaddon':
		wiz.log('Specto SETTINGS: %s' % SPECTOSETTINGS)
		if os.path.exists(SPECTOSETTINGS):
			f = open(SPECTOSETTINGS,"r"); lines = f.readlines(); f.close()
			f = open(SPECTOSETTINGS,"w")
			for line in lines:
				match = re.compile('<setting.+?id="(.+?)".+?/>').findall(line)
				if len(match) == 0: f.write(line)
				elif match[0] not in SPECTO_DEBRID: f.write(line)
				else: wiz.log('Removing Line: %s' % line)
			f.close()
			wiz.LogNotify('Specto','Addon Data: [COLOR green]Cleared![/COLOR]', 2000, os.path.join(PATHSPECTO,'icon.png'))
		else: wiz.LogNotify('Specto','Addon Data: [COLOR red]Clear Failed![/COLOR]', 2000, os.path.join(PATHSPECTO,'icon.png'))
	xbmc.executebuiltin('Container.Refresh')
Ejemplo n.º 35
0
def updateTrakt(do, who):
    file = TRAKTID[who]['file']
    settings = TRAKTID[who]['settings']
    data = TRAKTID[who]['data']
    addonid = wiz.addonId(TRAKTID[who]['plugin'])
    saved = TRAKTID[who]['saved']
    default = TRAKTID[who]['default']
    user = addonid.getSetting(default)
    suser = wiz.getS(saved)
    name = TRAKTID[who]['name']
    icon = TRAKTID[who]['icon']

    if do == 'update':
        if not user == '':
            try:
                with open(file, 'w') as f:
                    for trakt in data:
                        f.write(
                            '<trakt>\n\t<id>%s</id>\n\t<value>%s</value>\n</trakt>\n'
                            % (trakt, addonid.getSetting(trakt)))
                    f.close()
                user = addonid.getSetting(default)
                wiz.setS(saved, user)
                wiz.LogNotify(
                    "[COLOR %s]%s[/COLOR]" % (COLOR1, name),
                    '[COLOR %s]Trakt Daten: Gespeichert![/COLOR]' % COLOR2,
                    2000, icon)
            except Exception, e:
                wiz.log(
                    "[Trakt Data] Unable to Update %s (%s)" % (who, str(e)),
                    xbmc.LOGERROR)
        else:
            wiz.LogNotify(
                "[COLOR %s]%s[/COLOR]" % (COLOR1, name),
                '[COLOR %s]Trakt Daten: Nicht registriert![/COLOR]' % COLOR2,
                2000, icon)
Ejemplo n.º 36
0
import os
import uservar
import re
import urllib2
import urlparse
import urllib
import xbmc
import uploader
from uploader import UploaderError
from resources.libs import wizard as wiz

from xbmc import getCondVisibility as condition, translatePath as translate, log as xbmc_log

DIALOG = xbmcgui.Dialog()
AddonID = uservar.ADDON_ID
addon = wiz.addonId(AddonID)
ADDON_TITLE = wiz.addonInfo(AddonID, 'name')
ADDON_VERSION = wiz.addonInfo(AddonID, 'version')
DEBUG = False

STRINGS = {
    'do_upload': 30000,
    'upload_id': 30001,
    'upload_url': 30002,
    'no_email_set': 30003,
    'email_sent': 30004
}
BASE_URL = 'https://logs.tvaddons.ag/'
EXPIRATION = 2592000

REPLACES = (
Ejemplo n.º 37
0
import urllib2, urllib
import re
import zipfile
import uservar
import fnmatch
try:
    from sqlite3 import dbapi2 as database
except:
    from pysqlite2 import dbapi2 as database
from datetime import date, datetime, timedelta
from urlparse import urljoin
from resources.libs import downloader, wizard as wiz

ADDON_ID = uservar.ADDON_ID
ADDONTITLE = uservar.ADDONTITLE
ADDON = wiz.addonId(ADDON_ID)
VERSION = wiz.addonInfo(ADDON_ID, 'version')
ADDONPATH = wiz.addonInfo(ADDON_ID, 'path')
DIALOG = xbmcgui.Dialog()
DP = xbmcgui.DialogProgress()
HOME = xbmc.translatePath('special://home/')
LOG = xbmc.translatePath('special://logpath/')
PROFILE = xbmc.translatePath('special://profile/')
ADDONS = os.path.join(HOME, 'addons')
USERDATA = os.path.join(HOME, 'userdata')
PLUGIN = os.path.join(ADDONS, ADDON_ID)
PACKAGES = os.path.join(ADDONS, 'packages')
ADDOND = os.path.join(USERDATA, 'addon_data')
ADDONDATA = os.path.join(USERDATA, 'addon_data', ADDON_ID)
ADVANCED = os.path.join(USERDATA, 'advancedsettings.xml')
SOURCES = os.path.join(USERDATA, 'sources.xml')
Ejemplo n.º 38
0
import os
import uservar
import re
import urllib2
import urlparse
import urllib
import xbmc
import uploader
from uploader import UploaderError
from resources.libs import wizard as wiz

from xbmc import getCondVisibility as condition, translatePath as translate, log as xbmc_log

DIALOG        = xbmcgui.Dialog()
AddonID       = uservar.ADDON_ID
addon         = wiz.addonId(AddonID)
ADDON_TITLE   = wiz.addonInfo(AddonID,'name')
ADDON_VERSION = wiz.addonInfo(AddonID,'version')
DEBUG         = False

STRINGS = {
	'do_upload': 30000,
	'upload_id': 30001,
	'upload_url': 30002,
	'no_email_set': 30003,
	'email_sent': 30004
}
BASE_URL = 'https://logs.tvaddons.ag/'
EXPIRATION = 2592000

REPLACES = (
Ejemplo n.º 39
0
import xbmc, xbmcaddon, xbmcgui, xbmcplugin, os, sys, xbmcvfs, glob
import shutil
import urllib2,urllib
import re
import uservar
import time
try:    from sqlite3 import dbapi2 as database
except: from pysqlite2 import dbapi2 as database
from datetime import date, datetime, timedelta
from resources.libs import wizard as wiz

ADDON_ID       = uservar.ADDON_ID
ADDONTITLE     = uservar.ADDONTITLE
ADDON          = wiz.addonId(ADDON_ID)
DIALOG         = xbmcgui.Dialog()
HOME           = xbmc.translatePath('special://home/')
ADDONS         = os.path.join(HOME,      'addons')
USERDATA       = os.path.join(HOME,      'userdata')
PLUGIN         = os.path.join(ADDONS,    ADDON_ID)
PACKAGES       = os.path.join(ADDONS,    'packages')
ADDONDATA      = os.path.join(USERDATA,  'addon_data', ADDON_ID)
REALFOLD       = os.path.join(ADDONDATA, 'debrid')
ICON           = os.path.join(PLUGIN,    'icon.png')
TODAY          = date.today()
TOMORROW       = TODAY + timedelta(days=1)
THREEDAYS      = TODAY + timedelta(days=3)
REAL_EXODUS    = wiz.getS('realexodus')
REAL_SPECTO    = wiz.getS('realspecto')
REAL_URL       = wiz.getS('urlresolver')
KEEPTRAKT      = wiz.getS('keepdebrid')
REALSAVE       = wiz.getS('debridlastsave')
Ejemplo n.º 40
0
#  along with XBMC; see the file COPYING.  If not, write to                    #
#  the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.       #
#  http://www.gnu.org/copyleft/gpl.html                                        #
################################################################################

import xbmc, xbmcaddon, xbmcgui, xbmcplugin, os, sys, xbmcvfs, glob
import shutil
import urllib2, urllib
import re
import uservar
from datetime import date, datetime, timedelta
from resources.libs import extract, downloader, notify, loginit, debridit, traktit, skinSwitch, uploadLog, wizard as wiz

ADDON_ID = uservar.ADDON_ID
ADDONTITLE = uservar.ADDONTITLE
ADDON = wiz.addonId(ADDON_ID)
VERSION = wiz.addonInfo(ADDON_ID, 'version')
ADDONPATH = wiz.addonInfo(ADDON_ID, 'path')
ADDONID = wiz.addonInfo(ADDON_ID, 'id')
DIALOG = xbmcgui.Dialog()
DP = xbmcgui.DialogProgress()
HOME = xbmc.translatePath('special://home/')
PROFILE = xbmc.translatePath('special://profile/')
KODIHOME = xbmc.translatePath('special://xbmc/')
ADDONS = os.path.join(HOME, 'addons')
KODIADDONS = os.path.join(KODIHOME, 'addons')
USERDATA = os.path.join(HOME, 'userdata')
PLUGIN = os.path.join(ADDONS, ADDON_ID)
PACKAGES = os.path.join(ADDONS, 'packages')
ADDONDATA = os.path.join(USERDATA, 'addon_data', ADDON_ID)
FANART = os.path.join(ADDONPATH, 'fanart.jpg')
Ejemplo n.º 41
0
def debridUser(who):
	user=None
	if who == 'exodus'       and os.path.exists(PATHEXODUS):     ADD_EXODUS       = wiz.addonId(EXODUS);       user = ADD_EXODUS.getSetting('realdebrid.id')
	if who == 'specto'       and os.path.exists(PATHSPECTO):     ADD_SPECTO       = wiz.addonId(SPECTO);       user = ADD_SPECTO.getSetting('realdebrid_client_id')
	if who == 'url'          and os.path.exists(PATHURL):        ADD_URL          = wiz.addonId(URLRESOLVER);  user = ADD_URL.getSetting('RealDebridResolver_client_id')
	return user