def get_hoster_list(): """ Fetche :return: """ thread_pool = ThreadPool() hosters = {"premium": {}, "free": []} try: if g.get_bool_setting("premiumize.enabled") and g.get_bool_setting( "premiumize.hosters"): thread_pool.put(Premiumize().get_hosters, hosters) if g.get_bool_setting("realdebrid.enabled") and g.get_bool_setting( "rd.hosters"): thread_pool.put(RealDebrid().get_hosters, hosters) if g.get_bool_setting("alldebrid.enabled") and g.get_bool_setting( "alldebrid.hosters"): thread_pool.put(AllDebrid().get_hosters, hosters) thread_pool.wait_completion() except ValueError: g.log_stacktrace() xbmcgui.Dialog().notification(g.ADDON_NAME, g.get_language_string(30513)) return hosters return hosters
def __init__(self): super(RealDebridResolver, self).__init__() self.debrid_module = RealDebrid() self._source_normalization = ( ("path", "path", None), ("bytes", "size", lambda k: (k / 1024) / 1024), ("size", "size", None), ("filename", "release_title", None), ("id", "id", None), ("link", "link", None), ("selected", "selected", None), ) self.torrent_id = None
def __init__(self, terminate_flag): super(RealDebridCloudScraper, self).__init__(terminate_flag) self.api_adapter = RealDebrid() self.debrid_provider = 'real_debrid' self._source_normalization = (('path', 'release_title', lambda k: k.lower().split('/')[-1]), ('bytes', 'size', lambda k: (k / 1024) / 1024), ('size', 'size', None), ('filename', 'release_title', None), ('id', 'id', None), ('links', 'links', None), ('selected', 'selected', None))
def __init__(self, source): super(_RealDebridDownloader, self).__init__(source) self.debrid_module = RealDebrid() self.available_files = []
def authAllDebrid(payload, params): from resources.lib.debrid.real_debrid import RealDebrid RealDebrid().auth()
def real_debrid(self): from resources.lib.debrid.real_debrid import RealDebrid return RealDebrid()