INTERACT FORUM
More => Old Versions => JRiver Media Center 22 for Windows => Topic started by: Cmely on December 24, 2016, 10:17:53 am
-
Hello,
I've been looking for a solution but found nothing to help me, so I ask the forum.
I would like to make some filters / conditions that test some field values and apply the result to the whole album :o
With some example it will be easier to understand, I guess (I have to admit that I have myself some difficulties to understand my previous sentence :D :D).
For instance, I would like to be able to set a view / filter with this kind of condition :
- If at least one track of the album have been played don't show the whole album (in order to create a real 'never played' view)
OR
- If at least one track of the album is rated 5 stars then show the whole album.
For the first test I was thinking to calculate the sum of the "Played Number' field, but couldn't find how.
If you have any clue, I'll be very grateful :D
-
The "album" isn't a thing in MC. But...I think it could be at least somewhat done with variables. Variables aren't super simple, I'll think about it though
-
Yeah, variables are the answer.
https://wiki.jriver.com/index.php/Global_Variables
Although the second is as simple as:
[Rating]=5 ~a
-
My smartlist for how many times an album has been played: (create your own smartlist with these rules: it will be used below)
[Media Type]=[Audio] [=save(100000,v_albumplayed[album artist (auto)][album])1]=1 [=if(compare([number plays],<,load(v_albumplayed[album artist (auto)][album])),save([number plays],v_albumplayed[album artist (auto)][album]),1)1]=1
Once run, the number of plays for a given album will be stored in the variable: v_albumplayed[album artist (auto)][album] and you can create the filter, eg
[=compare(load(v_albumplayed[album artist (auto)][album]),=,0)]=1
This will result in only showing albums that have never been played.
Then you can OR the two rules above in the finale smartlist:
playlistid==* ([=compare(load(v_albumplayed[album artist (auto)][album]),=,0)]=1 or [Rating]=5) ~a
*your smartlist containing the rules above that calculate the number of plays.
[edit: fixed some errors transcribing from my setup to this example!]
-
Although, now I've reread your original request, I see you might be asking for something slightly different, eg
If an album has a track rated 5, show the whole album
Otherwise
Show all unplayed album tracks
All you need for that is two smartlists; one for each condition. And then a smartlist that calls both to combine the results.
eg,
smartlist 1: [Rating]=5 ~a
smartlist 2: [Number Plays]=0
smartlist 3: playlists IS ANY smartlist1, smartlist 2
-
Ferday, Mark_h, thank you for helping.
Mark_h thank you for giving me more than a hint :)
Your first answer was the best (for me). The two conditions didn't need to be tied together. However, both of your answers were very helping. Thanks ! :D
-
Mark_h, I've been trying to adapt your answer in order to create a View showing albums based on the number of times albums has been played...but I did certainly miss something and haven't been able to achieve this.
Would you be kind enough to point me in the right direction ? (I mean, I know this is already what you've done :D but I'm afraid I'm not savvy enough ...).
-
I made some transcription errors copying the rules from my library to the example. I've fixed those now... Perhaps it now works better for you?
-
?
When I create a smartlist with your expression :
[Media Type]=[Audio] [=save(100000,v_albumplayed[album artist (auto)][album])1]=1 [=if(compare([number plays],<,load(v_albumplayed[album artist (auto)][album])),save([number plays],v_albumplayed[album artist (auto)][album]),1)1]=1
I get an empty smartlist. Is this normal ? (I've created it by using 'Import/export' in smartlist rules)
-
I copy and pasted that and get my entire collection presented. This is what I'd expect, as the smartlist is looking at every entry to generate the 'album played' variable.
If I add an expression column to the result view with
load(v_albumplayed[album artist (auto)][album])
I see the album played count displayed...