Open gudbergsen opened 3 years ago
I assume you're referring to what is now line 1587.
I don't think I agree with your proposed change. This line should prevent adding duplicate string values to the array, therefore we check the value. If you still disagree, perhaps you can show an example of how/why you think it's not working correctly?
This not work:
I write this to a mp3 fil, and try to view it.
$TagData["text"][0]["data"] ="Test";
$TagData["text"][0]["description"] ="arranger";
$TagData["text"][1]["data"] ="Test";
$TagData["text"][1]["description"] ="rating";
$TagData["text"][2]["data"] ="Test";
$TagData["text"][2]["description"] ="type";
$TagData["text"][3]["data"] ="Test";
$TagData["text"][3]["description"] ="dansktitel";
Only the "arranger" tag is taken with in "comment" - because of the value check. Here I think check of "Key/description" is the right to prevent adding duplicate
If the "data" value is differens it works.
If you can supply a test file like this (either post a link here or email to info@getid3.org) that would help me in testing a solution.
Line 1590 in getid3.lib.php has an error
if (is_array($value) || empty($ThisFileInfo['comments'][$tagname]) || !in_array(trim($value), $ThisFileInfo['comments'][$tagname])) { must be
if (is_array($value) || empty($ThisFileInfo['comments'][$tagname]) || !in_array(trim($key), $ThisFileInfo['comments'][$tagname])) {