Пример #1
0
 def _showRealDebrid(self):
     choice = self._option(33945, 33897, 33898)
     if choice == self.ChoiceLeft: return self.OptionCancelStep
     choice = self._option(33946, 33899, 33900)
     if choice == self.ChoiceLeft:
         tools.System.openLink(
             tools.Settings.getString('link.realdebrid', raw=True))
         choice = self._option(33987, 33743, 33898)
         if choice == self.ChoiceLeft: return self._cancel()
     while True:
         tools.Settings.set('accounts.debrid.realdebrid.enabled', True)
         debrid.RealDebridInterface().accountAuthentication(
             openSettings=False)
         interface.Loader.show()
         valid = debrid.RealDebrid().accountVerify()
         interface.Loader.hide()
         if valid:
             tools.Settings.set(
                 'providers.universal.premium.member.realdebrid', True)
             choice = self._option(33947, 33743, 33821)
             if choice == self.ChoiceLeft: return self._cancel()
             return self.OptionContinue
         else:
             tools.Settings.set('accounts.debrid.realdebrid.enabled', False)
             choice = self._option(33990, 33743, 33902)
             if choice == self.ChoiceLeft: return self._cancel()
     return self.OptionContinue
Пример #2
0
def resolver(url, debrid, title = None, season = None, episode = None, close = True, source = None):
	try: debrid = debrid.lower()
	except: pass

	url = url.replace('filefactory.com/stream/', 'filefactory.com/file/')

	# Always try Premiumize first.
	try:
		if not debrid == 'premiumize' and not debrid == True: raise Exception()
		if not debridx.Premiumize().accountValid(): raise Exception()
		return debridx.PremiumizeInterface().add(link = url, title = title, season = season, episode = episode, close = close, source = source)
	except:
		pass

	try:
		if not debrid == 'realdebrid' and not debrid == True: raise Exception()
		if not debridx.RealDebrid().accountValid(): raise Exception()
		return debridx.RealDebridInterface().add(link = url, title = title, season = season, episode = episode, close = close, source = source)
	except:
		pass

	try:
		if not debrid == 'alldebrid' and not debrid == True: raise Exception()
		if not debridx.AllDebrid().accountValid(): raise Exception()
		return debridx.AllDebrid().add(link = url)
	except:
		pass

	try:
		if not debrid == 'rapidpremium' and not debrid == True: raise Exception()
		if not debridx.RapidPremium().accountValid(): raise Exception()
		return debridx.RapidPremium().add(link = url)
	except:
		pass

	return None
Пример #3
0
def resolver(url,
             debrid,
             title=None,
             season=None,
             episode=None,
             close=True,
             source=None,
             pack=False,
             cached=False,
             hash=None,
             select=False,
             cloud=False):
    try:
        debrid = debrid.lower()
    except:
        pass

    url = url.replace('filefactory.com/stream/', 'filefactory.com/file/')

    if select:
        pack = True  # Even non-season-pack archives should be selectable.

    # Always try Premiumize first.
    try:
        if not debrid == 'premiumize' and not debrid == True: raise Exception()
        if not debridx.Premiumize().accountValid(): raise Exception()
        return debridx.PremiumizeInterface().add(link=url,
                                                 title=title,
                                                 season=season,
                                                 episode=episode,
                                                 pack=pack,
                                                 close=close,
                                                 source=source,
                                                 cached=cached,
                                                 select=select,
                                                 cloud=cloud)
    except:
        pass

    try:
        if not debrid == 'offcloud' and not debrid == True: raise Exception()
        if not debridx.OffCloud().accountValid(): raise Exception()
        return debridx.OffCloudInterface().add(link=url,
                                               title=title,
                                               season=season,
                                               episode=episode,
                                               pack=pack,
                                               close=close,
                                               source=source,
                                               cached=cached,
                                               select=select)
    except:
        pass

    try:
        if not debrid == 'realdebrid' and not debrid == True: raise Exception()
        if not debridx.RealDebrid().accountValid(): raise Exception()
        return debridx.RealDebridInterface().add(link=url,
                                                 title=title,
                                                 season=season,
                                                 episode=episode,
                                                 pack=pack,
                                                 close=close,
                                                 source=source,
                                                 cached=cached,
                                                 select=select)
    except:
        pass

    try:
        if not debrid == 'alldebrid' and not debrid == True: raise Exception()
        if not debridx.AllDebrid().accountValid(): raise Exception()
        return debridx.AllDebrid().add(link=url)
    except:
        pass

    try:
        if not debrid == 'rapidpremium' and not debrid == True:
            raise Exception()
        if not debridx.RapidPremium().accountValid(): raise Exception()
        return debridx.RapidPremium().add(link=url)
    except:
        pass

    return None
Пример #4
0
elif action == 'premiumizeClear':
	from resources.lib.extensions import debrid
	debrid.PremiumizeInterface().clear()

elif action == 'premiumizeSettings':
	from resources.lib.extensions import tools
	tools.Settings.launch(category = tools.Settings.CategoryAccounts)

####################################################
# REALDEBRID
####################################################

elif action == 'realdebridAuthentication':
	from resources.lib.extensions import debrid
	debrid.RealDebridInterface().accountAuthentication()

elif action == 'realdebridNavigator':
	from resources.lib.indexers import navigator
	navigator.navigator(type = type, kids = kids).realdebridNavigator()

elif action == 'realdebridDownloadsNavigator':
	from resources.lib.indexers import navigator
	from resources.lib.extensions import tools
	lite = tools.Converter.boolean(params.get('lite'))
	navigator.navigator(type = type, kids = kids).realdebridDownloadsNavigator(lite = lite)

elif action == 'realdebridList':
	from resources.lib.extensions import interface
	interface.Dialog.confirm(title = 'Planned Feature', message = 'This feature is planned for a future release. It will allow users to fully utilize RealDebrid functionality, such as manually adding downloads, deleting and moving files, and downloading files to local storage.')