Closed phlnx closed 3 years ago
Thanks for the report. This seems like a bug in the getID3 library we use for the metadata extraction. Obviously, the function Dec2Bin is designed to operate on integers but module.tag.id3v2.php(1959)
passes it a string. This has probably worked before but newer PHP versions are more strict with the types. Are you using PHP8?
There actually already seems to be an open issue about this at https://github.com/JamesHeinrich/getID3/issues/299.
Hello, thank you very much for your reply. I confirm that I am using php8.0. And after posting my report here, and re-read the path to the file, I imagined it had something to do with an external library. I was not aware of the open issue, thank you for the link. Feel free to close this issue if the getID3 issue covers this problem as well.
No problem. Let's keep this report open until when I have merged the fixed library version and made a Music app release with it.
Music v1.2.1 with an updated getID3 version is now out. It should fix the problem.
I was wondering why the automatic scan would not go past ~900 songs out of ~10000, so I found the shell command, launched it with --debug, and at the 908th music file I got this:
I temporarily fixed it by changing line 437 from:
$binstring = (($i == count($bytes) - 1) ? decbin($bytes[$i]) : str_pad(decbin($bytes[$i]), 8, '0', STR_PAD_LEFT)).$binstring;
to:
$binstring = (($i == count($bytes) - 1) ? decbin(intval($bytes[$i])) : str_pad(decbin(intval($bytes[$i])), 8, '0', STR_PAD_LEFT)).$binstring;
Upon re-launching the shell command, the scan has resumed. Unfortunately I am not sure I can pinpoint the exact mp3 file that caused the issue.