-
-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WebUI: Implement server-side filtering, sorting and limit/offset. #2191
Conversation
return state; | ||
} | ||
|
||
qulonglong QTorrentHandle::eta() const |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like the idea of having two functions QTorrentHandle::eta() and QBtSession::getETA() with a different meaning.
If QTorrentHandle::eta() is used only in WebUI, perhaps it should stay in WebUI. Also this looks suspiciusly similar to case TR_ETA in TorrentModelItem::data(). Perhaps the code should be shared?
To summarize my comments in code: I don't like the idea of moving WebUI-specific functions to QTorrentHandle, while leaving NormalUI counter parts in TorrentModel. |
Is QTorrentHandle::torrentState() a WebUI-specific function?
A class encapsulates data and functions of the processing (in this case, a numeric status value and a conversion function to a string). OOP :) |
Server side filtering must support filter by label for future release labels in WebUI. |
I thought about it. Will do later. |
Implemented now. Example: |
Then I should be shared with TorrentModel. I don't see why moving it to QTorrentHandle without sharing is a good idea. |
Yes. Sharing is a good idea.It is a VERY good idea. |
c527537
to
9b95bb3
Compare
Heads up: Currently it isn't mergable cleanly. |
781835e
to
11796eb
Compare
I think I am done with the review. |
@glassez github says that this isn't mergable cleanly... |
Fix indentation in client.js and dynamicTable.js.
It's all because of commits that corrects the indentation. |
Thank you the code. |
WebUI: Implement server-side filtering, sorting and limit/offset.
Now you can use
json/torrents
request withfilter
parameter to retrieve filtered torrents.Example:
http://localhost:8080/json/torrents?filter=active