![]() |
#1 |
Austrian Bookworm
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 141
Karma: 2138662
Join Date: Oct 2007
Location: Austria
Device: Pocketbook Inkpad 4
|
Pocketbook 626: Metadata Info not correctly displayed
Hi,
there is a know problem, that the Pocketbook Devices (at least the Lux2) doesn't correctly show the correct book info, if the metadata isn't organized in a special way. It seems, that the Pocketbooks stop to read data from the series_info onwards. Metadata that works: Code:
<dc:subject>Versuch</dc:subject> <dc:language>de</dc:language> <dc:identifier opf:scheme="calibre">0587642b-2b94-4384-a79a-49541fa8a24d</dc:identifier> <meta content="0.7.2" name="Sigil version"/> <meta content="Metadaten-Test" name="calibre:title_sort"/> <meta content="{"Klecks": ""}" name="calibre:author_link_map"/> <meta content="2014-10-26T10:28:34.540000+00:00" name="calibre:timestamp"/> <meta name="calibre:series" content="eBook Testdateien"/> <meta name="calibre:series_index" content="1.0"/> <meta name="cover" content="cover"/> Code:
<dc:subject>Versuch</dc:subject> <dc:language>de</dc:language> <dc:identifier opf:scheme="calibre">928e1c34-32f7-497d-9437-b91765614d10</dc:identifier> <meta content="0.7.2" name="Sigil version"/> <meta name="calibre:series" content="eBook Testdateien"/> <meta name="calibre:series_index" content="1.0"/> <meta content="Metadaten-Test" name="calibre:title_sort"/> <meta content="{"Klecks": ""}" name="calibre:author_link_map"/> <meta content="2014-10-26T10:28:34.540000+00:00" name="calibre:timestamp"/> <meta name="cover" content="cover"/> I already tried to edit the file \calibre-master\src\calibre\ebooks\metadata\opf2.py, but my python and knowledge of the calibre source isn't good enough to recognize where i have to change the source to get calibre to write the medadata in a format the Lux2 can recognize. I already tried to change the smart_update, but that didn't work ... Code:
def smart_update(self, mi, replace_metadata=False, apply_null=False): for attr in ('title', 'authors', 'author_sort', 'title_sort', 'publisher', 'rating', 'isbn', 'tags', 'category', 'comments', 'book_producer', 'pubdate', 'user_categories', 'author_link_map', 'series', 'series_index'): val = getattr(mi, attr, None) is_null = val is None or val in ((), [], (None, None), {}) if is_null: if apply_null and attr in {'series', 'tags', 'isbn', 'comments', 'publisher'}: setattr(self, attr, ([] if attr == 'tags' else None)) else: setattr(self, attr, val) |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,345
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
You want to modify the render() method. You'd have to re-arrange the child elements of the metadata element before rendering. Something like this:
for child in tuple(self.metadata): if child is to be moved to end: self.metadata.append(child) |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Austrian Bookworm
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 141
Karma: 2138662
Join Date: Oct 2007
Location: Austria
Device: Pocketbook Inkpad 4
|
Currently the method looks like this:
Code:
def render(self, encoding='utf-8'): for meta in self.raster_cover_path(self.metadata): # Ensure that the name attribute occurs before the content # attribute. Needed for Nooks. a = meta.attrib c = a.get('content', None) if c is not None: del a['content'] a['content'] = c I simply want these two lines to be at the end: Code:
<meta name="calibre:series" content="eBook Testdateien"/> <meta name="calibre:series_index" content="1.0"/> Code:
def render(self, encoding='utf-8'): for meta in self.raster_cover_path(self.metadata): # Ensure that the name attribute occurs before the content # attribute. Needed for Nooks. a = meta.attrib c = a.get('content', None) if c is not None: del a['content'] a['content'] = c #Ensure that the Series Stuff is at the end of the metadata # Needed for Pocketbooks d = a.get('name', None) if d == 'calibre:series' or d == 'calibre:series_index': self.metadata.append(meta) Last edited by KoopaOne; 10-27-2014 at 04:25 AM. |
![]() |
![]() |
![]() |
#4 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,345
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Code:
for child in tuple(self.metadata): if 'calibre:' in child.get('name', ''): self.metadata.append(child) |
![]() |
![]() |
![]() |
#5 |
Austrian Bookworm
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 141
Karma: 2138662
Join Date: Oct 2007
Location: Austria
Device: Pocketbook Inkpad 4
|
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Member
![]() Posts: 16
Karma: 10
Join Date: Feb 2015
Device: Pocketbook 626 TL2
|
|
![]() |
![]() |
![]() |
#7 |
Ex-Helpdesk Junkie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
See: http://manual.calibre-ebook.com/develop.html
And make the above mentioned modifications in the source tree. |
![]() |
![]() |
![]() |
#8 |
Member
![]() Posts: 16
Karma: 10
Join Date: Feb 2015
Device: Pocketbook 626 TL2
|
It works!!! Thank you.
|
![]() |
![]() |
![]() |
#9 |
Nameless Being
|
Help with the directory
Hi, I have the same problem with metadata for PB 626 TL3. For some books to me everything is displayed correctly, and for some it omits the series and serial number. Please instruction on where to find the file where you paste the above code. Thank you.
|
![]() |
![]() |
#10 | ||
Ex-Helpdesk Junkie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Quote:
Quote:
|
||
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
pocketbook touch lux 2 - 626 reset? | sassi | PocketBook | 6 | 06-24-2014 04:02 AM |
Questions on the Pocketbook 626 / Touch Lux 2 | mat813 | PocketBook | 3 | 03-28-2014 01:00 PM |
Cover Only Displayed Correctly on MOBI but not EPUB | dwal | Conversion | 3 | 03-01-2013 01:26 PM |
arabic not displayed correctly after converting with calibre | mhmohamadi | Apple Devices | 0 | 05-23-2010 02:26 PM |
PRS-600 Are Romanian diacritics displayed correctly? | Laurentiu | Sony Reader | 3 | 11-25-2009 03:36 PM |