Open Amgine0 opened 7 years ago
I'm seeing this same error, and I have narrowed it down to a few files that are causing it.
This seems to be caused when the track number and track total in a FLAC file are stored together in the "tracknumber" tag as e.g. "1/16", instead of storing them separately in the "tracknumber" and "tracktotal" tags. Removing and re-adding the track numbers with a tool that sets these tags correctly allows the track to be imported.
Had the same problem with mp3 files. I tried removing and re-adding the tags and track numbers with several different tools, but nothing worked. After looking into the offending files closely with mp3diags, I found out they had an Ape tag with a Tracks=num/num
value. I removed the Ape tag and it works, but maybe the app should either ignore Ape tags completely, or handle the "num/num" format.
I'm facing the same problem. At the very least, the error message should indicate which file caused the problem, but mainly the importer should simply skip the file instead of aborting the entire import process.
I have changed the column into a varchar(10) it looks it does the trick.
You could try to use the @gs11's fork which is more advanced and may have fixed this issue already: https://github.com/gs11/sonerezh
In Lib/SongManager/SongManager.php the code to handle the "track" tag needs the same ability to handle xx/yy format as the code to handle the "track_number" tag does. I hand-patched my copy to look like this (around line 69) and I don't get that error any more. I will make a pull request.
// Song track number
if (!empty($file_infos['comments']['track'])) { // MP3 Tag
//$metadata['track_number'] = (string)end($file_infos['comments']['track']);
$track = explode('/', (string)end($file_infos['comments']['track']));
$metadata['track_number'] = intval($track[0]);
} elseif (!empty($file_infos['comments']['track_number'])) { // MP3 Tag
// Some tags look like '1/10'
$track_number = explode('/', (string)end($file_infos['comments']['track_number']));
$metadata['track_number'] = intval($track_number[0]);
} elseif(!empty($file_infos['comments']['tracknumber'])){ // OGG Tag
$metadata['track_number'] = end($file_infos['comments']['tracknumber']);
}
I do not know what might cause this error.