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)
|
log.debug("Trying to set an invalid state %s", state)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
if state != self.state:
|
||||||
if state == "Queued" and not self.handle.is_paused():
|
if state == "Queued" and not self.handle.is_paused():
|
||||||
component.get("TorrentManager").append_not_state_paused(self.torrent_id)
|
component.get("TorrentManager").append_not_state_paused(self.torrent_id)
|
||||||
self.handle.pause()
|
self.handle.pause()
|
||||||
|
|
||||||
if state != self.state:
|
|
||||||
self.state = state
|
self.state = state
|
||||||
|
|
||||||
# Update the torrentqueue on any state changes
|
# Update the torrentqueue on any state changes
|
||||||
|
|
|
@ -168,6 +168,7 @@ class TorrentManager(component.Component):
|
||||||
"""Appends to a list of torrents that we will not set state Paused to
|
"""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
|
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."""
|
from this list once we receive the alert they have been paused in libtorrent."""
|
||||||
|
if torrent_id not in self.not_state_paused:
|
||||||
self.not_state_paused.append(torrent_id)
|
self.not_state_paused.append(torrent_id)
|
||||||
|
|
||||||
def add(self, filename, filedump=None, options=None, total_uploaded=0,
|
def add(self, filename, filedump=None, options=None, total_uploaded=0,
|
||||||
|
|
Loading…
Reference in New Issue