From: Romain B. <to...@ra...> - 2012-03-13 22:46:45
|
Hey! 2012/2/27 Romain Beauxis <to...@ra...>: > 2012/2/27 David Baelde <dav...@en...>: > > The fix here is the modification in src/decoder/taglib_plug.ml, > > replacing `Autodetect with `Mpeg. So, the problem is really the > > following: liquidsoap's code correctly detects the file as mp3 and > > attempts to decode it, but taglib refuses to process it because of its > > extension. > > > > What's your opinion Romain? Is it really important to use the same > > taglib decoder for mp3 and other files? I think that mime-based > > detection is a good idea, and that we should force it on taglib, even > > if this means that we have to the taglib decoder in two: the mp3 one > > and the general `Autodetect one. > > Well for once I'd like to be the conservative guy here. I would like > to think of a solution that retains the current conservative behavior > but allows this tweaking. > > I'll take some time shortly to stare at the code and come up with a > proposition.. I just pushed a change that adds a decoder.taglib.force_mp3 configuration key, which defaults to false. It's description is: Taglib mp3 files autodetection may fail if using files whose reported mime type is not "audio/mpeg". If you set this configuration key to true, then all files decoded by taglib will be considered as mp3. In this case, taglib configuration keys for file extension ("decoder.file_extensions.taglib") and mime types ("decoder.mime_types.taglib") are not used and mp3 configuration keys for file extension ("decoder.file_extensions.mp3") and mime types ("decoder.mime_types.mp3") are used instead. In other words, in the present case, instead of setting file extension and mime types for taglib AND mp3 decoder to accept loosy mp3 detection, one only has to set those for mp3 and turn decoder.taglib.force_mp3 to true. I hope this should make everybody happy :-) Romain |