dhamaniasad / mutagen

Automatically exported from code.google.com/p/mutagen
GNU General Public License v2.0
2 stars 1 forks source link

Return correct mimetype for MP2 files #163

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Mutagen 1.21 returns a mimetype of audio/mp3 for both MP2 and MP3. For example:

mutagen-inspect Audio_Promo_Night.mp2

identifies the file correctly but returns the wrong mimetype:

-- Audio_Promo_Night.mp2
- MPEG 1 layer 2, 128000 bps, 44100 Hz, 29.45 seconds (audio/mp3)

Two small commits in http://code.google.com/r/danieljames-mp2/source/list fix 
this for me with mutagen-inspect.

Original issue reported on code.google.com by daniel.j...@sourcefabric.org on 18 Nov 2013 at 5:03

GoogleCodeExporter commented 9 years ago
Sorry for the late response.

I'd prefer the attached fix, since MP3 handles all of MPEG.

Any thoughts?

Original comment by reiter.christoph@gmail.com on 19 Dec 2013 at 5:33

Attachments:

GoogleCodeExporter commented 9 years ago
Hi Christoph, this is a much better solution than my patch. The correct 
mimetype is returned even when the MP2 file has an incorrect or ambiguous 
extension:

('--', 'unknown-MFM0001-256kbps.mp2')
- MPEG 1 layer 2, 256000 bps, 44100 Hz, 257.16 seconds (audio/mp2)

('--', 'unknown-MFM0001-256kbps.mp3')
- MPEG 1 layer 2, 256000 bps, 44100 Hz, 257.16 seconds (audio/mp2)

('--', 'unknown-MFM0001-256kbps.mpeg')
- MPEG 1 layer 2, 256000 bps, 44100 Hz, 257.16 seconds (audio/mp2)

Thanks!

Original comment by daniel.j...@sourcefabric.org on 30 Dec 2013 at 3:22

GoogleCodeExporter commented 9 years ago
This issue was closed by revision a51f6e192201.

Original comment by reiter.christoph@gmail.com on 9 Jan 2014 at 2:53