$sound().tag bug, Khaled please look - 29/09/06 09:27 PM
Found a bug in $sound().tag, not sure what's causing it, but in some mp3's it will not list all the tags... using your alias from help, I notice that it seems to halt after finding an APIC tag (assuming it's the last tag?). If you wish, I can show you my code for finding tags in ID3v2 files if that would help fild the problem.
Also, why I am at it, $sound(file,n).tag when targeting an APIC tag is not echo'able because it is assigned the entire length of the image. Can this possibly be changed to assign the binary info to a &binvar and showing the image/jpg info when finding an APIC tag?
Modified code from help to bypass APIC...
Output...
Tags 1,2,3,4,5,7,8 and 9 are blank...
My scripts output for this same file...
Aside from your APIC not being echo'd... my script found several other tags AFTER the APIC tag... APIC was found at 147 bytes, which is the last tag your $sound().tag found, then TYER is at 20,269 bytes...
Hope this helps find the problem, if you wish I can reply with the code I wrote to find the tags.
-Rappy
Also, why I am at it, $sound(file,n).tag when targeting an APIC tag is not echo'able because it is assigned the entire length of the image. Can this possibly be changed to assign the binary info to a &binvar and showing the image/jpg info when finding an APIC tag?
Modified code from help to bypass APIC...
Code:
alias showtags { if ($1- == $null) { echo 2 -e * /showtags: please specify filename, eg. /showtags file.mp3 | halt } echo -a id3: $sound($1-).id3 echo -a tags: $sound($1-).tags echo -a filename: $1- var %n = $sound($1-,0).tag dec %n while (%n > 0) { echo -a tag: %n $sound($1-,%n).tag dec %n } }
Output...
Code:
id3: v2.3.0 tags: TENC WXXX TCOP TOPE TCOM COMM PCNT PCNT PCNT APIC filename: C:\mp3\2 Pac - Changes.mp3 tag: 9 PCNT tag: 8 PCNT tag: 7 PCNT tag: 6 COMM eng Rappy's TOYZ tag: 5 TCOM tag: 4 TOPE tag: 3 TCOP tag: 2 WXXX tag: 1 TENC
Tags 1,2,3,4,5,7,8 and 9 are blank...
My scripts output for this same file...
Code:
‹×› ID3v2.3.0 Detected. %h = 21490 ‹×› TAG APIC FOUND @ 147 TEXT image/jpg ‹×› eng = Rappy's TOYZ ‹×› TAG PCNT FOUND @ 105 TEXT ‹×› TAG TCOM FOUND @ 67 TEXT ‹×› TAG TCOP FOUND @ 45 TEXT ‹×› TAG TENC FOUND @ 22 TEXT ‹×› TAG TOPE FOUND @ 56 TEXT ‹×› TAG WXXX FOUND @ 32 TEXT ‹×› engMusicMatch_Tempo = None ‹×› engMusicMatch_Preference = None ‹×› TAG PCNT FOUND @ 20284 TEXT ‹×› TAG TALB FOUND @ 20516 TEXT Greatest Hits ‹×› TAG TCON FOUND @ 20498 TEXT (15)Rap ‹×› TAG TFLT FOUND @ 20449 TEXT /3 ‹×› TAG TIT2 FOUND @ 20480 TEXT Changes ‹×› TAG TMED FOUND @ 20462 TEXT (CD/DD) ‹×› TAG TPE1 FOUND @ 20540 TEXT 2 PAC ‹×› TAG TRCK FOUND @ 20352 TEXT 17 ‹×› TAG TYER FOUND @ 20269 TEXT 1998 531ms
Aside from your APIC not being echo'd... my script found several other tags AFTER the APIC tag... APIC was found at 147 bytes, which is the last tag your $sound().tag found, then TYER is at 20,269 bytes...
Hope this helps find the problem, if you wish I can reply with the code I wrote to find the tags.
-Rappy