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

Report MIME type / file extension mismatch as an informative message #1091

Open
Sombrero51 opened this issue Dec 3, 2019 · 2 comments
Open
Labels
priority: low To be processed when time allows status: needs contribution Needs contribution to move forward type: feature The issue describes a new feature request

Comments

@Sombrero51
Copy link

Sombrero51 commented Dec 3, 2019

EpubCheck 4.2.2 did not detect an error in the .opf file that concerned an audio resource declared with an incorrect media-type.

Incorrect but not detected by EpubCheck 4.2.2:

<item id="audio-internal" href="audio/audio.mp3" media-type="audio/mp4" fallback="fallback" />

Fixed:

<item id="audio-internal" href="audio/audio.mp3" media-type="audio/mpeg" fallback="fallback" />

I noticed the error with the Calibre Check Book, integrated in the e-book editor.

(edited by @rdeltour to add code formatting blocks)

@rdeltour
Copy link
Member

rdeltour commented Dec 4, 2019

Thanks for the report!

I understand that you expected EPUBCheck to detect the mismatch between the declared media type (audio/mp4) and the file extension (.mp3). Correct?

EPUBCheck currently does not base its checks on file extensions. It is not disallowed —i.e. conforming to the specs— for an actual MP4 file to have a .mp3 extension (even if it would be confusing and probably pretty rare).

I guess EPUBCheck could report this as an informative message (not an error or warning); but I think it’s all it could do…

@rdeltour rdeltour added priority: low To be processed when time allows status: in discussion The issue is being discussed by the development team type: improvement The issue suggests an improvement of an existing feature and removed priority: low To be processed when time allows labels Dec 4, 2019
@Sombrero51
Copy link
Author

Sombrero51 commented Dec 5, 2019

Yes It is correct.

Yes, maybe it could be useful if it reported it as an informational message. But it's my opinion.

Thanks for the clarification!

@rdeltour rdeltour changed the title Incorrect audio media-type not detected: EpubCheck 4.2.2 Report MIME type / file extension mismatch as an informative message Dec 6, 2019
@rdeltour rdeltour added the priority: low To be processed when time allows label Dec 6, 2019
@rdeltour rdeltour added type: feature The issue describes a new feature request status: needs contribution Needs contribution to move forward and removed type: improvement The issue suggests an improvement of an existing feature status: in discussion The issue is being discussed by the development team labels Dec 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: low To be processed when time allows status: needs contribution Needs contribution to move forward type: feature The issue describes a new feature request
Projects
None yet
Development

No branches or pull requests

2 participants