Opened 9 years ago

Last modified 6 years ago

#5347 new Enhancement

Support changing paths via torrent-rename-path

Reported by: medlefsen Owned by: jordan
Priority: Normal Milestone: None Set
Component: libtransmission Version: 2.77+
Severity: Normal Keywords: rename patch
Cc:

Description

Right now torrent-rename-path can only rename a file in place, not change it's relative path. I'd like to be able to specify full paths relative to the torrent root for the new name.

My current use case uses RPC directly so updates to the clients aren't needed immediately.

I've created a patch that works for me. To prevent breaking existing usage too much it adds a boolean "move" argument to the call, which defaults to false, that when set to true will treat the new name as a relative path from the torrent root.

I think this is useful functionality to have in the core and I'd be happy to work on it more if it needs tweaking.

Thanks

Attachments (2)

transmission-rename-move.patch (21.1 KB) - added by medlefsen 9 years ago.
transmission-rename-move-2.84.patch (24.8 KB) - added by medlefsen 7 years ago.
Updated patch for 2.84

Download all attachments as: .zip

Change History (7)

Changed 9 years ago by medlefsen

Changed 7 years ago by medlefsen

Updated patch for 2.84

comment:1 Changed 7 years ago by medlefsen

I've updated the patch to build apply to the 2.84 tag (see new attachment). I'd really like to see what I can do to get this or something like it merged.I understand it probably isn't a high priority but I'm willing to do the work.

Thanks

comment:2 Changed 7 years ago by Robby

  • Keywords patch added

comment:3 Changed 6 years ago by rsully

The argument 'move' seems like it would be confusing. I'd like to see something like 'relative' that defaults to true.

comment:4 Changed 6 years ago by medlefsen

Sure, I can change that. Give me a few days and I'll post a new patch.

Thanks

comment:5 Changed 6 years ago by mike.dld

IMHO using "name" to store path is bad and confusing. Instead of "move" or "relative" boolean argument I'd rather add e.g. "new-path" string argument, mutually exlusive to "name" (so only one and never both could be specified). Just another idea, maybe there's even better one.

Note: See TracTickets for help on using tickets.