Skip to content

Add additional MIME types to OPDS Browser#5940

Merged
Frenzie merged 3 commits intokoreader:masterfrom
jstirling:master
Mar 13, 2020
Merged

Add additional MIME types to OPDS Browser#5940
Frenzie merged 3 commits intokoreader:masterfrom
jstirling:master

Conversation

@jstirling
Copy link
Copy Markdown
Contributor

@jstirling jstirling commented Mar 12, 2020

Updating the OPDS browser formats list to include CBR and CBZ to bide time until the DocumentRegistry rework


This change is Reviewable

added a slew of new mime types to the OPDS browser
spaces not tabs
Copy link
Copy Markdown
Member

@Frenzie Frenzie left a comment

Choose a reason for hiding this comment

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

Err, might be going a bit overboard? Pinging @NiLuJe @poire-z for second opinion. ;-)

@Frenzie Frenzie added this to the 2020.04 milestone Mar 12, 2020
@jstirling
Copy link
Copy Markdown
Contributor Author

Err, might be going a bit overboard? Pinging @NiLuJe @poire-z for second opinion. ;-)

Yeah, I'll dial it back. Just pulled the list from COPS.
Didn't even think to check for duplicates which is causing it to fail.

dialing it back...
@poire-z
Copy link
Copy Markdown
Contributor

poire-z commented Mar 12, 2020

Obviously, we don't support all added formats, but it seems this list is just used to filter/show the downloads format list - so, I guess on android, one could be happy to be able to download a MP3 version of a book from some OPDS server :).
Another option would be to filter that list with a checkbox: formats supported by KOReader | all formats.
(note that I don't use the OPDS browser, so I don't know how this can be inconvenient to those who do)

@jstirling
Copy link
Copy Markdown
Contributor Author

it only shows formats that exist on the OPDS server. So having more formats doesn't clutter the view unless someone has a ton of different formats for a single book.

I removed all but CBZ and CBR now, but can add them back (minus the duplicates that caused issues) if you'd prefer. I just figured I'd add them originally to prevent someone having this same issue with a different type. Seems unlikely though so might not be an issue.

@Frenzie Frenzie modified the milestones: 2020.04, 2020.03.2 Mar 13, 2020
@Frenzie Frenzie merged commit d65f2c8 into koreader:master Mar 13, 2020
["application/x-mobipocket-ebook"] = "MOBI",
["application/x-mobi8-ebook"] = "AZW3",
["application/x-cbz"] = "CBZ",
["application/x-cbr"] = "CBR",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

we could also have djvu here

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

mwoz123 pushed a commit to mwoz123/koreader that referenced this pull request Mar 29, 2020
added a few new mime types to the OPDS browser as a temporary workaround for koreader#5478
Frenzie pushed a commit that referenced this pull request Jul 28, 2020
* Add additional media types to OPDS Browser

The media types for CBZ and CBR (added in #5940) are deprecated, and replaced by `vnd.comicbook+zip` and `vnd.comicbook+rar`. In addition, many OPDS servers will use the actual media type of the file, ie `application/zip` and `application/x-rar-compressed`.

See here about the new `vnd` types:
- https://www.iana.org/assignments/media-types/application/vnd.comicbook+zip
- https://www.iana.org/assignments/media-types/application/vnd.comicbook-rar

* added vnd.rar also
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.

4 participants