mirror of
https://github.com/codex-storage/deluge.git
synced 2025-02-03 23:23:27 +00:00
[GTK] Fix missing magnet trackers with Add dialog (non-prefetch)
When adding magnets (without prefetch) the trackers were missing. The issue was that the magnet uri was being xml escaped twice so that the ampersand was still escaped when passed to core and everything after the magnet info_hash was ignored. Also found unneeded call to core.add_torrent_files when only adding magnets with core.add_torrent_magnet so check torrents_to_add before calling.
This commit is contained in:
parent
09cfd9b89e
commit
cbcf8eb863
@ -302,7 +302,7 @@ class AddTorrentDialog(component.Component):
|
||||
torrent_id = magnet['info_hash']
|
||||
files = magnet['files_tree']
|
||||
if not self._add_torrent_liststore(
|
||||
torrent_id, magnet['name'], xml_escape(uri), files, None
|
||||
torrent_id, magnet['name'], uri, files, None
|
||||
):
|
||||
already_added += 1
|
||||
continue
|
||||
@ -924,7 +924,10 @@ class AddTorrentDialog(component.Component):
|
||||
else:
|
||||
log.info('Successfully added %d torrents.', len(torrents_to_add))
|
||||
|
||||
client.core.add_torrent_files(torrents_to_add).addCallback(on_torrents_added)
|
||||
if torrents_to_add:
|
||||
client.core.add_torrent_files(torrents_to_add).addCallback(
|
||||
on_torrents_added
|
||||
)
|
||||
|
||||
def on_button_apply_clicked(self, widget):
|
||||
log.debug('on_button_apply_clicked')
|
||||
|
Loading…
x
Reference in New Issue
Block a user