Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Code problem (Read 1967 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Code problem

Hi,

at the moment in my columns ui playlist view I format the first track of an album different. But simply by detecting, if the id3 track number is "1"

$if($strcmp($num(%tracknumber%,2),'01')

But to detect more acurately, if its part of an album, I need to have a look into the album tags of the following tracks. Is that possible?

There are lots of playlists which show album information on the left side, I'm sure they do also look into id3 infos of the next playlist entries. But the scripts are so full of variables so I cannot find out how they did it....

Code problem

Reply #1
Quote
Hi,

at the moment in my columns ui playlist view I format the first track of an album different. But simply by detecting, if the id3 track number is "1"

$if($strcmp($num(%tracknumber%,2),'01')

But to detect more acurately, if its part of an album, I need to have a look into the album tags of the following tracks. Is that possible?[a href="index.php?act=findpost&pid=291548"][{POST_SNAPBACK}][/a]
No!

Quote
There are lots of playlists which show album information on the left side, I'm sure they do also look into id3 infos of the next playlist entries.[a href="index.php?act=findpost&pid=291548"][{POST_SNAPBACK}][/a]
Then you're wrong!
It's one track at a time with no knowledge of the surrounding tracks.
Btw: This has been answered several times, so you should be able to find old posts discussing it.

The best you can do is use the tracknumbers, and at the same time assume that every track in an album has the same tags present. By assuming the latter, you can make the album info dynamic, meaning that you won't get empty lines in the album info.
Example: Say you want to show %date% on line 3 (%tracknumber% = 3) and %genre% on 4. A dynamic solution would move %genre% up from 4 to 3 if %date% is missing.

To achieve this, I would recommend you have a look at picmixer's formatting (maybe it's foosion that deserves the credit, as he has optimized parts of that formatting. I don't know.)