Rainie3535 / sigil

Automatically exported from code.google.com/p/sigil
GNU General Public License v3.0
0 stars 0 forks source link

MIME types not preserved when audio and video files are imported into Sigil #536

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
test.epub is NOT valid

ERROR: test.epub/OEBPS/content.opf(6): unfinished element
ERROR: test.epub/OEBPS/Text/Section0002.html(44): hyperlink to non-standard 
resource 'OEBPS/Misc/another.mp3' of type 'text/plain'
WARNING: test.epub/OEBPS/Text/Section0002.html(44): hyperlink to resource 
outside spine 'OEBPS/Misc/another.mp3'
ERROR: test.epub/OEBPS/Text/Section0002.html(52): hyperlink to non-standard 
resource 'OEBPS/Misc/dontfear.m4v' of type 'text/plain'
WARNING: test.epub/OEBPS/Text/Section0002.html(52): hyperlink to resource 
outside spine 'OEBPS/Misc/dontfear.m4v'
ERROR: test.epub/OEBPS/Text/Section0003.html(8): 'OEBPS/Text/stylesheet.css': 
referenced resource missing in the package
Check finished with warnings or errors!
Preflight report

Epubpreflight runs some of the same validation as epubcheck, but additionally 
checks for problems like very large file sizes that might affect some reading 
systems.

ERROR: test.epub/OEBPS/Text/Section0002.html(44): hyperlink to non-standard 
resource 'OEBPS/Misc/another.mp3' of type 'text/plain'
ERROR: test.epub/OEBPS/Text/Section0002.html(52): hyperlink to non-standard 
resource 'OEBPS/Misc/dontfear.m4v' of type 'text/plain'
Check finished with warnings or errors!

What steps will reproduce the problem?
1. Import an MP3 or M4V file into the Misc. folder in Sigil
2. Create a link to it

What is the expected output? What do you see instead?
Expect to see the proper MIME types for MP3 and M4V files; instead they are 
declared as text

What version of the product are you using? On what operating system?
0.2.3 on OS X

Please provide any additional information below. If your source file
(SGF/EPUB/HTML/etc) is required to fully understand the problem, please
attach it to this issue. Read the ReportingIssues wiki page before
submitting!

Original issue reported on code.google.com by p...@lingwiki.com on 11 Aug 2010 at 6:37

GoogleCodeExporter commented 9 years ago
The epub standard does not support audio or video files.

Original comment by Strahinja.Markovic@gmail.com on 11 Aug 2010 at 7:47

GoogleCodeExporter commented 9 years ago
Perhaps, but it is a valid feature for those preparing ePub files for iBooks.  
Either way, MIME types should be preserved, no?

Original comment by p...@lingwiki.com on 11 Aug 2010 at 7:55

GoogleCodeExporter commented 9 years ago
When an epub file is opened in Sigil, the OPF is read and converted into 
equivalent memory objects/lists. When the file is saved, an OPF is written out 
that corresponds to the objects in memory.

Sigil has no notion of audio or video files since those are not supported by 
the epub standard. I'm reluctant to add explicit support for these features 
because that would mean supporting something other than epub (that is, Apple's 
proprietary extensions to it).

One has to draw the line somewhere: if I do what you ask, someone else will 
eventually come along and request the ability to play those audio and video 
files inside Sigil. And why not, since the MIME types are supported? I'm 
obviously willing to extend *some* support towards these proprietary 
extensions. Why not go a bit farther?

I hope you see my point. I'm trying to make Sigil strictly conform to the epub 
specs, and if I give in here, others will have a valid point in saying that I 
should go farther since Sigil already goes beyond the specs.

Original comment by Strahinja.Markovic@gmail.com on 11 Aug 2010 at 8:08

GoogleCodeExporter commented 9 years ago
Oh and I have to reply to this:

>>it is a valid feature for those preparing ePub files for iBooks

IMO No, it is not. :)
Apple doesn't say you can use video or audio in your epub books. The fact that 
it work on the iPad/iPhones is merely an implementation detail arising from the 
fact that the XHTML renderer used in iBooks is the mobile Webkit iOS component. 
In other words, it works purely by coincidence, not design.

Original comment by Strahinja.Markovic@gmail.com on 11 Aug 2010 at 8:11