Ticket #1316 (assigned feature-request)

Opened 3 years ago

Last modified 11 months ago

Implement file/folder renaming in Web UI

Reported by: powtrix Owned by: damoxc
Priority: major Milestone: 1.4.0
Component: webui Version: 1.3.0_dev
Keywords: rename file folder webui Cc: powtrix@…, deluge@…, mathieu@…

Description

Hi, a request. please read:

I have a daemon working well and a feature I would like to have via web:

In the File list (add torrent) I want to rename the main torrent structure dir, eg.: /Pics from Mars/ /Pics from Mars/file1.jpg /Pics from Mars/file2.png

I want to rename from "Pics from Mars" to "pics" dir name, to sync my local pictures (for example). The torrents I want to sync are 12gb, 60gb, 150gb.. I need to fix current dir to seed the data (sync to seed).

Please, using this feature via online Deluge will be the best client via web, only this feature is missing!

  • path for each torrent - already implemented
  • rename a main torrent dir to "sync" a local dir as eg. "/My Pics/" (from torrent) to "/pics/"

Thank you for develop Deluge !

Change History

Changed 3 years ago by johnnyg

  • owner changed from powtrix to damoxc
  • status changed from new to assigned
  • summary changed from rename a torrent dir to sync local dir -via web to Implement file/folder renaming in Web UI

Changed 3 years ago by damoxc

  • milestone changed from 1.3.0 to 1.4.0

Changed 3 years ago by johnnyg

  • keywords file folder webui added; dir web sync local update removed

Changed 3 years ago by johnnyg

  • cc deluge@… added

Changed 17 months ago by mathroc

  • cc mathieu@… added

Changed 11 months ago by bmnot

This is a big deal, and one of the main things preventing the WebUI from being completely standalone.

I am guessing that the reason it has not been added in 2 years is that it's difficult to implement file-naming over the web (when you don't have access to the local filesystem to verify paths, permissions, existing file clobbering, etc).

Well, how about:

* Implementing a Rename option in the right-click menu for files in the WebUI, which pops up a simple text field, pre-filled with the current filename. * Sanitizing the input by disallowing slashes and illegal filename characters in the text field. * Doing a JSON-RPC call to ask the daemon "will this requested name (i.e. "new filename.txt") be okay?" and getting a reply like "1:ok, 2:file exists and can be overwritten, 3:file exists and no permission to overwrite"

This gets rid of the need to implement path-moving when renaming a file, and takes care of permissions/clobbering issues.

Thoughts?

Changed 11 months ago by bmnot

The GTK GUI could use the same piece of code, if the new filename/new folder name check is moved into DelugeRPC instead of the GTK GUI (where I assumed the check is now, since it's taken this long to get it into the WebUI), and DelugeRPC returns something like:

0 = new name OK 1 = new name invalid (illegal characters/too long) 2 = file/folder exists and we have write permissions (file can be overwritten/folders can be merged) 3 = file/folder exists and we have no write permissions

Should be trivial to update the WebUI once this RPC has been added.

Note: See TracTickets for help on using tickets.