1

我用add_magnet_uri获取信息,但是有些资源响应慢,应该用什么来设置总超时?

http://www.rasterbar.com/products/libtorrent/manual.html

:( 没找到相关设置

params = {
            'save_path': '/home/sdht/data',
            'storage_mode': lt.storage_mode_sparse(),
            'paused': False,
            'auto_managed': True,
            'duplicate_is_error': True
        }
handle = lt.add_magnet_uri(self.ses, link, params)
    while (not handle.has_metadata()):
        time.sleep(.1)
4

2 回答 2

1

在 libtorrent 中下载失败的种子没有超时。您可以在 torrent 中查询添加时的时间戳,如果它是在很久以前添加的,但仍未完成,您可以将其删除。

加载闲置的 torrent 也没有太多成本,因此您可能希望添加所有要并行解决的 torrent。

此外,您可能需要小心地将它们全部设置为 auto_managed: True,因为这样停滞的 torrent 可能会阻止新的 torrent 启动。如果您将 auto_managed 设置为 False,它们都将被强制启动。

于 2015-02-15T20:53:56.373 回答
0

地址:http ://www.rasterbar.com/products/libtorrent/manual.html#session-settings

        sts.user_agent = "USA Global Download"
        sts.tracker_completion_timeout = 5
        sts.tracker_receive_timeout = 5
        sts.stop_tracker_timeout = 5
        sts.active_downloads = -1
        sts.active_seeds = -1
        sts.active_limit = -1
        sts.auto_scrape_min_interval = 5
        sts.udp_tracker_token_expiry = 120
        sts.min_announce_interval = 1
        sts.inactivity_timeout = 60
        sts.connection_speed = 10
        sts.allow_multiple_connections_per_ip = True
        sts.max_out_request_queue = 128
        sts.request_queue_size = 3
        sts.use_read_cache = False
于 2015-02-09T06:20:35.007 回答