|
Post by GoneMAD on Apr 7, 2020 18:38:24 GMT -5
Added a bunch of new functions to the original post for beta 4
|
|
|
Post by viper21 on Apr 9, 2020 7:18:54 GMT -5
I am not quite sure i understand $rating(val). What goes in the val part?
I just want to display the current rating in stars.
What formula would i use to display the rating in stars but only if the track has a rating of 0.5 or above?
Also would it be possible to display instead of actual stars something like 1*,2*,.., 5*?
|
|
|
Post by GoneMAD on Apr 9, 2020 12:06:40 GMT -5
I am not quite sure i understand $rating(val). What goes in the val part? I just want to display the current rating in stars. What formula would i use to display the rating in stars but only if the track has a rating of 0.5 or above? Also would it be possible to display instead of actual stars something like 1*,2*,.., 5*? typically you put the rating variable %ra%, but it would work for anything that evaluates into a number. I just updated the initial post to reflect that
|
|
|
Post by viper21 on Apr 9, 2020 13:20:29 GMT -5
I am not quite sure i understand $rating(val). What goes in the val part? I just want to display the current rating in stars. What formula would i use to display the rating in stars but only if the track has a rating of 0.5 or above? Also would it be possible to display instead of actual stars something like 1*,2*,.., 5*? typically you put the rating variable %ra%, but it would work for anything that evaluates into a number. I just updated the initial post to reflect that Got it. Thanks.
|
|
|
Post by viper21 on Apr 9, 2020 13:45:53 GMT -5
I don't completely understand the functions described in the first post. I prefer not to make a mistake in teh JSON -- last time that happened, I had to reinstall GMMP to to restore it. Can someone help with the JSON I need for the following (for beta 4): 1. Display the rating as stars, but only if the track has a rating of 0.5 or more. If no rating then don't display 5 empty stars. 2. Display the CD number as CD<x>, but only if the track has a CD number definded. Output example: "CD1" or nothing at all. Thank you.
|
|
|
Post by MotleyGord on Apr 9, 2020 16:27:38 GMT -5
I don't completely understand the functions described in the first post. I prefer not to make a mistake in teh JSON -- last time that happened, I had to reinstall GMMP to to restore it. Can someone help with the JSON I need for the following (for beta 4): 1. Display the rating as stars, but only if the track has a rating of 0.5 or more. If no rating then don't display 5 empty stars. 2. Display the CD number as CD<x>, but only if the track has a CD number definded. Output example: "CD1" or nothing at all. Thank you. For this you can use the $notempty function.
|
|
|
Post by viper21 on Apr 9, 2020 16:44:15 GMT -5
I don't completely understand the functions described in the first post. I prefer not to make a mistake in the JSON -- last time that happened, I had to reinstall GMMP to to restore it. Can someone help with the JSON I need for the following (for beta 4): 1. Display the rating as stars, but only if the track has a rating of 0.5 or more. If no rating then don't display 5 empty stars. 2. Display the CD number as CD<x>, but only if the track has a CD number defined. Output example: "CD1" or nothing at all. Thank you. For this you can use the $notempty function. So something like this? 1. $notempty($rating(%ra)) 2. $notempty(CD%dn) <== this doesn't see right with the "CD" string in it.
|
|
|
Post by GoneMAD on Apr 9, 2020 17:23:47 GMT -5
For this you can use the $notempty function. So something like this? 1. $notempty($rating(%ra)) 2. $notempty(CD%dn) <== this doesn't see right with the "CD" string in it. So ratings are 0-10 so $ifgreater(%ra%, 0, $rating(%ra%)) for the disc number you can use $if2(%dn%, CD%dn%) the reason why variables are surrounded by %% is so gmmp knows what to replace CD%dn% would change to CD2 or whatever
|
|
|
Post by viper21 on Apr 10, 2020 0:20:50 GMT -5
So something like this? 1. $notempty($rating(%ra)) 2. $notempty(CD%dn) <== this doesn't see right with the "CD" string in it. So ratings are 0-10 so $ifgreater(%ra%, 0, $rating(%ra%)) for the disc number you can use $if2(%dn%, CD%dn%) the reason why variables are surrounded by %% is so gmmp knows what to replace CD%dn% would change to CD2 or whatever Perfecto. Thanks a bunch.
|
|
|
Post by patrick on Apr 11, 2020 5:09:40 GMT -5
The $notempty(%yr%) doesn't work for me. If year is not empty it only displays %yr% instead of the actual Year. Am I missing sth? Greets
|
|
|
Post by viper21 on Apr 11, 2020 8:40:07 GMT -5
The $notempty(%yr%) doesn't work for me. If year is not empty it only displays %yr% instead of the actual Year. Am I missing sth? Greets Same here. No joy. Also $ifgreater(%ra%, 0, $rating(%ra%)) is showing the rating stars (albeit empty) even when the track has no rating.
|
|
|
Post by MotleyGord on Apr 11, 2020 9:31:26 GMT -5
Patience prevailed and Google has finally moved the beta 4 update to the Play Store for download today.
I'm having a similar issue with %cp% tag when using the $notempty(%cp%) function. This was working in the beta3b update, so something has broken in beta4 with notempty. I haven't looked at any of the other additions yet, this was right at first launch after the update. G
|
|
|
Post by MotleyGord on Apr 11, 2020 9:58:43 GMT -5
Patience prevailed and Google has finally moved the beta 4 update to the Play Store for download today. I'm having a similar issue with %cp% tag when using the $notempty(%cp%) function. This was working in the beta3b update, so something has broken in beta4 with notempty. I haven't looked at any of the other additions yet, this was right at first launch after the update. G Actually it seems the $notempty() function is working, but the %cp% container is the actual culprit. Even if I remove any function around it, it still is simply displayed as "%cp%" as opposed to the actual contents, even if the tag exists. Hope this helps. G
|
|
|
Post by GoneMAD on Apr 11, 2020 10:19:27 GMT -5
i'll look into notempty. %yr% cannot never not be empty. It'll be 0 if nothing was ever set
you can use $if3 instead of notempty. They are basically identical
$if3(a1,a2,...,aN,else) Evaluates arguments a1 ... aN, until one is found that evaluates to true. If that happens, its value is returned. Otherwise the else part is evaluated and its value returned.
|
|
|
Post by MotleyGord on Apr 11, 2020 15:41:13 GMT -5
It actually looks like the $notpty() function is working, as tracks in this case that have no composer don't show anything as expected. However for tracks with a composer tag they are not being displayed with the actual data, but instead literally are displaying "%cp%" as a string now. G
|
|