Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return correct mimetype for MP2 files #163

Closed
lazka opened this issue Jul 4, 2014 · 3 comments
Closed

Return correct mimetype for MP2 files #163

lazka opened this issue Jul 4, 2014 · 3 comments
Labels

Comments

@lazka
Copy link
Member

@lazka lazka commented Jul 4, 2014

Originally reported by: Christoph Reiter (Bitbucket: lazka, GitHub: lazka)


From daniel.j...@sourcefabric.org on November 18, 2013 18:03:43

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 https://code.google.com/r/danieljames-mp2/source/list fix this for me with mutagen-inspect.

Original issue: http://code.google.com/p/mutagen/issues/detail?id=163


@lazka

This comment has been minimized.

Copy link
Member Author

@lazka lazka commented Jul 4, 2014

Original comment by Christoph Reiter (Bitbucket: lazka, GitHub: lazka):


From reiter.christoph@gmail.com on December 19, 2013 09:33:17

Sorry for the late response.

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

Any thoughts?

Status: Accepted

Attachment: 163-v1.patch

@lazka

This comment has been minimized.

Copy link
Member Author

@lazka lazka commented Jul 4, 2014

Original comment by Christoph Reiter (Bitbucket: lazka, GitHub: lazka):


From daniel.j...@sourcefabric.org on December 30, 2013 07:22:50

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!
@lazka

This comment has been minimized.

Copy link
Member Author

@lazka lazka commented Jul 4, 2014

Original comment by Christoph Reiter (Bitbucket: lazka, GitHub: lazka):


From reiter.christoph@gmail.com on January 09, 2014 06:53:57

This issue was closed by revision a51f6e192201 .

Status: Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.