Skip to content

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!


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.

@gmcgibbon gmcgibbon merged commit d970fda into rails:main Jun 1, 2021
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