Merge lp:~michael-sheldon/webbrowser-app/ebook-mimetypes into lp:webbrowser-app

Proposed by Michael Sheldon
Status: Merged
Approved by: Olivier Tilloy
Approved revision: 801
Merged at revision: 808
Proposed branch: lp:~michael-sheldon/webbrowser-app/ebook-mimetypes
Merge into: lp:webbrowser-app
Diff against target: 39 lines (+14/-1)
2 files modified
src/app/FileExtensionMapper.js (+7/-0)
src/app/MimeTypeMapper.js (+7/-1)
To merge this branch: bzr merge lp:~michael-sheldon/webbrowser-app/ebook-mimetypes
Reviewer Review Type Date Requested Status
Olivier Tilloy Approve
PS Jenkins bot continuous-integration Needs Fixing
Review via email: mp+241428@code.launchpad.net

Commit message

Add mimetype and file extension mappings for the new EBooks ContentType.

Description of the change

Add mimetype and file extension mappings for the new EBooks ContentType.

To post a comment you must log in.
Revision history for this message
Michael Sheldon (michael-sheldon) wrote :

Are there any related MPs required for this MP to build/function as expected? Please list.

 * No

Is your branch in sync with latest trunk (e.g. bzr pull lp:trunk -> no changes)

 * Yes

Did you perform an exploratory manual test run of your code change and any related functionality on device or emulator?

 * Yes

Did you successfully run all tests found in your component's Test Plan (https://wiki.ubuntu.com/Process/Merges/TestPlan/webbrowser-app) on device or emulator?

 * Yes (minus unrelated failing 7digital SSL test)

If you changed the UI, was the change specified/approved by design?

 * No change

If you changed UI labels, did you update the pot file?

 * No change

If you changed the packaging (debian), did you add a core-dev as a reviewer to this MP?

 * No change

Revision history for this message
Michael Sheldon (michael-sheldon) wrote :

http://mikeasoft.com/~mike/com.ubuntu.developer.ken-vandine.hub-importer_0.2_all.click

Can be used as a test destination for EBook files (which can be found in epub and mobi/amazon format from gutenberg.org)

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Olivier Tilloy (osomon) wrote :

LGTM.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/app/FileExtensionMapper.js'
2--- src/app/FileExtensionMapper.js 2014-10-02 19:42:39 +0000
3+++ src/app/FileExtensionMapper.js 2014-11-11 15:30:42 +0000
4@@ -206,6 +206,13 @@
5 case "wmls":
6 case "wsc":
7 return ContentType.Documents;
8+ case "epub":
9+ case "mobi":
10+ case "lit":
11+ case "fb2":
12+ case "azw":
13+ case "tpz":
14+ return ContentType.EBooks;
15 default:
16 return ContentType.Unknown;
17 }
18
19=== modified file 'src/app/MimeTypeMapper.js'
20--- src/app/MimeTypeMapper.js 2014-10-06 13:05:06 +0000
21+++ src/app/MimeTypeMapper.js 2014-11-11 15:30:42 +0000
22@@ -26,10 +26,16 @@
23 return ContentType.Videos;
24 } else if(mimeType.search("text/x-vcard") === 0) {
25 return ContentType.Contacts;
26+ } else if(mimeType.search("application/epub[+]zip") === 0
27+ || mimeType.search("application/vnd\.amazon\.ebook") === 0
28+ || mimeType.search("application/x-mobipocket-ebook") === 0
29+ || mimeType.search("application/x-fictionbook+xml") === 0
30+ || mimeType.search("application/x-ms-reader") === 0) {
31+ return ContentType.EBooks;
32 } else if(mimeType.search("text/") === 0
33 || mimeType.search("application/pdf") === 0
34 || mimeType.search("application/x-pdf") === 0
35- || mimeType.search("application/vnd.pdf") === 0) {
36+ || mimeType.search("application/vnd\.pdf") === 0) {
37 return ContentType.Documents;
38 } else {
39 return ContentType.Unknown;

Subscribers

People subscribed via source and target branches

to status/vote changes: