|
Post by GoneMAD on Mar 25, 2022 7:52:00 GMT -5
try $add instead of $max maybe? I dunno i gave you the basic idea.. try things until it works
|
|
|
Post by MotleyGord on Mar 25, 2022 11:28:44 GMT -5
If either the playcount (%pc%) or the skip count (%skp%) is greater than zero, then display the track rating (%ra%). In other words, if the track has neither been played nor skipped, then don't show its rating. Sorry I misread this original post. I am not sure if you can have a conditional comparison like this, and have the rating (or any other field) appear, or not appear, based on the result of the comparison. The $notempty() function will only work if the field does not exist at all.
|
|
|
Post by viper21 on Mar 25, 2022 12:00:25 GMT -5
OK, so after some testing there's definitely something funky happening. I have a sample list of tracks where some have been played/skipped and others neither played nor skipped. None of the tracks have been rated. With this sample, I ran these test conditions: 1. When I use this condition $ifequal($add(%pc%,%skp%),0,true,false) then it works as expected => some tracks show "true" and others "false". 2. When I use this condition $ifequal($add(%pc%,%skp%),0,true,%ra%) then it works as expected => some tracks show "true" and others the rating value (not stars). 3. When I use this condition $ifequal($add(%pc%,%skp%),0,true,$rating(%ra%)) then it doesn't work as expected => all the tracks shows their rating in stars (zero stars coz none have been rated). It seems that adding "$rating(%ra%)" instead of "%ra%" in the false part of the condition breaks something in the condition. Please tell me I am not going crazy.
|
|
|
Post by GoneMAD on Mar 25, 2022 12:09:49 GMT -5
OK, so after some testing there's definitely something funky happening. I have a sample list of tracks where some have been played/skipped and others neither played nor skipped. None of the tracks have been rated. With this sample, I ran these test conditions: 1. When I use this condition $ifequal($add(%pc%,%skp%),0,true,false) then it works as expected => some tracks show "true" and others "false". 2. When I use this condition $ifequal($add(%pc%,%skp%),0,true,%ra%) then it works as expected => some tracks show "true" and others the rating value (not stars). 3. When I use this condition $ifequal($add(%pc%,%skp%),0,true,$rating(%ra%)) then it doesn't work as expected => all the tracks shows their rating in stars (zero stars coz none have been rated). It seems that adding "$rating(%ra%)" instead of "%ra%" in the false part of the condition breaks something in the condition. Please tell me I am not going crazy. might be a bug with $rating. the custom metadata parser is pretty complex and i've admittedly not tested much when it comes to nested functions. I will look into it
|
|
|
Post by GoneMAD on Mar 25, 2022 12:13:45 GMT -5
another thing to try is $rating(val, $ifequal($add(%pc%,%skp%),0,10,0))
the 2nd parameter to rating is a minimum rating to show stars.. so if pc + skp == 0, setting the minimum to 10 would mean all ratings would be below the minimum, if != 0 all ratings would be >= the minimum of 0
worth a try. This is assuming i coded it so you could nest functions everywhere.. which i THOUGHT i did, but not positive
|
|
|
Post by viper21 on Mar 25, 2022 12:24:01 GMT -5
another thing to try is $rating(val, $ifequal($add(%pc%,%skp%),0,10,0)) the 2nd parameter to rating is a minimum rating to show stars.. so if pc + skp == 0, setting the minimum to 10 would mean all ratings would be below the minimum, if != 0 all ratings would be >= the minimum of 0 worth a try. This is assuming i coded it so you could nest functions everywhere.. which i THOUGHT i did, but not positive With this, the tracks do conditionally show their rating (i.e., rating stars are shown only if the track has been played/skipped); however, the rating value shown is incorrect -- shows zero stars even for tracks that are rated.
|
|
|
Post by viper21 on Mar 25, 2022 12:54:48 GMT -5
I changed it to $rating(%ra%,$ifequal($add(%pc%,%skp%),0,10,0)) and now it works!! Thank you.
|
|
|
Post by GoneMAD on Mar 25, 2022 13:03:52 GMT -5
oh yea sorry. i was just copy pasted from the $rating documentation and modified the second param.
Glad you got it working!. I will look into the ones you had issues with earlier. What i do love about all these functions is that even if there are bugs.. there are so many diff ways to solve a problem that one of them is bound to work haha
|
|
|
Post by MotleyGord on Mar 25, 2022 13:24:26 GMT -5
I changed it to $rating(%ra%,$ifequal($add(%pc%,%skp%),0,10,0)) and now it works!! Thank you. Awesome. Does it actually not display anything if both are 0?
|
|
|
Post by viper21 on Mar 25, 2022 13:28:04 GMT -5
oh yea sorry. i was just copy pasted from the $rating documentation and modified the second param. Glad you got it working!. I will look into the ones you had issues with earlier. What i do love about all these functions is that even if there are bugs.. there are so many diff ways to solve a problem that one of them is bound to work haha I don't know how your brain came up with the last one that worked. Must be years of programming. But hey, it worked!! So no complaints from me. I just love how I can continuously improve GMMP to feed my daily music addiction. All thanks to GMMP's magical customization features. And coupling GMMP intents with Tasker, the sky is the absolute limit.
|
|
|
Post by viper21 on Mar 25, 2022 13:29:29 GMT -5
I changed it to $rating(%ra%,$ifequal($add(%pc%,%skp%),0,10,0)) and now it works!! Thank you. Awesome. Does it actually not display anything if both are 0? Nothing is displayed.
|
|
|
Post by viper21 on Mar 26, 2022 6:32:49 GMT -5
I changed it to $rating(%ra%,$ifequal($add(%pc%,%skp%),0,10,0)) and now it works!! If anyone is interested in using this condition in their custom metadata, I've updated it to include the rating in the add function. There were some isolated cases in the queue view (where I am using this condition) that a rated track wasn't showing its rating 'coz the track wasn't yet registered as played or skipped. This is the updated version: $rating(%ra%,$ifequal($add(%pc%,%skp%,%ra%),0,10,0))
|
|
|
Post by appick on Aug 16, 2022 7:11:15 GMT -5
Hi, I'm new to GMMP and I have been trying to import a json file since last week. I've read as much as possible of the forum posts, but 26 pages of information is a lot ! The problem is that I don't seem to have the possibility to import anything. At first I thought that perhaps the feature had been disabled since 3.2 (point at which I bought the license) but I see that people are still posting about this feature. I'm not sure where to look so I've looked everywhere and I can't find the toolbar menu mentioned in the help sections. Have I disabled by accident? I'm using a Samsung A40. Android 11. Also the scan process seems to be incredibly slow (64 GB plus 126 GB SD card) 3800 songs, about 6 hours to scan, when my previous player (Media Monkey) took less than half an hour. Love the random albums feature (which is why I changed players) and I'm loving the rest too.
|
|
|
Post by MotleyGord on Aug 16, 2022 8:28:42 GMT -5
Hi, I'm new to GMMP and I have been trying to import a json file since last week. I've read as much as possible of the forum posts, but 26 pages of information is a lot ! The problem is that I don't seem to have the possibility to import anything. At first I thought that perhaps the feature had been disabled since 3.2 (point at which I bought the license) but I see that people are still posting about this feature. I'm not sure where to look so I've looked everywhere and I can't find the toolbar menu mentioned in the help sections. Have I disabled by accident? I'm using a Samsung A40. Android 11. Also the scan process seems to be incredibly slow (64 GB plus 126 GB SD card) 3800 songs, about 6 hours to scan, when my previous player (Media Monkey) took less than half an hour. Love the random albums feature (which is why I changed players) and I'm loving the rest too. This is pretty slow, even if you have Goggle's fancy new SAF protecting you. I don't know what you mean by "import" a json. Simply copy the file to a folder that you can access. Then from the custom metadata menu select that file. It won't work if the json has invalid structure or commands.
|
|
|
Post by GoneMAD on Aug 16, 2022 9:05:55 GMT -5
Hi, I'm new to GMMP and I have been trying to import a json file since last week. I've read as much as possible of the forum posts, but 26 pages of information is a lot ! The problem is that I don't seem to have the possibility to import anything. At first I thought that perhaps the feature had been disabled since 3.2 (point at which I bought the license) but I see that people are still posting about this feature. I'm not sure where to look so I've looked everywhere and I can't find the toolbar menu mentioned in the help sections. Have I disabled by accident? I'm using a Samsung A40. Android 11. Also the scan process seems to be incredibly slow (64 GB plus 126 GB SD card) 3800 songs, about 6 hours to scan, when my previous player (Media Monkey) took less than half an hour. Love the random albums feature (which is why I changed players) and I'm loving the rest too. that seems insanely slow. one of my budget test devices can scan in 20k songs in about 10 minutes be sure to disable any power saving / battery optimizations for the app. Being a samsung it is likely killing the scanner service (causing it to restart and having to recheck already scanned files) www.dontkillmyapp.comalso, a lot of times i'll do my initial scan when the device is plugged in. Once everything is scanned all future scans should be pretty quick since its only looking for changes to the file system
|
|