INTERACT FORUM
More => Old Versions => JRiver Media Center 27 for Windows => Topic started by: lise on January 19, 2021, 12:51:44 am
-
Is there a way to play "complete albums" OR "incomplete albums that are missing just a few tracks"?
Or maybe just "incomplete albums that have at least 8 tracks"?
The GroupCount(Track #) gives me the number of tracks so I'm almost there, but I can't finish. The expression: if(GroupCount(Track #)=8, yes, no) didn't work when I tried it in a column.
I'm not averse to creating (yet another) custom field for "almost complete albums" if I can figure out what the calculated data would be.
-
Groupcount(track #)=8 isn't proper syntax in the expression language.
Take a look at the Compare() function.
-
NOt exactly sure what you trying to do, but can't you use the rule logic that is already available in the smartlist?
Complete Album is False?
-
NOt exactly sure what you trying to do, but can't you use the rule logic that is already available in the smartlist?
Complete Album is False?
Most of my album oriented view schemes include Album Complete, so we end up listening to those a lot. But I have so many albums that are missing just one or two tracks that never make it those schemes. I don't want to use Album Complete False because then I end up with a bunch of 1 or 2 track albums. So I want a "good enough" type thing. I really don't mind if a 28 track album is missing one track!
-
Can't you just add a search list to your view, with the rule Total Tracks -> Is greater than -> 8?
(https://image.prntscr.com/image/iOW7AoraRKe5zJORrHNfDw.png)
-
Can't you just add a search list to your view, with the rule Total Tracks -> Is greater than -> 8?
(https://image.prntscr.com/image/iOW7AoraRKe5zJORrHNfDw.png)
I didn't even notice that Total Tracks was an item to be used in the rules! Alas, it doesn't work as expected. I have only two rules: Album is not complete, and Number of Tracks is equal to or greater than 8. Not working. I have more than 50 albums that meet the criteria, but it is only displaying around 8, and some have just one track. So maybe Total Tracks doesn't mean what I think it means.
-
You have put the search list on top? I can't test the incomplete album part as I don't have any incomplete albums.
-
Wer did try to push you to learn the correct syntax... you could play around with Zelda :)
if(compare(GroupCount(Track #),>=,8), yes, no)
I can't test the incomplete album part as I don't have any incomplete albums.
That's easily fixed with the DEL key ;D
-
Wer did try to push you to learn the correct syntax... you could play around with Zelda :)
if(compare(GroupCount(Track #),>=,8), yes, no)
That's easily fixed with the DEL key ;D
:o
-
Isn't groupcount() wrong function though. Haven't use these much as they can be terrible slow but shouldn't it be
Compare(GroupCountQuery(Album,Track #),>=,8)
To count tracks of an album and if it is >=8 return true ie 1
So pseudo code I guess you wanted to create a view which shows
Full album OR tracks >= 8 )
So something like this:
(
Complete Album = 1
OR
[=Compare(GroupCountQuery(Album,Track #),>=,8)]=1
)
E: fixed after Zybex review :D
untested "cheat mode activated" attachment included
-
Yes, most likely. I don't play much with group functions either, they're finicky. I can't get something simple to work, such as:
GroupCountQuery(year, name)
Shouldn't this tell me how many different titles there are for a given year? This always returns 0 for me.
PS: Is there an extra "1" at the end of your expression? 1]=1
PS2: No need to test for Complete Album = 0
-
I can't get something simple to work, such as:
GroupCountQuery(year, name)
Shouldn't this tell me how many different titles there are for a given year? This always returns 0 for me.
Oh crap.. just inserted this to my all audio view... why on earth people can do such stupid things...
PS: Is there an extra "1" at the end of your expression? 1]=1
I think it might be needed when doing truth comparisons with view rules, not sure though ;D
PS2: No need to test for Complete Album = 0
Right
-
This one is doing the trick, however because of the functions within is shows empty tags when condition is not met. If met it will display the Album name.
No clue how to remove the entries of the empty ones.
if(and(If(Compare([Complete Album, 1], =,1),, 1),Compare(GroupCountQuery(Album,Track #),>=,8)),[Album, 1],)
(https://image.prntscr.com/image/0wv_Q9-lTNadKL1anPpW-Q.png)(https://image.prntscr.com/image/f__hYHldSpi5eKrlDCxNJg.png)
Euh Zybex, How do i get my files back? Followed your suggestion with that DEL key......
-
I think you need an OR there, not AND:
if(or([Complete Album],Compare(GroupCountQuery(Album,Track #),>=,8)),[Album],)
This is meant to be used as a filter expression, so actually you can try this on MC's Search/filter box:
[=or([Complete Album],Compare(GroupCountQuery(Album,Track #),>=,8))]=1
or using Lise's suggestion (untested):
[=or([Complete Album],Compare(GroupCount(Track #),>=,8))]=1
I hope you're joking about the DEL :) If not, you need to run the Import tool to get them back.
-
Well the tweaking is for Lise to sort out.
Even though i am using JRiver for 10 years, never noticed the possibilities within the views.
And yes it was a joke. Used an old directory to test. ;D
-
Thanks to everyone. I'm still not done, but I've tried most of the suggestions here and some are so intensive that they crashed MC. So yeah, the Group thing probably isn't the way to go.
I've spent the last few hours looking through the archives, and among the many suggestions (that didn't work) I found this from v19: https://yabb.jriver.com/interact/index.php/topic,122370.msg846884.html#msg846884
ItemCount(albumkey/(/))
How many tracks are on a single album
And it works, but for one thing: My calculated field will not save Integer as data type. It just keeps switching back to String.
I need it to be Integer so that I can use it in rules: Temp is equal to or greater than 8. (And unless the procedure has changed recently, I did it the correct way, by first enabling Data, doing my thing, and then selecting Calculated.)
I read something about issues with calculated fields and integers in the last few hours, but it wasn't something that I saved. Does anyone know off hand what the issue is?
-
And it works, but for one thing: My calculated field will not save Integer as data type. It just keeps switching back to String.
You've forgotten what I taught you back in December about data type casting.
Put this at the end of your calculated field definition:
&datatype=[integer]
-
You've forgotten what I taught you back in December about data type casting.
Put this at the end of your calculated field definition:
&datatype=[integer]
Right. Thanks. I guess the old way of doing it doesn't work anymore.
-
You mean selecting with the data type combobox? That works for regular fields, but I don't remember that ever working for calculated data fields; all those options are disabled for calculated data.
Glad you're all sorted out...
-
You mean selecting with the data type combobox? That works for regular fields, but I don't remember that ever working for calculated data fields; all those options are disabled for calculated data.
Yeah. You used to have to enable the data stuff first THEN select Calculated data, and your data fields would be remembered.
-
Thanks to everyone. I'm still not done, but I've tried most of the suggestions here and some are so intensive that they crashed MC. So yeah, the Group thing probably isn't the way to go.
I usually do thing like this with global variables because as they are WAY more quicker than those using group functions and won't slow down view after it is refreshed. There is a small learning curve though as wer likes to say ;D
So in your case I'd calculate total existing track count to a variable and then compare it against that 8 to filter the results.
-
the groupcount/summary calcs are interesting and the syntax is very nice. if you assign them to a custom field, the calculation is only done when you call the field. don't use them in a view, you'll crash MC regularly.
[tracksfield]=groupsummaryquery(album;album artist /(auto/);Catalog #,Track #,1)
[Total Tracks] = [tracksfield]
now you can calculate on total tracks without any slowdown whatsoever. variables work much faster in a view, but are impossibly inelegant. it's a tradeoff for how you want to use the calculated data, or how often you might do some calculations. i guess i'm posting this as i think the variables system should die in favour of these functional expressions, but there needs to be massive speed improvements first...
-
Variables are easy and readable when they are not tied to fields (in this case they are)
In case someone is interested how this can be done with variables the filtering rules to get albums with more than 7 track would be something like this (All custom filter):
INIT VARIABLE:
[=Save(0, v_TrackCount[Album Artist (auto)][Album])1]=1
ADD TRACKS TO COUNT:
[=Save(Math(1 + Load(v_TrackCount[Album Artist (auto)][Album])), v_TrackCount[Album Artist (auto)][Album])1]=1
COMPARE:
[=Compare(Load(v_TrackCount[Album Artist (Auto)][Album]),>=,8)]=1
And the whole shebang including complete albums as import script
-[Album]=[] [Media Type]=[Audio] [=Save(0, v_TrackCount[Album Artist (auto)][Album])1]=1 [=Save(Math(1 + Load(v_TrackCount[Album Artist (auto)][Album])), v_TrackCount[Album Artist (auto)][Album])1]=1 ([Complete Album]=1 or [=Compare(Load(v_TrackCount[Album Artist (Auto)][Album]),>=,8)]=1)
There might be errors as I just typed it in here