bug fix for pausing torrents
This commit is contained in:
parent
96d28b0722
commit
167fbc3048
|
@ -433,12 +433,12 @@ class Manager:
|
||||||
# Pause and resume torrents
|
# Pause and resume torrents
|
||||||
for index in range(len(self.state.queue)):
|
for index in range(len(self.state.queue)):
|
||||||
unique_ID = self.state.queue[index]
|
unique_ID = self.state.queue[index]
|
||||||
if (index < self.state.max_active_torrents or self.state_max_active_torrents == -1) \
|
if (index < self.get_pref('max_active_torrents') or self.get_pref('max_active_torrents') == -1) \
|
||||||
and self.get_core_torrent_state(unique_ID, efficient)['is_paused'] \
|
and self.get_core_torrent_state(unique_ID, efficient)['is_paused'] \
|
||||||
and not self.is_user_paused(unique_ID):
|
and not self.is_user_paused(unique_ID):
|
||||||
deluge_core.resume(unique_ID)
|
deluge_core.resume(unique_ID)
|
||||||
elif not self.get_core_torrent_state(unique_ID, efficient)['is_paused'] and \
|
elif not self.get_core_torrent_state(unique_ID, efficient)['is_paused'] and \
|
||||||
(index >= self.state.max_active_torrents or self.is_user_paused(unique_ID)):
|
(index >= self.get_pref('max_active_torrents') or self.is_user_paused(unique_ID)):
|
||||||
deluge_core.pause(unique_ID)
|
deluge_core.pause(unique_ID)
|
||||||
|
|
||||||
# Event handling
|
# Event handling
|
||||||
|
|
Loading…
Reference in New Issue