CzBiX / qb-web

A qBittorrent Web UI, write in TypeScript+Vue.
GNU General Public License v3.0
1.71k stars 137 forks source link

Fix category savePath in AddForm #103

Closed bbogdanov closed 3 years ago

bbogdanov commented 3 years ago

Seems like the Auto TTM is preventing to change the savePath when a category is selected and that way the savePath is always the default one for the app.

I am not entirely sure that this is the best fix for this but seems to work with manual and auto.

CzBiX commented 3 years ago

I don’t understand what issue the change fixes. When AutoTMM enabled, user can't change the save path, and the default path is category name. Please note, defaultPath is only used for placeholder, it will not be submitted to the server.

bbogdanov commented 3 years ago

Prerequisites:

Repo:

  1. Add a new category with unique save path
  2. Add a new torrent with the newly created category
  3. The torrent was download in the default folder, even the category has its own save path

https://github.com/qbittorrent/qBittorrent/wiki/WebUI-API-(qBittorrent-4.1)#add-new-torrent we can see here that savePath can be provided with the request.

I tried with the fix where the torrent will download and it downloads in the correct folder ( the category one )

Maybe can investigate further and refactor a little bit the AddForm

CzBiX commented 3 years ago

As I said, the defaultPath will not send to server. Your change is just to display the category path on the UI. If you want the save path to follow category settings, you should use AutoTMM mode. this is the feature what used for. Or...am I still not get your point?

bbogdanov commented 3 years ago

I assume if the AutoTMM is set to manual then the savePath of each category should be reflected accordingly, showed on the screen and passed to the server.

Currently this is not what happens. Even with AutoTMM set to manual the client continue to add torrents in the defaultPath folder even the category selected has its own savepath

I understand I have to do some other changes to the PR, but what do you thing about my assumption described above?

bbogdanov commented 3 years ago

Seems like I miss understand what AutoTMM does.