Python 2.7 暂停单个torrent don';不要停止下载
1-调用startDownloadFromMagnet()。Torrent开始全速下载 2-当下载处于全速时,调用pausetorntfromIndex()。打印暂停=真 3次调用getTorrentFullInfo(),每次5段,持续2-5分钟。Torrent处于暂停模式并全速下载。我知道这是全速的,因为status()。下载速率返回高值,Windows网络监视器(win8.1)显示相同的速度 作为补充信息,整个会话的一般暂停(不在代码中显示)效果良好,但暂停所有会话的种子。我需要暂停个别激流Python 2.7 暂停单个torrent don';不要停止下载,python-2.7,libtorrent,Python 2.7,Libtorrent,1-调用startDownloadFromMagnet()。Torrent开始全速下载 2-当下载处于全速时,调用pausetorntfromIndex()。打印暂停=真 3次调用getTorrentFullInfo(),每次5段,持续2-5分钟。Torrent处于暂停模式并全速下载。我知道这是全速的,因为status()。下载速率返回高值,Windows网络监视器(win8.1)显示相同的速度 作为补充信息,整个会话的一般暂停(不在代码中显示)效果良好,但暂停所有会话的种子。我需要暂停个别激流
def startDowloadFromMagnet(self, magnet, outPath):
""" Given a magnet link, start downloading file. Return true if start do not fail """
try:
self.activeTorrentList.append(lt.add_magnet_uri(self.ses, magnet, {'save_path': outPath}))
return True
except:
print '\n ERROR --> Wrong Magnet link: ' + str(magnet)
return False
def pauseTorrentFromIndex(self, index):
""" given a torrent index pause torrent """
print 'isPaused(before): ' + str(self.isPaused(index)) #False
self.activeTorrentList[index].pause(0)
print 'isPaused(after): ' + str(self.isPaused(index)) #True
print 'Paused torrent which index: ' + str(index) #0
print 'Total num torrents: ' + str(self.getNumTorrents()) #1
def getTorrentFullInfo(self, index):
""" Given a torrent index, return full torrent info"""
#Download speed, status, size, ...
def isPaused(self, index):
""" Return true if torrent is paused"""
return self.activeTorrentList[index].status().paused
你可以看看你是否还有同龄人,他们中是否有人仍然有转会率。您是否启用了DHT?它还将使用带宽。暂停后,继续使用相同的对等点和相同的上载和下载速度进行下载。稍后将更深入地研究这个问题,现在我用“设置下载限制(1)”和“设置上传限制(1)”暂停单个种子。您能提供一个重现这个问题的最小示例吗?