qBittorrent
qBittorrent copied to clipboard
Give an option to remove 'pause all' and 'resume all' options from system tray icon menu
Suggestion
Give an option to remove 'pause all' and 'resume all' options from system tray icon menu
I have thousands of torrents, mostly seeding, but also a lot of undownloaded torrents waiting for a rainy day to do so. I accidentally clicked this button the other night and it took a while to go through and pause the downloads all again, and I had started downloading scores of them in that meantime.
Pause all and Resume all are too powerful an option to leave in a place that can easily be accidentally clicked. I was right clicking to 'exit' the qbittorrent.. not to resume all!!
Use case
No response
Extra info/examples/attachments
Provide an option in advanced settings or regular settings to modify the links in the system tray icon menu, or at least to remove the options from there. I don't use system tray icon menus, except to right click and exit.
Have never accidentally clicked, but if this happens to you, you can exit the client through the file exit
IMO these buttons should be replaced with "Pause/Resume Session" (not available anywhere currently) which doesn't touch individual torrent status but stops everything.
IMO these buttons should be replaced with "Pause/Resume Session" (not available anywhere currently) which doesn't touch individual torrent status but stops everything.
It could be useful if you want to pause all torrents temporarily.
Have never accidentally clicked, but if this happens to you, you can exit the client through the file exit
I usually dont do it this way but might start to do that to be 'safe'
Never accidentally clicked this buttons, but if it's problem for some people, may there should be confirm dialog after click?
Never accidentally clicked this buttons, but if it's problem for some people, may there should be confirm dialog after click?
Good idea, that's another great option other than hiding those options.
So I made a confirmation dialog that works on both Tray + Menu Resume All
and Pause All
.
I thought about what thalieht said, and honestly, I'd maybe make it a permanent speed limit kind of thing (sounds hacky, but probably easiest?). I would not even save it but make it a session-only thing. Adding the speed limit (to 0-0kbps) might be even "easy", but showing the user why their torrents are stuck not doing any traffic - possibly by mistake - is hard. It'd introduce a new category even, but I read a recent commit/PR where someone said they'd like to avoid that. So it's... not something that could be introduced any time soon I fear.
Why not implement pause/resume session instead as was suggested earlier?
@glassez Well, valid question.
I think it'd require some "guidance". As in, which implementation a project lead would think is good. Because it gets real messy, real fast. But I might be overthinking it. Pretty sure I'm overthinking it?
- Maybe a new TorrentState? But then you also have to save all previous torrent states. And then swap to this, swap back. Show this new state in transferlist, etc. And if it's temporary, how to 'protect' previous states? Save them, load if temporary state is present? Messy IMO.
- Limit all to 0kbps, but also add some kind of representation. But if that's implemented, there has to be a "global state", a bool, something, that shows the session is frozen.
I would maybe go with the global state thing.
Code: Add a "global bool" somewhere that's toggled. Why? WebUI has to know about it, also has to implement a visual representation of this state, saying it's all frozen. (Well, "Paused", but in this case, it's just frozen pretty much.)
I'd gray out the whole transferlist, and just show like a big " || " pause symbol with maybe a text, saying torrents are paused. IF clicked upon, dialog pops up, user confirms, things continue. So basically the tray menu option would set variable/state and also change transferlist look. On how to "freeze", I'd do the temporary speed limit. NOT SURE if 0/0kbps speeds are possible.
But this whole freeze feature would require GUI change, logic added here and there, WebUI changes. New tray icon overlay OVER the icon, like a yellow pause icon. I mean I think it'd look real nice and it actually sounds pretty cool now that I typed it all out. Just requires changes here and there.
And basically that's why I went with this super simple (lazy?) change that can be just dropped in and it does safeguard.
Let me know if you have any solution in mind, I'd be willing to give it a try.
Update: I checked the download / upload limits and 0 speed will not work. It's passed to libtorrent via settings_pack
and it sets download_rate_limit
, but "0 means unlimited." There has to be a way to save all previous states (save it ASAP to file/database), then it should be able to reload itself.
I mean maybe it's not that much work, I'll keep digging.
Let me know if you have any solution in mind, I'd be willing to give it a try.
As for the implementation, everything is simple with it. libtorrent::session
has pause()
method that does exactly what we need, i.e. pause the entire session without affecting the states of the torrents themselves, so session::resume()
restores everything as it was before.
As for how it should be displayed in the UI, I have no idea about it.
Deluge has a plugin that does exactly that. It adds a pause button which you can use to pause and resume libtorrent session. And since the plugin has to be enabled manually so random users will not go ahead and erroneously click this button and then wonder why everything is stopped.
My suggestion for qBt would be to add a session pause/resume option but make this configurable in the advanced settings. So that only advanced users enable this option to take advantage of it.
so random users will not go ahead and erroneously click this button and then wonder why everything is stopped.
... and also all torrents cannot be resumed without clicking the special "session resume" button. I can already imagine users reporting it.
My suggestion for qBt would be to add a session pause/resume option but make this configurable in the advanced settings. So that only advanced users enable this option to take advantage of it.
Sounds good to me.
However the problem that user still might accidentally click on the buttons still remains and it seems #17945 would still be required no matter what.
I think the confirmation dialogue to prevent misclick is a completely different issue and that PR should get merged anyway.
so random users will not go ahead and erroneously click this button and then wonder why everything is stopped.
... and also all torrents cannot be resumed without clicking the special "session resume" button. I can already imagine users reporting it.
Of course there should be clear indication in UI that the entire session is paused. IMO, the fact that the current "pause all" option actually changes the state of each torrent is a greater evil, since there is no way to resume only previously running torrents.
I'd gray out the whole transferlist, and just show like a big " || " pause symbol with maybe a text, saying torrents are paused
Good idea, except for the greying part because we should still be able to interact with torrents. Just some icon/text/button in the middle of transfer list with QGraphicsScene maybe which can be clicked to resume the session (not sure if it's possible with that). We really need something "in your face" for paused session indication since we can't show the indication in toolbar/status bar/filters panel (at least not only there) because they may all be hidden. And also change the icon when session is paused in tray/taskbar/titlebar as you said. The pause session action should be in the Edit menu and in toolbar and should replace Pause/Resume torrents actions in tray icon menu. And with all these i don't think an advanced setting is necessary. Of course there is the WebUI to think about... maybe the advanced setting is the simplest solution because of it.
we should still be able to interact with torrents.
👍
change the icon when session is paused in tray/taskbar/titlebar as you said.
👍
should replace Pause/Resume torrents actions in tray icon menu.
:+1: I would even replace them everywhere.
i don't think an advanced setting is necessary.
:+1:
Of course there is the WebUI to think about... maybe the advanced setting is the simplest solution because of it.
Let's don't think about WebUI when we talk about GUI. They can go different ways.