|
Post by MotleyGord on Aug 27, 2020 23:27:19 GMT -5
strcmp and stricmp return 0 is they are equal to answer your original question.. you should be able to nest functions. i checked the code and every parameter will run through the parser to resolve it if its a function. something else must be wrong with the line Thanks for the feedback. I'll work through this further to see where I'm missing something. For now I have almost my ideal layout now, just shared above. G
|
|
|
Post by GoneMAD on Aug 27, 2020 23:42:49 GMT -5
feel free to paste some lines that dont work and i can load them up and see whats up
|
|
|
Post by MotleyGord on Aug 27, 2020 23:49:18 GMT -5
feel free to paste some lines that dont work and i can load them up and see whats up Thanks, I will if I really get stuck. A suggestion for formatting - like <wrap>, create a marker <ignore> or similar, to not use up a line space if all functions for that line end up blank.
|
|
|
Post by GoneMAD on Aug 28, 2020 9:05:16 GMT -5
feel free to paste some lines that dont work and i can load them up and see whats up Thanks, I will if I really get stuck. A suggestion for formatting - like <wrap>, create a marker <ignore> or similar, to not use up a line space if all functions for that line end up blank. i can look into it, but at least with how things are done now the number of lines is created when the ui is opened (creating a new layout for each track change would be a massive performance hit). Basically the metadata lines get converted into "spans" which are basically just a way to style text. They are powerful, but pretty performant because its really no different than telling a textfield to display different text developer.android.com/guide/topics/text/spans
|
|
|
Post by MotleyGord on Aug 28, 2020 10:10:41 GMT -5
Thanks, I will if I really get stuck. A suggestion for formatting - like <wrap>, create a marker <ignore> or similar, to not use up a line space if all functions for that line end up blank. i can look into it, but at least with how things are done now the number of lines is created when the ui is opened (creating a new layout for each track change would be a massive performance hit). Basically the metadata lines get converted into "spans" which are basically just a way to style text. They are powerful, but pretty performant because its really no different than telling a textfield to display different text developer.android.com/guide/topics/text/spansOK got it. I can work with this, just need to be creative with the layouts I'm working on for appearance. Thanks!
|
|
|
Post by MotleyGord on Aug 29, 2020 21:43:32 GMT -5
feel free to paste some lines that dont work and i can load them up and see whats up Both of these functions work as expected if I use them separately. But as soon as I nest one within the other, the result is a blank line. $ifequal($strcmp(%aa%,Various Artists),0,%al%,$ifequal($strstr(%al%,%aa%),-1,%aa% • %al%,%al%)) Expected result: 1. If %aa% is Various Artists, the line should only show %al% 2. Else, if %al% doesn't contain %aa%, show %aa% • %al% 3. Else show %al%
|
|
|
Post by GoneMAD on Aug 29, 2020 21:52:12 GMT -5
feel free to paste some lines that dont work and i can load them up and see whats up Both of these functions work as expected if I use them separately. But as soon as I nest one within the other, the result is a blank line. $ifequal($strcmp(%aa%,Various Artists),0,%al%,$ifequal($strstr(%al%,%aa%),-1,%aa% • %al%,%al%)) Expected result: 1. If %aa% is Various Artists, the line should only show %al% 2. Else, if %al% doesn't contain %aa%, show %aa% • %al% 3. Else show %al% thanks. i'll give that one a try.
|
|
|
Post by GoneMAD on Aug 31, 2020 19:35:28 GMT -5
k yea its a bug in the parser.. i should be able to fix it
|
|
|
Post by MotleyGord on Aug 31, 2020 21:11:31 GMT -5
k yea its a bug in the parser.. i should be able to fix it OK great. This will be useful with the upcoming custom metadata in lists that you have in Trello!
|
|
|
Post by GoneMAD on Sept 1, 2020 6:34:56 GMT -5
it certainly will be interesting to see how much complex metadata lines affect performance on the lists
|
|
|
Post by MotleyGord on Sept 2, 2020 22:22:53 GMT -5
For the variable DURATION = %du% and if the track length is less than 10:00, the minutes value has a padded 0.
Example: 07:35 is shown rather than the actual length value of 7:35. Is this a fixed and necessary function of %du%?
|
|
|
Post by GoneMAD on Sept 2, 2020 23:13:55 GMT -5
For the variable DURATION = %du% and if the track length is less than 10:00, the minutes value has a padded 0. Example: 07:35 is shown rather than the actual length value of 7:35. Is this a fixed and necessary function of %du%? without looking at the code id guess its reusing what now playing uses for the time. its converting seconds / milliseconds into a time string. you should be able to use some metadata function magic to detect if the field is 5 characters long and beginswith a 0, trim the first character $cut, $ifequal, $len, and $right (once the nested function fix is out) $if($and($ifequal($len(%du%), 5), $ifequal($cut(%du%), 0)), %right(%du%, 4), %du%) or something along the lines of that. I did not test it. To answer your actual question.. yes the 0 is there intentionally. thats how i wanted to display time so the text didnt shift when swapping between tracks >= 10 min and < 10 min.
|
|
|
Post by MotleyGord on Sept 3, 2020 9:06:12 GMT -5
Got it thanks. I did try some logic to adjust the display, it will wait until the nested functions work. Thanks for the reply.
|
|
|
Post by MotleyGord on Sept 5, 2020 22:22:49 GMT -5
With %codec% both currently planned to be available in GMMP, is there any way to determine what the track format is currently being played? Rather than simply use the %ext% tag, is there a specific way to grab the format type like FLAC, ALAC, AAC, MP3, etc?
|
|
|
Post by GoneMAD on Sept 6, 2020 9:26:11 GMT -5
With %codec% both currently planned to be available in GMMP, is there any way to determine what the track format is currently being played? Rather than simply use the %ext% tag, is there a specific way to grab the format type like FLAC, ALAC, AAC, MP3, etc? no. that information is not made available by the tag reader. you could make some assumptions based off the extension and the bitrate tho and make a guess
|
|