def torrent2http_engine():
    import torrent2http
    from support.common import temp_path

    return torrent2http.Engine(
        download_path=temp_path(),
        state_file=plugin.addon_data_path('t2h_state'),
        connections_limit=plugin.get_setting('t2h-max-connections',
                                             int,
                                             default=None),
        download_kbps=plugin.get_setting('t2h-download-rate',
                                         int,
                                         default=None),
        upload_kbps=plugin.get_setting('t2h-upload-rate', int, default=None),
        log_overall_progress=plugin.get_setting('t2h-debug-mode', bool),
        log_pieces_progress=plugin.get_setting('t2h-debug-mode', bool),
        debug_alerts=plugin.get_setting('t2h-debug-mode', bool),
        listen_port=plugin.get_setting('t2h-listen-port', int, default=6881),
        use_random_port=plugin.get_setting('t2h-use-random-port', bool),
        trackers=['http://retracker.local/announce'],
        dht_routers=[
            'dht.transmissionbt.com', 'router.utorrent.com',
            'router.bittorrent.com'
        ],
        max_idle_timeout=5,
        keep_files=True,
        enable_utp=False)
def get_torrent(url):
    import support.services as services
    torrent = services.torrent(url)
    torrents_path = plugin.addon_data_path("torrents")
    xbmcvfs.mkdirs(torrents_path)
    torrent.download_locally(torrents_path)
    return torrent
def get_torrent(url):
    import support.services as services
    torrent = services.torrent(url)
    torrents_path = plugin.addon_data_path("torrents")
    xbmcvfs.mkdirs(torrents_path)
    torrent.download_locally(torrents_path)
    return torrent
Beispiel #4
0
def get_scraper():
    from support.services import xrequests_session
    return LostFilmScraper(login=plugin.get_setting('login', unicode),
                           password=plugin.get_setting('password', unicode),
                           cookie_jar=plugin.addon_data_path('cookies'),
                           xrequests_session=xrequests_session(),
                           max_workers=BATCH_SERIES_COUNT,
                           series_cache=series_cache(),
                           shows_ids_cache=shows_ids())
def get_scraper():
    from support.services import xrequests_session
    anonymized_urls = plugin.get_storage().setdefault('anonymized_urls', [], ttl=24 * 60 * 7)
    return LostFilmScraper(login=plugin.get_setting('login', unicode),
                           password=plugin.get_setting('password', unicode),
                           cookie_jar=plugin.addon_data_path('cookies'),
                           xrequests_session=xrequests_session(),
                           max_workers=BATCH_SERIES_COUNT,
                           series_cache=series_cache(),
                           anonymized_urls=anonymized_urls)
def get_scraper():
    from support.services import xrequests_session
    anonymized_urls = plugin.get_storage().setdefault('anonymized_urls', [], ttl=24 * 60 * 7)
    return LostFilmScraper(login=plugin.get_setting('login', unicode),
                           password=plugin.get_setting('password', unicode),
                           cookie_jar=plugin.addon_data_path('cookies'),
                           xrequests_session=xrequests_session(),
                           max_workers=BATCH_SERIES_COUNT,
                           series_cache=series_cache(),
                           anonymized_urls=anonymized_urls)
def torrent2http_engine():
    import torrent2http
    from support.common import temp_path

    return torrent2http.Engine(download_path=temp_path(),
                               state_file=plugin.addon_data_path('t2h_state'),
                               connections_limit=plugin.get_setting('t2h-max-connections', int, default=None),
                               download_kbps=plugin.get_setting('t2h-download-rate', int, default=None),
                               upload_kbps=plugin.get_setting('t2h-upload-rate', int, default=None),
                               log_overall_progress=plugin.get_setting('t2h-debug-mode', bool),
                               log_pieces_progress=plugin.get_setting('t2h-debug-mode', bool),
                               debug_alerts=plugin.get_setting('t2h-debug-mode', bool),
                               listen_port=plugin.get_setting('t2h-listen-port', int, default=6881),
                               use_random_port=plugin.get_setting('t2h-use-random-port', bool),
                               trackers=['http://retracker.local/announce'],
                               dht_routers=['dht.transmissionbt.com', 'router.utorrent.com', 'router.bittorrent.com'],
                               max_idle_timeout=5,
                               keep_files=True,
                               enable_utp=False)