View Single Post
Old 02-03-2010, 02:35 AM   #4
krischik
Addict
krischik can extract oil from cheesekrischik can extract oil from cheesekrischik can extract oil from cheesekrischik can extract oil from cheesekrischik can extract oil from cheesekrischik can extract oil from cheesekrischik can extract oil from cheesekrischik can extract oil from cheesekrischik can extract oil from cheese
 
krischik's Avatar
 
Posts: 334
Karma: 1234
Join Date: Jul 2009
Location: Hindelbank, Switzerland
Device: P990i, PRS 505
Unhappy Hmm

Quote:
Originally Posted by kovidgoyal View Post
file name extraction is not used unless set the preference option for it. metadata read from multiple formats will be a union of metadata from all formats. Which ones take priority are hard coded, look in the ebooks.metadata.meta module for details.
Code:
_METADATA_PRIORITIES = [
                       'html', 'htm', 'xhtml', 'xhtm',
                       'rtf', 'fb2', 'pdf', 'prc', 'odt',
                       'epub', 'lit', 'lrx', 'lrf', 'mobi',
                       'rb', 'imp', 'azw'
                      ]
If I understand the code right with my limited Python skills then mobi takes priority over epub. (Order is low priority -> high priority).

An opf file takes priority over everything - That is: if an opf file is successfully read then other files are skipped.

And file-names are used as fallback if reading meta-data fails for whatever reason.

That would explain my problems but also offers a solution: I just need to create an opf file from the epub .

Martin
krischik is offline   Reply With Quote