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 acestream_engine():
    import acestream
    from support.common import temp_path

    return acestream.Engine(host=plugin.get_setting('as-host', unicode),
                            port=plugin.get_setting('as-port', int, default=62062),
                            save_path=temp_path() if plugin.get_setting('save-files', int) else None)
Example #3
0
def acestream_engine():
  import acestream
  from support.common import temp_path

  return acestream.Engine(host=plugin.get_setting('as-host', unicode),
                          port=plugin.get_setting('as-port', int, default=62062),
                          save_path=temp_path() if plugin.get_setting('save-files', int) else None)
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)