INTERACT FORUM
More => Old Versions => JRiver Media Center 31 for Windows => Topic started by: JimK on October 27, 2024, 02:48:30 pm
-
Is there a way to create a library tree view that groups album artists by number of albums? I was able to create a view that lists the number of albums by album artist, but not a way to group them.
For example:
Number of Albums
8 Albums
Album Artist #1
Album Artist #2
11 Albums
Album Artist #1
Album Artist #2
Album Artist #3
-
You can add an Expression category with GroupCountQuery(), set it as Descending:
GroupCountQuery(Album Artist /(Auto/), Artist - Album /(Year/)) Albums
Then add an Artist category, and under that add the Artist - Album (Year) Category (or just Album name, as you prefer).
Be warned that this will likely be unusably slow due to GroupCountQuery(). Ideally you would need to pre-calculate that expression and save it into a Field, and then use that field as a Category instead of the Expression. ZStats can help with that.
-
Thanks for the reply.
I create the expression using GroupCountQuery. When I have it in the list of categories in any position other than first, it returns the correct value almost immediately. However, when it is the first category, it never finishes processing, and I have to kill the application in Task Manager.
If I do create a calculated field to store the album count, how would I tie that field to the Artist?
-
You can set the field to "Relational: One value per Album Artist (Auto)".
The way MC works, it will still want to calculate this value for each and every file even though the result is the same for the same artist, which kind of defeats the purpose of a Relational field.
This expression is likely much faster, but it will only refresh the counts if you restart MC:
if(isempty(load(_acount_{[Album Artist /(Auto/)]})),save(GroupCountQuery(Media Sub Type;Album Artist /(Auto/), Artist - Album /(Year/)), _acount_{[Album Artist /(Auto/)]}),load(_acount_{[Album Artist /(Auto/)]})) Movies
-
Thank you! That expression worked exactly the way I needed and displayed instantaneously.