Store WebUI search tabs between app restarts and across sessions#23784
Store WebUI search tabs between app restarts and across sessions#23784Piccirello wants to merge 3 commits intoqbittorrent:masterfrom
Conversation
ec7600e to
3230ad2
Compare
But multi user access has been requested several times. |
It's been requested but I don't think anyone plans to build it. I personally think qBittorrent should remain single user. |
Well, why is that? Given that web sessions are initially implemented as isolated, this is not so difficult to do in a simplified form (which is sufficient for most users requesting this). In addition, it would allow access through a restricted account, which, for example, would not have access to settings. But if you prefer to nip this opportunity in the bud and you get the approval of the other members, well, so be it. |
|
This isn't the first time this has come up on one of my PRs. The approach we've always taken is that we shouldn't prevent adding new features just because we "might" add multi user support some day. This PR also doesn't prevent us from adding multi user support, it would just need to be refactored a bit.
If I had to guess, it's because none of the maintainers use qBittorrent in a multi user setup. |
If qBittorrent only had what maintainers use, then it wouldn't have quite a lot of its current features. |
|
@Piccirello |
|
I can make that change. However, in the past whenever I've wanted to share data across session instances, the recommendation has been to instantiate the data structure in WebApplication and pass it via the controller's constructor. I think this approach has the benefit that it follows the same pattern as all other controllers (except AuthController, which is unique). Won't using a different approach for SearchController be confusing? There's also no guarantee that all future SearchController data will be shared across clients. |
It's not about the pattern (in the sense of simply choosing one of several equivalent ways). The design was based on the fact that sessions are supposed to be isolated from each other so all the controllers was instantiated inside the sessions by default. AuthController is an exception because (it is obvious that) "authentication" lives outside of sessions.
As I said above, this is not a different approach. This is a unified approach in which the controller instance lives in the area corresponding to its nature. |
Okay, that might make sense. Let's try to review it, since you've already done it this way. Although the first thought was "why make so many changes if you could just make the SearchController instance live outside of sessions?". |
58cc4a7 to
cec6f96
Compare
glassez
left a comment
There was a problem hiding this comment.
Yet another portion of review from me.
I'll try to get back to it ASAP.
a36d513 to
21f9c03
Compare
|
Latest round of comments were very helpful, and all feedback has been addressed. |
21f9c03 to
29075cb
Compare
Rename preference methods and keys for clarity and reuse between GUI and WebAPI.
This allows users to access their search jobs across different web sessions. Switching to a different browser/device will now show the same search jobs.
29075cb to
30f09e2
Compare
This was inspired by the GUI version implemented in e644a91.
30f09e2 to
bf47beb
Compare
This PR makes two major improvements to WebAPI/WebUI searches: