mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
feat: apply suggestions
This commit is contained in:
parent
ae3daa4c79
commit
153291f89f
10 changed files with 32 additions and 30 deletions
|
@ -30,12 +30,13 @@ class Downloader:
|
|||
self.torrent_handles[game_id] = None
|
||||
self.downloading_game_id = -1
|
||||
|
||||
def cancel_all_downloads(self):
|
||||
def abort_session(self):
|
||||
for game_id in self.torrent_handles:
|
||||
torrent_handle = self.torrent_handles[game_id]
|
||||
torrent_handle.pause()
|
||||
self.session.remove_torrent(torrent_handle)
|
||||
|
||||
|
||||
self.session.abort()
|
||||
self.torrent_handles = {}
|
||||
self.downloading_game_id = -1
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue