View Single Post
Old 01-09-2022, 07:41 PM   #117
BeckyEbook
Guru
BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.
 
BeckyEbook's Avatar
 
Posts: 876
Karma: 3501146
Join Date: Jan 2017
Location: Poland
Device: Various
Quote:
Originally Posted by DiapDealer View Post
The ibooks xml file has always appeared to be in Misc upon import, but it's not actually moved there if I remember correctly. After saving/closing the epub, it will still be in the META-INF folder where it belongs. I cannot recall at this time why this bit of trickery was required.
Everything is fine when the EPUB file is opened with the already existing "com.apple.ibooks.display-options.xml" in the META-INF folder. We see it in Misc, but the file is actually in the correct folder.

There is a special exception in the code for this file: ImportEPUB::AddNonStandardAppleXML()

If we use the AddiBooksXML plugin, everything is fine too.

The problem is only adding "com.apple.ibooks.display-options.xml" via the "Add File" function.

Quote:
Originally Posted by KevinH View Post
Yes, the ibooks xml file is inheriting the wrong media-type (it actually does not have one that I can find) and is actually showing up in Misc when it should not on import. I will have to see about creating it a media-type and making sure standard epub tests ignore it.
In my newest build standard epub tests ignore it when ibooks .XML file is in Misc folder, though of course it shouldn't be there.

Hmmm ...
Apart from ignoring the addition of such a file, I see other solutions here:
a) detection of the file name during adding and if equal "com.apple.ibooks.display-options.xml", then use an exceptional procedure and move the file directly to the META-INF folder.
b) after detecting exactly such file name during adding, displaying a message suggesting to use the "AddiBooksXML" plugin.
Attached Thumbnails
Click image for larger version

Name:	build-qt5-12-9.png
Views:	654
Size:	46.4 KB
ID:	191477  
BeckyEbook is offline   Reply With Quote