losing POPM counter on read ID3v2

Post Reply
kevinslist
User
Posts: 1
Joined: Sat Feb 19, 2011 8:51 am
Are you a spambot?: no

losing POPM counter on read ID3v2

Post by kevinslist » Sat Feb 19, 2011 9:05 am

version: 1.8.4-20110203
problem: the counter field of the POPM frame is not being output because it is being overwritten before returning data.

fix
------------------------
file: module.tag.id3v2.php
line: 1381

original
$parsedFrame['data'] =...
fixed
$parsedFrame['counter'] =....

-----------------------
at least that fixed for me,
not sure if "writing" tag has same issue, havent made it that far.
thanks for getid3

James Heinrich
getID3() v1 developer
Posts: 1477
Joined: Fri May 04, 2001 4:00 pm
Are you a spambot?: no
Location: Northern Ontario, Canada
Contact:

Re: losing POPM counter on read ID3v2

Post by James Heinrich » Sat Feb 19, 2011 1:25 pm

A sample file with a POPM field would be appreciated. Either PM me a link or email a sample file to info@getid3.org, please.

James Heinrich
getID3() v1 developer
Posts: 1477
Joined: Fri May 04, 2001 4:00 pm
Are you a spambot?: no
Location: Northern Ontario, Canada
Contact:

Re: losing POPM counter on read ID3v2

Post by James Heinrich » Wed Mar 02, 2011 1:32 pm

Fixed as suggested in v1.8.6
A sample file would still be welcome, if anyone has one (or can suggest an application that writes such tags).

James Heinrich
getID3() v1 developer
Posts: 1477
Joined: Fri May 04, 2001 4:00 pm
Are you a spambot?: no
Location: Northern Ontario, Canada
Contact:

Re: losing POPM counter on read ID3v2

Post by James Heinrich » Sat Mar 05, 2011 1:10 pm

kevinslist wrote:Banshee media player on linux writes these tags... KID3 is another tagging program where you can add/read the POPM tag and many other id3v2.4 tags, as well as create/read multi value tags using the '|' character

There was another tag losing it's data in a similar matter, I believe the description field of txxx or wxxx, it seemed to be a pattern of some of the additional attributes for some of the tags in id3v2.x

Also, I'm sure your aware and possibly looking at adding it to the v2 of getid3 but fields like album,artist,genre can take multiple values in the data frame of the id3v2.4 tag, with each value seperated by the null char.

I added this to the 'T' frames, starting around line 662 (in my modded version anyway):

Code: Select all

$string = getid3_lib::iconv_fallback($parsedFrame['encoding'], $ThisFileInfo['id3v2']['encoding'], $parsedFrame['data']);
// remove possible terminating \x00 (put by encoding id or software bug)     
if ($string[strlen($string) - 1] == "\x00") {
  $string = substr($string, 0, strlen($string) - 1);
}
$strings = preg_split('`\x00`', $string, -1, PREG_SPLIT_NO_EMPTY);

foreach($strings as $s){
  $ThisFileInfo['id3v2']['comments'][$parsedFrame['framenameshort']][] = $s;
}
but should probably be using the TextEncodingTerminatorLookup function

Post Reply