mirror of
https://github.com/codex-storage/deluge.git
synced 2025-01-13 04:54:23 +00:00
Fix prioritize first/last pieces for magnet links
This commit is contained in:
parent
c58221c866
commit
8911600155
@ -9,6 +9,7 @@
|
|||||||
* #2109: Fix the Proxy settings not being cleared by setting None
|
* #2109: Fix the Proxy settings not being cleared by setting None
|
||||||
* #2110: Fix accepting magnet uris with xt param anywhere within them
|
* #2110: Fix accepting magnet uris with xt param anywhere within them
|
||||||
* #2204: Fix daemon shutdown hang with large numbers of torrents
|
* #2204: Fix daemon shutdown hang with large numbers of torrents
|
||||||
|
* Fix prioritize first/last pieces option for magnet links
|
||||||
|
|
||||||
==== Client ====
|
==== Client ====
|
||||||
* Fix keyerrors after removing torrents from UIs
|
* Fix keyerrors after removing torrents from UIs
|
||||||
|
@ -868,6 +868,11 @@ class Torrent(object):
|
|||||||
self.handle.save_resume_data()
|
self.handle.save_resume_data()
|
||||||
self.waiting_on_resume_data = True
|
self.waiting_on_resume_data = True
|
||||||
|
|
||||||
|
def on_metadata_received(self):
|
||||||
|
if self.options["prioritize_first_last_pieces"]:
|
||||||
|
self.set_prioritize_first_last(True)
|
||||||
|
self.write_torrentfile()
|
||||||
|
|
||||||
def write_torrentfile(self):
|
def write_torrentfile(self):
|
||||||
"""Writes the torrent file"""
|
"""Writes the torrent file"""
|
||||||
path = "%s/%s.torrent" % (
|
path = "%s/%s.torrent" % (
|
||||||
|
@ -1110,7 +1110,7 @@ class TorrentManager(component.Component):
|
|||||||
torrent = self.torrents[str(alert.handle.info_hash())]
|
torrent = self.torrents[str(alert.handle.info_hash())]
|
||||||
except:
|
except:
|
||||||
return
|
return
|
||||||
torrent.write_torrentfile()
|
torrent.on_metadata_received()
|
||||||
|
|
||||||
def on_alert_file_error(self, alert):
|
def on_alert_file_error(self, alert):
|
||||||
log.debug("on_alert_file_error: %s", alert.message())
|
log.debug("on_alert_file_error: %s", alert.message())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user