stash icon indicating copy to clipboard operation
stash copied to clipboard

Add recursive sort by performer_count and o_counter for studios, o_counter depth parameter, display updates

Open slick-daddy opened this issue 6 months ago • 1 comments

Related #6564

Summary

  • Studio o_counter(depth): o_counter now accepts a depth: Int parameter. Passing depth: -1 (or any non-zero value) recursively counts o-history across all sub-studios using a WITH RECURSIVE CTE. Displayed on cards, list view, and detail page as o_counter_all.
  • Recursive sort: Studios can be sorted by performer_count and o_counter, both resolved via recursive CTE to include sub-studios.
  • List view: Added o_counter column to the studio list table.
  • Display consistency: StudioCard, StudioListTable, and Studio details use _all variants (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.

slick-daddy avatar May 16 '26 01:05 slick-daddy

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.

slick-daddy avatar Jun 16 '26 02:06 slick-daddy