Add recursive sort by performer_count and o_counter for studios, o_counter depth parameter, display updates
Related #6564
Summary
- Studio o_counter(depth):
o_counternow accepts adepth: Intparameter. Passingdepth: -1(or any non-zero value) recursively counts o-history across all sub-studios using aWITH RECURSIVECTE. Displayed on cards, list view, and detail page aso_counter_all. - Recursive sort: Studios can be sorted by
performer_countando_counter, both resolved via recursive CTE to include sub-studios. - List view: Added
o_countercolumn to the studio list table. - Display consistency: StudioCard, StudioListTable, and Studio details use
_allvariants (scene_count_all,performer_count_all,o_counter_all) for recursive counts across sub-studios.,,
UI Changes
- Sort options: Studio list filter now has sort by "O-Count" and "Performer Count" options.
- List table: New "O-Count" column showing recursive o-counter with sub-studios included.
- Cards: Parent studio cards now display scene_count_all (scenes + sub-studios), performer_count_all (performers + sub-studios), and o_counter_all instead of flat counts.
- Detail page: The o-counter badge in the parent studio detail card now shows the recursive total (all sub-studios included).
Tested and works.
I implemented O Count (All) and Performer Count (All) as a sorting option. Now it should be less controversial.
I realized some details while testings.
-
Network cards don't show O count, performer count and scene count in their respective cards as a badge, but studios do. When sorted, this creates asymmetry. I think we shouldadd these badges to networks as well. It should resolve from sum of their respective entities. This would improve the general user experience. The only controversial part will be for the networks that has their own scenes (not binded to any of their sub-studios). I think this part should be discussed. It can be added as a config option to settings.
-
If a network has only one sub-studio, that means their o count will be same. The algorithm first shows (sorts) the network and then the sub-studio. This is a nice touch.