khellang / MimeTypes

A simple lookup from file name/extension to MIME/media type, generated from mime-db, which in turn is compiled from IANA, Apache and nginx's MIME types.
Apache License 2.0
93 stars 23 forks source link

Wrong MIME types for comic book formats #23

Open rluetzner opened 9 months ago

rluetzner commented 9 months ago

Independent of the file extensions, this library always returns application/x-cbr. This is incorrect, as there are specific MIME types for all the extensions, e.g. application/x-cbz or application/x-cb7.

To understand the impact, see the following issues in the Jellyfin project:

.

Here's a tl;dr: cbr (a.k.a. Rar) is a proprietary compression algorithm, so most FOSS eReaders will not accept it. :slightly_smiling_face:

rluetzner commented 9 months ago

Definitely something I can send a pull request for. 🙂

rluetzner commented 9 months ago

I just learned that application/x-cbr is deprecated. According to IANA, it should be

application/vnd.comicbook-rar and application/vnd.comicbook+zip.