Attempt to fix issue where core will no longer pause/resume torrents.
This commit is contained in:
parent
d34356a800
commit
fc9bb503df
|
@ -151,11 +151,11 @@ class Torrent:
|
|||
log.debug("Trying to set an invalid state %s", state)
|
||||
return
|
||||
|
||||
if state == "Queued" and not self.handle.is_paused():
|
||||
component.get("TorrentManager").append_not_state_paused(self.torrent_id)
|
||||
self.handle.pause()
|
||||
|
||||
if state != self.state:
|
||||
if state == "Queued" and not self.handle.is_paused():
|
||||
component.get("TorrentManager").append_not_state_paused(self.torrent_id)
|
||||
self.handle.pause()
|
||||
|
||||
self.state = state
|
||||
|
||||
# Update the torrentqueue on any state changes
|
||||
|
|
|
@ -168,7 +168,8 @@ class TorrentManager(component.Component):
|
|||
"""Appends to a list of torrents that we will not set state Paused to
|
||||
when we receive the paused alert from libtorrent. The torrents are removed
|
||||
from this list once we receive the alert they have been paused in libtorrent."""
|
||||
self.not_state_paused.append(torrent_id)
|
||||
if torrent_id not in self.not_state_paused:
|
||||
self.not_state_paused.append(torrent_id)
|
||||
|
||||
def add(self, filename, filedump=None, options=None, total_uploaded=0,
|
||||
trackers=None, queue=-1, state=None, save_state=True):
|
||||
|
|
Loading…
Reference in New Issue