-
Notifications
You must be signed in to change notification settings - Fork 75
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
Add summary mode to API /serie/byfolder for Web UI #619
Comments
I'd say we should make a new module targeting stats. It'll have minimal info, but stats tend to have separate use case with speed taking priority. Having a separate module targeting it would reduce the code complexity. |
/serie/ should return info about serie. current thing should show file size with proper What info you need to be return so we can thing of filter for current api or add new command to list series in folders. But probably like @da3dsoul new module for stats could be good idea as it would be speed over amount of info. the main question would be how fast will those command runs, as we could end up iterating by same objects on both api's ending up with same speed... |
Web UI has import folders tab where it shows a list: What can be improved is probably to show number of videolocals vs total number of videolocals. I am thinking about a series being split into two separate foldes so you would see something like: Series name (20 files of 35) - 1.23 GB |
Just make a list of exactly what data you want, and I will make you endpoints for it |
Preferably in tree form |
An array of Series each having:
|
You want series. So we looking for |
Added in ShokoAnime/Shoko-WebUI@5e45a51 |
This broke at some point. |
@hidden4003 its slow because its simple iteration over vlocal folde, serie inside folder, episode inside serie; this was needed because you wanted size of each serie in that folder; without pre-populating static values like if you add/remove series some static table would get updated so you get almost 'identical' results in just a manner of miliseconds you need to iterate over it all the time you want the info - or we could just that info to vlocal folder so if you query folder the folder know its 'content' and that would work also for cloud based/external drives which would be fun. but then again we would have to iterate over vlocal series to get episode or if we store local count of files we could get that. @ElementalCrisis you are probably right, but that was never the case - that function never did return those information; @da3dsoul how did it broke? I query it and its all the same as it was when added - ultra slow, but working; |
ultra slow is kinda an understatement:
|
@Cazzar iterating over your/mine collection give those results. thats why by default its limit=100. also it was added as container because no-one cared enought to add this and we wanted to push webui forward. also abotu webui. fix that docker of your because its is not compatible with To be honest, You can see that I wrote |
And then we'll see my rewrite cut it down to milliseconds |
I'm not going to use custom SQL just yet, since max is refactoring DB stuff |
The issue itself I believe may revolve around ShokoServer/Shoko.Server/API/v2/Modules/Common.cs Line 2032 in 8df4ff8
|
@da3dsoul you are some kind on ninja-coder 👍 |
This has been resolved by 8a54767
though @bigretromike I do know how to do profiling as well, and it turned out that my suspicions were true, generating the contract for every episode... not that clean of a way to do it to begin with. |
Reclosed |
It doesn't need paginating. It's a stats listing. It also doesn't respect user levels, it's a stats listing |
so it way to bypass collection restrictions then ? |
No it's just the purpose of it is to list very little info on everything for totals |
are we talking about same api endpoint ? it return series inside give import folder. |
Ok, if it is to much I will do it later myself, no point it pushing this so long. |
It gives exactly what he asked for in the OP, nothing more except ID. |
Please don't touch it, it works great |
It's serie/infobyfolder |
then please add |
Nope it's getting changed as soon as max merges his latest project anyway. We are starting APIv3 at that point. Making it more standardized |
No one except avael uses it, so I'm not concerned |
if no one use it.. why did you care to fix it in first place? |
"No except avael" because we love avael, and I'll fix things for the future of WebUI and ClientV2 |
@japanesemediamanager/api
WebUI Import folders tab was using API /serie/byfolder to show list of series in a folder with their filesizes, series strorage was calculated as total of all videolocals.
Current version has no filesizes and returns a lot of stuff I don't need.
I don't know which is better adding a mode here or making new api call.
The text was updated successfully, but these errors were encountered: