Ticket #2047 (new bug)

Opened 16 months ago

Last modified 7 months ago

Multi-Edit trackers

Reported by: dus Owned by: damoxc
Priority: major Milestone: 1.4.0
Component: webui Version: 1.3.3
Keywords: tracker,edit Cc: bobodod@…, mvseqt2twu@…

Description

Either on the GTK or the WEB ui, you cant change at more then one torrent at time, his tracker list. (Yes, also selecting more then 1).

This sucks 'cause for private trackers you could have to change your passkey (and so the tracker list), for every torrent on the client, but you can't do it one by one.

Anyway, I think it's a bug to change only one torrent if you select more then one.

(By the way, the "move storage" works selecting more than one).

Attachments

0001-Added-a-hack-to-multi-edit-trackers.patch (2.6 KB) - added by bluephoenix47 8 months ago.
git format-patch of mult-edit tracker hack

Change History

Changed 13 months ago by bobodod

  • cc bobodod@… added

Changed 9 months ago by DoYouWantKarate

  • cc mvseqt2twu@… added

Changed 8 months ago by bluephoenix47

git format-patch of mult-edit tracker hack

Changed 8 months ago by bluephoenix47

I recently wanted to edit a set of (280) torrents to use https instead of http, and to hell with doing that manually.

So I create this hack. I created and tested it on a local 1.3.5 copy, and ported it to the head of the git master branch, so strictly speaking, it's untested.

It has the same semantics as multi-torrent move storage--the initial data comes from the first selected torrent, and the edited data applies to all the selected torrents.

Changed 7 months ago by Cas

I've made some changes based on your initial work so that only the trackers that are shared among the selected torrents will be shown. Also added a warning that it will clobber existing trackers when saving.

 https://github.com/cas--/Deluge/compare/Feature;2047;EditMultipleTorrentTrackers

This could be added to 1.3-stable for 1.3.6 release.

Changed 7 months ago by Cas

  • milestone changed from 1.3.x to 1.3.6

Changed 7 months ago by gazpachoking

If we are going to allow multi-edit trackers, I'd say just show all the trackers from all the torrents rather than filtering down to only the common ones. Or if we want to do only shared trackers, I think this is nicer:

shared_trackers = set.intersection(*(set(status[torrent_id]['trackers']) for torrent_id in status))

Hmm, seems that's only available since python 2.6, do we support 2.5 still?

EDIT: A python 2.5 possibility

shared_trackers = reduce(lambda x, y: x & y, (set(status[torrent_id]['trackers']) for torrent_id in status))

Changed 7 months ago by gazpachoking

  • milestone changed from 1.3.6 to 1.4.0
Note: See TracTickets for help on using tickets.