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

Fix musepack files application/vnd.mophun.certificate -> audio/mpc #56

Merged
merged 1 commit into from
Jun 1, 2021

Conversation

Andy-H-Nguyen
Copy link
Contributor

@Andy-H-Nguyen Andy-H-Nguyen commented May 26, 2021

As in issue #48. There's been an error in the classification of musepack audio files. Note that in v0.3.3 this was classified as audio/x-musepack. There is no exact definition for MPC in https://www.iana.org/assignments/media-types/media-types.xhtml. But audio/mpc bests follows the type-reporting format of the existing types.
Files in the fixture are self-recorded, and is OK to use in our fixtures.

@Andy-H-Nguyen Andy-H-Nguyen changed the title Fix musepack files application/vnd.mophun.certificate -> audio/x-musepack [WIP] Fix musepack files application/vnd.mophun.certificate -> audio/x-musepack May 26, 2021
@Andy-H-Nguyen Andy-H-Nguyen changed the title [WIP] Fix musepack files application/vnd.mophun.certificate -> audio/x-musepack Fix musepack files application/vnd.mophun.certificate -> audio/mpc May 28, 2021
Copy link
Member

@gmcgibbon gmcgibbon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please add the fixture to the magic folder also to generate a magic test too? Thanks!

Copy link
Member

@gmcgibbon gmcgibbon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. LGTM after the line change!

@@ -44,6 +44,7 @@

Marcel::MimeType.extend "audio/flac", magic: [[0, 'fLaC']], extensions: %w( flac ), parents: "audio/x-flac"
Marcel::MimeType.extend "audio/x-wav", magic: [[0, 'RIFF', [[8, 'WAVE']]]], extensions: %w( wav ), parents: "audio/vnd.wav"
Marcel::MimeType.extend "audio/mpc", magic: [[0, "MPCKSH"]], extensions: %w( mpc ), parents: "application/vnd.mophun.certificate"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Marcel::MimeType.extend "audio/mpc", magic: [[0, "MPCKSH"]], extensions: %w( mpc ), parents: "application/vnd.mophun.certificate"
Marcel::MimeType.extend "audio/mpc", magic: [[0, "MPCKSH"]], extensions: %w( mpc )

The parent type here isn't actually related to the one we're overriding with.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants