Ejemplo n.º 1
0
            del resolver_window
        except:
            pass

        try:
            tools.playList.clear()
            tools.closeOkDialog()
        except:
            pass

if action == 'preScrape':
    try:
        from resources.lib.modules import getSources

        uncached_sources, source_results, args = database.get(
            getSources.Sources().doModal, 1, actionArgs)

        if tools.getSetting('general.playstyle') == '0':
            from resources.lib.modules import resolver

            stream_link = database.get(resolver.Resolver().doModal, 1,
                                       source_results, args, pack_select)

        tools.setSetting(id='general.tempSilent', value='false')
    except:
        tools.setSetting(id='general.tempSilent', value='false')
        import traceback

        traceback.print_exc()
        pass
    tools.log('Pre-scraping completed')
Ejemplo n.º 2
0
            resolver_window.close()
            del resolver_window
        except:
            pass

        try:
            tools.playList.clear()
        except:
            pass

if action == 'preScrape':
    tools.log('Started Pre-scraping')
    try:
        from resources.lib.modules import getSources

        source_results, args = database.get(getSources.Sources().doModal, 1,
                                            actionArgs)

        if tools.getSetting('general.playstyle') == '0':
            from resources.lib.modules import resolver

            stream_link = database.get(resolver.Resolver().doModal, 1,
                                       source_results, args, pack_select)

        tools.setSetting(id='general.tempSilent', value='false')
    except:
        tools.setSetting(id='general.tempSilent', value='false')
        import traceback

        traceback.print_exc()
        pass
Ejemplo n.º 3
0
def source_tests():
    try:
        scrape_failures = False
        resolve_failures = False
        tools.setSetting('general.tempSilent', 'true')
        tools.setSetting('general.playstyleEpisodes', 1)
        tools.setSetting('preem.enabled', 'false')
        tools.setSetting('preem.cloudfiles', 'false')
        run_action('clearTorrentCache')

        from resources.lib.modules import getSources
        uncached_sources, source_results, args = getSources.Sources().doModal(
            episode_object)

        if len(source_results) == 0:
            scrape_failures = True
            log('Scraping: FAILED', 'error')
            return

        if len([
                i
                for i in source_results if i['debrid_provider'] == 'premiumize'
        ]) > 0:
            log('Premiumize Cache Check: OK', 'info')
        else:
            scrape_failures = True
            log('Premiumize Cache Check: FAILED', 'error')

        if len([
                i for i in source_results
                if i['debrid_provider'] == 'real_debrid'
        ]) > 0:
            log('Real Debrid Cache Check: OK', 'info')
        else:
            scrape_failures = True
            log('Real Debrid Cache Check: FAILED', 'error')

        if len([
                i for i in source_results if i['source'] == 'Real Debrid Cloud'
        ]) > 0:
            log('Real Debrid Cloud Scraping: OK', 'info')
        else:
            scrape_failures = True
            log('Real Debrid Cloud Scraping: FAILED', 'error')

        if len([
                i for i in source_results if i['source'] == 'Premiumize Cloud'
        ]) > 0:
            log('Premiumize Cloud Scraping: OK', 'info')
        else:
            scrape_failures = True
            log('Premiumize Cloud Scraping: FAILED', 'error')

        if not scrape_failures:
            log('Episode Scraping: OK', 'info')
        else:
            log('Episode Scraping: FAILED', 'error')

        rd_sources = [
            i for i in source_results if i['debrid_provider'] == 'real_debrid'
            and i['source'] != 'Real Debrid Cloud'
        ]

        from resources.lib.modules import resolver
        stream_link = resolver.Resolver().doModal(rd_sources, args, False)

        if stream_link is None:
            log('Real Debrid Resolving: Failed', 'error')
            resolve_failures = True
        else:
            log('Real Debrid Resolving: OK', 'info')

        prem_sources = [
            i for i in source_results if i['debrid_provider'] == 'premiumize'
            and i['source'] != 'Pemiumize Cloud'
        ]

        from resources.lib.modules import resolver

        stream_link = resolver.Resolver().doModal(prem_sources, args, False)

        if stream_link is None:
            log('Premiumize Resolving: Failed', 'error')
            resolve_failures = True
        else:
            log('Premiumize Resolving: OK', 'info')

        if not resolve_failures:
            log('Episode Resolving: OK', 'info')
        else:
            log('Episode Resolving: Failed', 'error')

        uncached_sources, source_results, args = getSources.Sources().doModal(
            movie_object)

        if len(source_results) == 0:
            log('Movie Scraping: Failed', 'error')
        else:
            log('Movie Scraping: OK', 'info')

        tools.setSetting('general.tempSilent', 'false')
    except:
        tools.setSetting('general.tempSilent', 'false')
        ScrapingException()