Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Plugins

Notices

Reply
 
Thread Tools Search this Thread
Old 10-28-2021, 12:47 PM   #2311
Rand Brittain
Bookmaker
Rand Brittain ought to be getting tired of karma fortunes by now.Rand Brittain ought to be getting tired of karma fortunes by now.Rand Brittain ought to be getting tired of karma fortunes by now.Rand Brittain ought to be getting tired of karma fortunes by now.Rand Brittain ought to be getting tired of karma fortunes by now.Rand Brittain ought to be getting tired of karma fortunes by now.Rand Brittain ought to be getting tired of karma fortunes by now.Rand Brittain ought to be getting tired of karma fortunes by now.Rand Brittain ought to be getting tired of karma fortunes by now.Rand Brittain ought to be getting tired of karma fortunes by now.Rand Brittain ought to be getting tired of karma fortunes by now.
 
Posts: 416
Karma: 2143650
Join Date: Sep 2010
Device: Cybook Opus
Hm. Normally, when I send a PDF to my Elipsa, I need to use Kobo Utilities to update the metadata because the PDFs themselves never have the metadata set correctly internally.

Right now, whenever I try to update a PDF's metadata, Kobo Utilities returns the message that all of the PDFs I selected were "not found on device".

Any idea why this might be happening?
Rand Brittain is offline   Reply With Quote
Old 10-28-2021, 12:55 PM   #2312
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 37,859
Karma: 150333332
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by ai_monogatari View Post
[Update] I played around with the plugin a bit more and I think I found it!
With my new Sage connected, I selected all of the ebooks on my device in Calibre. Then I clicked "Store/Restore current bookmark" in the plugin menu and then in the pop-up menu I chose "Restore" and ticked "Set Reading Status", unticking everything else.

Screenshot: https://i.imgur.com/shz4bwJ.png

This seems to have worked like a charm! Now it really looks like I transferred my entire library from my Aura One to my Sage, with all metadata - including the custom columns - intact!

I apologize for not being more thorough in my investigation of this plugin. Signs of old age, perhaps?
You might want to check message #2298 in this thread for some of the limitations of that process.
DNSB is offline   Reply With Quote
Advert
Old 10-28-2021, 09:41 PM   #2313
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303822
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by Rand Brittain View Post
Hm. Normally, when I send a PDF to my Elipsa, I need to use Kobo Utilities to update the metadata because the PDFs themselves never have the metadata set correctly internally.

Right now, whenever I try to update a PDF's metadata, Kobo Utilities returns the message that all of the PDFs I selected were "not found on device".

Any idea why this might be happening?
Are you ejecting the device and letting it import the books and reconnecting? The plugin cannot update the metadata until that is done. And it needs for calibre to match the books on the device to the book in the library, which means the green tick has to be there when you reconnect.

If it still isn't updating the metadata, I need to see a debug log. Run calibre in debug mode, do the action that is failing and stop calibre. Then post or otherwise send me the log to look at.
davidfor is offline   Reply With Quote
Old 10-28-2021, 10:21 PM   #2314
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303822
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by pricciar View Post
I actually assumed the database was corrupt, but, I didn't see any messages from the plug-in, and I use the automatic db back up. So, I wasn't sure. I do have recent backups to go to.

The behavior is the same whether I eject and reconnect, or restart calibre. One connection will have the one book, the next will be multiple books.

How it usually works is that only the books that I have read since I last plugged in my Kobo show up. What's happening now is that a random list of books shows up when I plug in the one time, and one book will show up the other time.
Oh, also, if I have read any books in the meantime they show up when the one book shows up and have their data properly set in Calibre. But, they disappear in subsequent checks. (So, the data with those books is properly set. you'll notice in the log that Without Fail has been updated, but it's not one of the books that shows up, after the initial update.)

The multiple books are random some I read recently, and some long ago.
Gatecrasher
Case Histories
Before the Fall
Mr. Mercedes: A Novel
Crying in H Mart: A Memoir
Even Greater Mistakes
https://www.dropbox.com/s/w6z3f48uni...libre.jpg?dl=0

The single book is the last book I read before all of this started.
The Last Apothecary
https://www.dropbox.com/s/247y987nzi...libre.jpg?dl=0

date and time on the device and computer are correct and accurate.

I've send the logs by PM. Thank you very much for your help, and the plug in. It's the best!
Looking at the logs, for "Gatecrasher", the bit that is comparing the status on the device to that in the library is:


Code:
DEBUG:    0.1 ----------- _store_bookmarks - top of loop -----------

DEBUG:    0.1 _store_bookmarks - Current book: Gatecrasher - Ben Widdicombe
DEBUG:    0.1 _store_bookmarks - contentIds='['file:///mnt/onboard/Widdicombe, Ben/Gatecrasher - Ben Widdicombe.kepub.epub']'
DEBUG:    0.1 _store_bookmarks - contentId='file:///mnt/onboard/Widdicombe, Ben/Gatecrasher - Ben Widdicombe.kepub.epub'
DEBUG:    0.1 _store_bookmarks - device_status='None'
DEBUG:    0.1 _store_bookmarks - result='{'ChapterIDBookmarked': 'OEBPS/cover.xhtml#kobo.1.1', 'adobe_location': None, 'ReadStatus': 2, '___PercentRead': 100, 'Attribution': 'Ben Widdicombe', 'DateLastRead': '2020-06-20T14:20:06Z', 'Title': 'Gatecrasher', 'MimeType': 'application/x-kobo-epub+zip', 'Rating': None, 'ContentID': 'file:///mnt/onboard/Widdicombe, Ben/Gatecrasher - Ben Widdicombe.kepub.epub'}'
DEBUG:    0.1 _store_bookmarks - device_status is None
DEBUG:    0.1 _store_bookmarks - finished reading database for book - device_status= {'ChapterIDBookmarked': 'OEBPS/cover.xhtml#kobo.1.1', 'adobe_location': None, 'ReadStatus': 2, '___PercentRead': 100, 'Attribution': 'Ben Widdicombe', 'DateLastRead': '2020-06-20T14:20:06Z', 'Title': 'Gatecrasher', 'MimeType': 'application/x-kobo-epub+zip', 'Rating': None, 'ContentID': 'file:///mnt/onboard/Widdicombe, Ben/Gatecrasher - Ben Widdicombe.kepub.epub'}
DEBUG:    0.1 _store_bookmarks - Start of checks for current_last_read - reading_position_changed='False'
DEBUG:    0.1 _store_bookmarks - current_last_read='2020-06-20 14:20:06+00:00'
DEBUG:    0.1 _store_bookmarks - new_last_read    ='2020-06-20 14:20:06+00:00'
DEBUG:    0.1 _store_bookmarks - current_last_read != new_last_read='False'
DEBUG:    0.1 _store_bookmarks - After checking current_last_read - reading_position_changed='False'
DEBUG:    0.1 _store_bookmarks - current_percentRead ='100'
DEBUG:    0.1 _store_bookmarks - new_kobo_percentRead='100'
DEBUG:    0.1 _store_bookmarks - current_percentRead != new_kobo_percentRead='False'
DEBUG:    0.1 _store_bookmarks - After checking percent read - reading_position_changed= False
DEBUG:    0.1 _store_bookmarks - current_chapterid ='OEBPS/Cover.xhtml#kobo.1.1'
DEBUG:    0.1 _store_bookmarks - new_chapterid='OEBPS/cover.xhtml#kobo.1.1'
DEBUG:    0.1 _store_bookmarks - current_chapterid != new_chapterid='True'
DEBUG:    0.1 _store_bookmarks - After checking location - reading_position_changed= True
DEBUG:    0.1 _store_bookmarks - current_rating=None, new_kobo_rating=0
DEBUG:    0.1 _store_bookmarks - current_rating != new_kobo_rating= True
DEBUG:    0.1 _store_bookmarks - current_rating != new_kobo_rating and not (current_rating is None and new_kobo_rating == 0)= False
DEBUG:    0.1 _store_bookmarks - current_rating != new_kobo_rating and new_kobo_rating > 0= False
DEBUG:    0.1 _store_bookmarks - position changed for: Gatecrasher - Ben Widdicombe

DEBUG:    0.1 ----------- _store_bookmarks - top of loop -----------
The important lines are highlighted.

This is the first connect where you get ten books. Apparently the stored chapter id has a capital "C" for the name of the file. But, in the device, it is lower case. So, you are prompted to update the book reading status. Which you do. On the next connect, these match, so you are not prompted to update the reading status. This is the case for all the books in question. The case on the device is consistent for each book ("The Lost Apothecary" has uppercase on the device). It is what is in the library that is not.

The question is what is changing the case of the location in the library. The simplest explanation would be another device that has a different version of the book. If you connected the two devices, you should get the same behaviour for each device. One sets the location to lower case and then the other sets it to upper case. There can be a problem if you have the same book on the device twice. The reading status should come from the one with the latest reading status, but, there could be an issue with that. But, it looks like this is only coming from one book.

Otherwise, I don't know. Do you have something that modifies this column?

You can verify what I am saying by looking at the stored reading location before connecting the device and again after. That should show the changed. You could manually change it to lower case to prove that this solves the issue.

The other thing to do is change the settings for the reading status storing. If you turn on the "Only if more recent" option, it will only prompt to store if the last read timestamp changes to a newer date. And if you turn on the "Not if finished in library", it will not get the reading status for books in the library that have the percent read as 100%. Turning on either of these options would solve this problem.
davidfor is offline   Reply With Quote
Old 11-16-2021, 05:00 PM   #2315
enuddleyarbl
Guru
enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.
 
enuddleyarbl's Avatar
 
Posts: 734
Karma: 1077122
Join Date: Sep 2013
Device: Kobo Forma
I'm trying to use the Update ToC for Selected Books action in Kobo Utilities and keep running into the following:

Code:
calibre, version 5.32.0
ERROR: Unhandled exception: <b>ConstraintError</b>:ConstraintError: UNIQUE constraint failed: content.ContentID

calibre 5.32 [64bit]  embedded-python: True is64bit: True
Windows-10-10.0.19041 Windows ('64bit', 'WindowsPE')
('Windows', '10', '10.0.19041')
Python 3.8.5
Windows: ('10', '10.0.19041', '', 'Multiprocessor Free')
Interface language: None
Successfully initialized third party plugins: DeDRM (7, 1, 0) && GetFileName (0, 1, 1) && Goodreads (1, 5, 1) && Kobo Utilities (2, 14, 1) && KoboTouchExtended (3, 5, 4) && Modify ePub (1, 6, 3) && Quality Check (1, 11, 4)
Traceback (most recent call last):
  File "calibre_plugins.koboutilities.action", line 5361, in update_book_toc_on_device
  File "calibre_plugins.koboutilities.action", line 5789, in update_device_toc_for_books
  File "calibre_plugins.koboutilities.action", line 5813, in update_device_toc_for_book
  File "calibre_plugins.koboutilities.action", line 5926, in addChapterToDatabase
apsw.ConstraintError: ConstraintError: UNIQUE constraint failed: content.ContentID
Checking the Device Database says everything's OK. I'm also using the latest firmware (4.30.188.38) that was recently released for the Forma.

Details: I just found out about this capability, so I ran it against all 655 of my books in my Calibre library. It found 10 books that the "Chapters need to be updated in Kobo eReader database." So, I tried the Update ToC button on them and got the above error. Unfortunately, it doesn't say which book caused the issue. So, I went through the Update ToC process against each one individually. Seven of those books failed and 3 updated fine.

So, I removed those 7 books from my Kobo Forma again, sent them over to it again, disconnected the Forma, powered it down and up and ran the Update ToC process against all my books again and all 7 of those books showed up again as needing to be updated. I removed them from my Forma and sent them over again. But, before working with them, I noted that the Update ToC process also said 160 of my other books needed to be to be sent to the Forma again and told it to do that with the Send Books button. That finished without problem and I once again disconnected, powered down/up, reconnected and ran the Update ToC process against all my books.

All 160 of the newly sent over kepubs said they needed their ToCs to be updated as well as those original 7. When I tried updating the ToCs of just those 160 books (ignoring the original 7) I shortly got the same error.
The problem is that I'm working with 160 books this time instead of my original 7. I can manually check 7 books, but not 160. So, I'm sort of semi-stuck. But, obviously, I'm misunderstanding something about how this process works. If I removed a book from my Forma, sent a new copy over as a kepub and did all the disconnect/power down/up/reconnect business, shouldn't that fresh copy on the Forma have the same ToC as what's in my Calibre library?

EDIT: I don't know if this is of any use, but here's the part of running this under debug mode starting from when I pushed the button to update the ToC of just one of my problematic books:

Spoiler:
Code:
DEBUG:   98.6 update_button_clicked - ids_to_sync= [1448]
DEBUG:  108.5 update_book_toc_on_device - len(update_books)=1
DEBUG:  108.5 update_book_toc_on_device - update_books=1
DEBUG:  108.5 update_book_toc_on_device - filtered update_books=1
DEBUG:  108.5 version=Kobo Utilities v2.14.1
DEBUG:  108.5 update_device_toc_for_books - books= [{'good': False, 'calibre_id': 1448, 'title': 'City of Bones', 'author': 'Martha Wells', 'author_sort': 'Wells, Martha', 'comment': 'Chapters need to be updated in Kobo eReader database', 'url': '', 'added': False, 'library_chapters': [{'title': 'Start', 'path': 'titlepage.xhtml-1', 'toc_depth': 1, 'added': False}, {'title': 'Cover', 'path': 'titlepage.xhtml-1', 'toc_depth': 1, 'added': False}, {'title': 'City of Bones', 'path': 'index_split_000.xhtml-1', 'toc_depth': 1, 'added': False}, {'title': 'This is a work of fiction. All the characters and events portrayed in this book are fictional, and any resemblance to real people or current events is purely coincidental.', 'path': 'index_split_001.xhtml-1', 'toc_depth': 1, 'added': False}, {'title': 'Chapter One', 'path': 'index_split_002.xhtml-1', 'toc_depth': 1, 'added': False}, {'title': 'Chapter Two', 'path': 'index_split_003.xhtml-1', 'toc_depth': 1, 'added': False}, {'title': 'Chapter Three', 'path': 'index_split_004.xhtml-1', 'toc_depth': 1, 'added': False}, {'title': 'Chapter Four', 'path': 'index_split_005.xhtml-1', 'toc_depth': 1, 'added': False}, {'title': 'Chapter Five', 'path': 'index_split_006.xhtml-1', 'toc_depth': 1, 'added': False}, {'title': 'Chapter Six', 'path': 'index_split_007.xhtml-1', 'toc_depth': 1, 'added': False}, {'title': 'Chapter Seven', 'path': 'index_split_008.xhtml-1', 'toc_depth': 1, 'added': False}, {'title': 'Chapter Eight', 'path': 'index_split_009.xhtml-1', 'toc_depth': 1, 'added': False}, {'title': 'Chapter Nine', 'path': 'index_split_010.xhtml-1', 'toc_depth': 1, 'added': False}, {'title': 'Chapter Ten', 'path': 'index_split_011.xhtml-1', 'toc_depth': 1, 'added': False}, {'title': 'Chapter Eleven', 'path': 'index_split_012.xhtml-1', 'toc_depth': 1, 'added': False}, {'title': 'Chapter Twelve', 'path': 'index_split_013.xhtml-1', 'toc_depth': 1, 'added': False}, {'title': 'Chapter Thirteen', 'path': 'index_split_014.xhtml-1', 'toc_depth': 1, 'added': False}, {'title': 'Chapter Fourteen', 'path': 'index_split_015.xhtml-1', 'toc_depth': 1, 'added': False}, {'title': 'Chapter Fifteen', 'path': 'index_split_016.xhtml-1', 'toc_depth': 1, 'added': False}, {'title': 'Chapter Sixteen', 'path': 'index_split_017.xhtml-1', 'toc_depth': 1, 'added': False}, {'title': 'Chapter Seventeen', 'path': 'index_split_018.xhtml-1', 'toc_depth': 1, 'added': False}, {'title': 'Chapter Eighteen', 'path': 'index_split_019.xhtml-1', 'toc_depth': 1, 'added': False}, {'title': 'Chapter Nineteen', 'path': 'index_split_020.xhtml-1', 'toc_depth': 1, 'added': False}, {'title': 'Chapter Twenty', 'path': 'index_split_021.xhtml-1', 'toc_depth': 1, 'added': False}, {'title': 'Chapter Twenty-one', 'path': 'index_split_022.xhtml-1', 'toc_depth': 1, 'added': False}], 'kobo_chapters': [{'title': 'Start', 'path': 'titlepage.xhtml-1', 'toc_depth': 1, 'added': False}, {'title': 'Cover', 'path': 'titlepage.xhtml-1', 'toc_depth': 1, 'added': False}, {'title': 'City of Bones', 'path': 'index_split_000.xhtml-1', 'toc_depth': 1, 'added': False}, {'title': 'This is a work of fiction. All the characters and events portrayed in this book are fictional, and any resemblance to real people or current events is purely coincidental.', 'path': 'index_split_001.xhtml-1', 'toc_depth': 1, 'added': False}, {'title': 'Chapter One', 'path': 'index_split_002.xhtml-1', 'toc_depth': 1, 'added': False}, {'title': 'Chapter Two', 'path': 'index_split_003.xhtml-1', 'toc_depth': 1, 'added': False}, {'title': 'Chapter Three', 'path': 'index_split_004.xhtml-1', 'toc_depth': 1, 'added': False}, {'title': 'Chapter Four', 'path': 'index_split_005.xhtml-1', 'toc_depth': 1, 'added': False}, {'title': 'Chapter Five', 'path': 'index_split_006.xhtml-1', 'toc_depth': 1, 'added': False}, {'title': 'Chapter Six', 'path': 'index_split_007.xhtml-1', 'toc_depth': 1, 'added': False}, {'title': 'Chapter Seven', 'path': 'index_split_008.xhtml-1', 'toc_depth': 1, 'added': False}, {'title': 'Chapter Eight', 'path': 'index_split_009.xhtml-1', 'toc_depth': 1, 'added': False}, {'title': 'Chapter Nine', 'path': 'index_split_010.xhtml-1', 'toc_depth': 1, 'added': False}, {'title': 'Chapter Ten', 'path': 'index_split_011.xhtml-1', 'toc_depth': 1, 'added': False}, {'title': 'Chapter Eleven', 'path': 'index_split_012.xhtml-1', 'toc_depth': 1, 'added': False}, {'title': 'Chapter Twelve', 'path': 'index_split_013.xhtml-1', 'toc_depth': 1, 'added': False}, {'title': 'Chapter Thirteen', 'path': 'index_split_014.xhtml-1', 'toc_depth': 1, 'added': False}, {'title': 'Chapter Fourteen', 'path': 'index_split_015.xhtml-1', 'toc_depth': 1, 'added': False}, {'title': 'Chapter Fifteen', 'path': 'index_split_016.xhtml-1', 'toc_depth': 1, 'added': False}, {'title': 'Chapter Sixteen', 'path': 'index_split_017.xhtml-1', 'toc_depth': 1, 'added': False}, {'title': 'Chapter Seventeen', 'path': 'index_split_018.xhtml-1', 'toc_depth': 1, 'added': False}, {'title': 'Chapter Eighteen', 'path': 'index_split_019.xhtml-1', 'toc_depth': 1, 'added': False}, {'title': 'Chapter Nineteen', 'path': 'index_split_020.xhtml-1', 'toc_depth': 1, 'added': False}, {'title': 'Chapter Twenty', 'path': 'index_split_021.xhtml-1', 'toc_depth': 1, 'added': False}, {'title': 'Chapter Twenty-one', 'path': 'index_split_022.xhtml-1', 'toc_depth': 1, 'added': False}], 'kobo_database_chapters': [{'chapterContentId': '/mnt/onboard/Wells, Martha/City of Bones - Martha Wells.kepub.epub!!titlepage.xhtml-1', 'VolumeIndex': 0, 'title': 'Start', 'path': 'titlepage.xhtml-1', 'adobe_location': None, 'ChapterIDBookmarked': '/mnt/onboard/Wells, Martha/City of Bones - Martha Wells.kepub.epub!!titlepage.xhtml', 'toc_depth': 1, 'added': True}], 'kobo_format_status': True, 'kobo_database_status': False, 'can_update_toc': True, 'ContentID': 'file:///mnt/onboard/Wells, Martha/City of Bones - Martha Wells.kepub.epub', 'kobo_format': 'KEPUB', 'library_format': 'EPUB', 'library_opf_name': 'content.opf', 'library_opf_dir': '', 'library_manifest': [{'path': 'titlepage.xhtml', 'file_size': 833, 'name': 'titlepage.xhtml'}, {'path': 'jacket.xhtml', 'file_size': 5483, 'name': 'jacket.xhtml'}, {'path': 'index_split_000.xhtml', 'file_size': 900, 'name': 'index_split_000.xhtml'}, {'path': 'index_split_001.xhtml', 'file_size': 1427, 'name': 'index_split_001.xhtml'}, {'path': 'index_split_002.xhtml', 'file_size': 52362, 'name': 'index_split_002.xhtml'}, {'path': 'index_split_003.xhtml', 'file_size': 58292, 'name': 'index_split_003.xhtml'}, {'path': 'index_split_004.xhtml', 'file_size': 37324, 'name': 'index_split_004.xhtml'}, {'path': 'index_split_005.xhtml', 'file_size': 38716, 'name': 'index_split_005.xhtml'}, {'path': 'index_split_006.xhtml', 'file_size': 57286, 'name': 'index_split_006.xhtml'}, {'path': 'index_split_007.xhtml', 'file_size': 58885, 'name': 'index_split_007.xhtml'}, {'path': 'index_split_008.xhtml', 'file_size': 61779, 'name': 'index_split_008.xhtml'}, {'path': 'index_split_009.xhtml', 'file_size': 65067, 'name': 'index_split_009.xhtml'}, {'path': 'index_split_010.xhtml', 'file_size': 43681, 'name': 'index_split_010.xhtml'}, {'path': 'index_split_011.xhtml', 'file_size': 47410, 'name': 'index_split_011.xhtml'}, {'path': 'index_split_012.xhtml', 'file_size': 32255, 'name': 'index_split_012.xhtml'}, {'path': 'index_split_013.xhtml', 'file_size': 65513, 'name': 'index_split_013.xhtml'}, {'path': 'index_split_014.xhtml', 'file_size': 63757, 'name': 'index_split_014.xhtml'}, {'path': 'index_split_015.xhtml', 'file_size': 31444, 'name': 'index_split_015.xhtml'}, {'path': 'index_split_016.xhtml', 'file_size': 39012, 'name': 'index_split_016.xhtml'}, {'path': 'index_split_017.xhtml', 'file_size': 66222, 'name': 'index_split_017.xhtml'}, {'path': 'index_split_018.xhtml', 'file_size': 56837, 'name': 'index_split_018.xhtml'}, {'path': 'index_split_019.xhtml', 'file_size': 30660, 'name': 'index_split_019.xhtml'}, {'path': 'index_split_020.xhtml', 'file_size': 50490, 'name': 'index_split_020.xhtml'}, {'path': 'index_split_021.xhtml', 'file_size': 21250, 'name': 'index_split_021.xhtml'}, {'path': 'index_split_022.xhtml', 'file_size': 54467, 'name': 'index_split_022.xhtml'}], 'library_container': <calibre.ebooks.oeb.polish.container.EpubContainer object at 0x00000214AC3B7DF0>, 'kobo_opf_name': 'content.opf', 'kobo_opf_dir': '', 'kobo_manifest': [{'path': 'titlepage.xhtml', 'file_size': 836, 'name': 'titlepage.xhtml'}, {'path': 'jacket.xhtml', 'file_size': 7558, 'name': 'jacket.xhtml'}, {'path': 'index_split_000.xhtml', 'file_size': 1109, 'name': 'index_split_000.xhtml'}, {'path': 'index_split_001.xhtml', 'file_size': 2167, 'name': 'index_split_001.xhtml'}, {'path': 'index_split_002.xhtml', 'file_size': 74395, 'name': 'index_split_002.xhtml'}, {'path': 'index_split_003.xhtml', 'file_size': 85433, 'name': 'index_split_003.xhtml'}, {'path': 'index_split_004.xhtml', 'file_size': 55819, 'name': 'index_split_004.xhtml'}, {'path': 'index_split_005.xhtml', 'file_size': 60344, 'name': 'index_split_005.xhtml'}, {'path': 'index_split_006.xhtml', 'file_size': 87978, 'name': 'index_split_006.xhtml'}, {'path': 'index_split_007.xhtml', 'file_size': 90272, 'name': 'index_split_007.xhtml'}, {'path': 'index_split_008.xhtml', 'file_size': 93126, 'name': 'index_split_008.xhtml'}, {'path': 'index_split_009.xhtml', 'file_size': 97508, 'name': 'index_split_009.xhtml'}, {'path': 'index_split_010.xhtml', 'file_size': 67533, 'name': 'index_split_010.xhtml'}, {'path': 'index_split_011.xhtml', 'file_size': 73448, 'name': 'index_split_011.xhtml'}, {'path': 'index_split_012.xhtml', 'file_size': 50604, 'name': 'index_split_012.xhtml'}, {'path': 'index_split_013.xhtml', 'file_size': 103485, 'name': 'index_split_013.xhtml'}, {'path': 'index_split_014.xhtml', 'file_size': 97144, 'name': 'index_split_014.xhtml'}, {'path': 'index_split_015.xhtml', 'file_size': 48874, 'name': 'index_split_015.xhtml'}, {'path': 'index_split_016.xhtml', 'file_size': 59253, 'name': 'index_split_016.xhtml'}, {'path': 'index_split_017.xhtml', 'file_size': 98436, 'name': 'index_split_017.xhtml'}, {'path': 'index_split_018.xhtml', 'file_size': 88730, 'name': 'index_split_018.xhtml'}, {'path': 'index_split_019.xhtml', 'file_size': 47072, 'name': 'index_split_019.xhtml'}, {'path': 'index_split_020.xhtml', 'file_size': 80725, 'name': 'index_split_020.xhtml'}, {'path': 'index_split_021.xhtml', 'file_size': 32427, 'name': 'index_split_021.xhtml'}, {'path': 'index_split_022.xhtml', 'file_size': 83880, 'name': 'index_split_022.xhtml'}], 'kobo_container': <calibre.ebooks.oeb.polish.container.EpubContainer object at 0x00000214ACD1B7F0>, 'kobo_database_manifest': [], 'icon': 'toc.png'}]
DEBUG:  108.5 update_device_toc_for_books - book= {'good': False, 'calibre_id': 1448, 'title': 'City of Bones', 'author': 'Martha Wells', 'author_sort': 'Wells, Martha', 'comment': 'Chapters need to be updated in Kobo eReader database', 'url': '', 'added': False, 'library_chapters': [{'title': 'Start', 'path': 'titlepage.xhtml-1', 'toc_depth': 1, 'added': False}, {'title': 'Cover', 'path': 'titlepage.xhtml-1', 'toc_depth': 1, 'added': False}, {'title': 'City of Bones', 'path': 'index_split_000.xhtml-1', 'toc_depth': 1, 'added': False}, {'title': 'This is a work of fiction. All the characters and events portrayed in this book are fictional, and any resemblance to real people or current events is purely coincidental.', 'path': 'index_split_001.xhtml-1', 'toc_depth': 1, 'added': False}, {'title': 'Chapter One', 'path': 'index_split_002.xhtml-1', 'toc_depth': 1, 'added': False}, {'title': 'Chapter Two', 'path': 'index_split_003.xhtml-1', 'toc_depth': 1, 'added': False}, {'title': 'Chapter Three', 'path': 'index_split_004.xhtml-1', 'toc_depth': 1, 'added': False}, {'title': 'Chapter Four', 'path': 'index_split_005.xhtml-1', 'toc_depth': 1, 'added': False}, {'title': 'Chapter Five', 'path': 'index_split_006.xhtml-1', 'toc_depth': 1, 'added': False}, {'title': 'Chapter Six', 'path': 'index_split_007.xhtml-1', 'toc_depth': 1, 'added': False}, {'title': 'Chapter Seven', 'path': 'index_split_008.xhtml-1', 'toc_depth': 1, 'added': False}, {'title': 'Chapter Eight', 'path': 'index_split_009.xhtml-1', 'toc_depth': 1, 'added': False}, {'title': 'Chapter Nine', 'path': 'index_split_010.xhtml-1', 'toc_depth': 1, 'added': False}, {'title': 'Chapter Ten', 'path': 'index_split_011.xhtml-1', 'toc_depth': 1, 'added': False}, {'title': 'Chapter Eleven', 'path': 'index_split_012.xhtml-1', 'toc_depth': 1, 'added': False}, {'title': 'Chapter Twelve', 'path': 'index_split_013.xhtml-1', 'toc_depth': 1, 'added': False}, {'title': 'Chapter Thirteen', 'path': 'index_split_014.xhtml-1', 'toc_depth': 1, 'added': False}, {'title': 'Chapter Fourteen', 'path': 'index_split_015.xhtml-1', 'toc_depth': 1, 'added': False}, {'title': 'Chapter Fifteen', 'path': 'index_split_016.xhtml-1', 'toc_depth': 1, 'added': False}, {'title': 'Chapter Sixteen', 'path': 'index_split_017.xhtml-1', 'toc_depth': 1, 'added': False}, {'title': 'Chapter Seventeen', 'path': 'index_split_018.xhtml-1', 'toc_depth': 1, 'added': False}, {'title': 'Chapter Eighteen', 'path': 'index_split_019.xhtml-1', 'toc_depth': 1, 'added': False}, {'title': 'Chapter Nineteen', 'path': 'index_split_020.xhtml-1', 'toc_depth': 1, 'added': False}, {'title': 'Chapter Twenty', 'path': 'index_split_021.xhtml-1', 'toc_depth': 1, 'added': False}, {'title': 'Chapter Twenty-one', 'path': 'index_split_022.xhtml-1', 'toc_depth': 1, 'added': False}], 'kobo_chapters': [{'title': 'Start', 'path': 'titlepage.xhtml-1', 'toc_depth': 1, 'added': False}, {'title': 'Cover', 'path': 'titlepage.xhtml-1', 'toc_depth': 1, 'added': False}, {'title': 'City of Bones', 'path': 'index_split_000.xhtml-1', 'toc_depth': 1, 'added': False}, {'title': 'This is a work of fiction. All the characters and events portrayed in this book are fictional, and any resemblance to real people or current events is purely coincidental.', 'path': 'index_split_001.xhtml-1', 'toc_depth': 1, 'added': False}, {'title': 'Chapter One', 'path': 'index_split_002.xhtml-1', 'toc_depth': 1, 'added': False}, {'title': 'Chapter Two', 'path': 'index_split_003.xhtml-1', 'toc_depth': 1, 'added': False}, {'title': 'Chapter Three', 'path': 'index_split_004.xhtml-1', 'toc_depth': 1, 'added': False}, {'title': 'Chapter Four', 'path': 'index_split_005.xhtml-1', 'toc_depth': 1, 'added': False}, {'title': 'Chapter Five', 'path': 'index_split_006.xhtml-1', 'toc_depth': 1, 'added': False}, {'title': 'Chapter Six', 'path': 'index_split_007.xhtml-1', 'toc_depth': 1, 'added': False}, {'title': 'Chapter Seven', 'path': 'index_split_008.xhtml-1', 'toc_depth': 1, 'added': False}, {'title': 'Chapter Eight', 'path': 'index_split_009.xhtml-1', 'toc_depth': 1, 'added': False}, {'title': 'Chapter Nine', 'path': 'index_split_010.xhtml-1', 'toc_depth': 1, 'added': False}, {'title': 'Chapter Ten', 'path': 'index_split_011.xhtml-1', 'toc_depth': 1, 'added': False}, {'title': 'Chapter Eleven', 'path': 'index_split_012.xhtml-1', 'toc_depth': 1, 'added': False}, {'title': 'Chapter Twelve', 'path': 'index_split_013.xhtml-1', 'toc_depth': 1, 'added': False}, {'title': 'Chapter Thirteen', 'path': 'index_split_014.xhtml-1', 'toc_depth': 1, 'added': False}, {'title': 'Chapter Fourteen', 'path': 'index_split_015.xhtml-1', 'toc_depth': 1, 'added': False}, {'title': 'Chapter Fifteen', 'path': 'index_split_016.xhtml-1', 'toc_depth': 1, 'added': False}, {'title': 'Chapter Sixteen', 'path': 'index_split_017.xhtml-1', 'toc_depth': 1, 'added': False}, {'title': 'Chapter Seventeen', 'path': 'index_split_018.xhtml-1', 'toc_depth': 1, 'added': False}, {'title': 'Chapter Eighteen', 'path': 'index_split_019.xhtml-1', 'toc_depth': 1, 'added': False}, {'title': 'Chapter Nineteen', 'path': 'index_split_020.xhtml-1', 'toc_depth': 1, 'added': False}, {'title': 'Chapter Twenty', 'path': 'index_split_021.xhtml-1', 'toc_depth': 1, 'added': False}, {'title': 'Chapter Twenty-one', 'path': 'index_split_022.xhtml-1', 'toc_depth': 1, 'added': False}], 'kobo_database_chapters': [{'chapterContentId': '/mnt/onboard/Wells, Martha/City of Bones - Martha Wells.kepub.epub!!titlepage.xhtml-1', 'VolumeIndex': 0, 'title': 'Start', 'path': 'titlepage.xhtml-1', 'adobe_location': None, 'ChapterIDBookmarked': '/mnt/onboard/Wells, Martha/City of Bones - Martha Wells.kepub.epub!!titlepage.xhtml', 'toc_depth': 1, 'added': True}], 'kobo_format_status': True, 'kobo_database_status': False, 'can_update_toc': True, 'ContentID': 'file:///mnt/onboard/Wells, Martha/City of Bones - Martha Wells.kepub.epub', 'kobo_format': 'KEPUB', 'library_format': 'EPUB', 'library_opf_name': 'content.opf', 'library_opf_dir': '', 'library_manifest': [{'path': 'titlepage.xhtml', 'file_size': 833, 'name': 'titlepage.xhtml'}, {'path': 'jacket.xhtml', 'file_size': 5483, 'name': 'jacket.xhtml'}, {'path': 'index_split_000.xhtml', 'file_size': 900, 'name': 'index_split_000.xhtml'}, {'path': 'index_split_001.xhtml', 'file_size': 1427, 'name': 'index_split_001.xhtml'}, {'path': 'index_split_002.xhtml', 'file_size': 52362, 'name': 'index_split_002.xhtml'}, {'path': 'index_split_003.xhtml', 'file_size': 58292, 'name': 'index_split_003.xhtml'}, {'path': 'index_split_004.xhtml', 'file_size': 37324, 'name': 'index_split_004.xhtml'}, {'path': 'index_split_005.xhtml', 'file_size': 38716, 'name': 'index_split_005.xhtml'}, {'path': 'index_split_006.xhtml', 'file_size': 57286, 'name': 'index_split_006.xhtml'}, {'path': 'index_split_007.xhtml', 'file_size': 58885, 'name': 'index_split_007.xhtml'}, {'path': 'index_split_008.xhtml', 'file_size': 61779, 'name': 'index_split_008.xhtml'}, {'path': 'index_split_009.xhtml', 'file_size': 65067, 'name': 'index_split_009.xhtml'}, {'path': 'index_split_010.xhtml', 'file_size': 43681, 'name': 'index_split_010.xhtml'}, {'path': 'index_split_011.xhtml', 'file_size': 47410, 'name': 'index_split_011.xhtml'}, {'path': 'index_split_012.xhtml', 'file_size': 32255, 'name': 'index_split_012.xhtml'}, {'path': 'index_split_013.xhtml', 'file_size': 65513, 'name': 'index_split_013.xhtml'}, {'path': 'index_split_014.xhtml', 'file_size': 63757, 'name': 'index_split_014.xhtml'}, {'path': 'index_split_015.xhtml', 'file_size': 31444, 'name': 'index_split_015.xhtml'}, {'path': 'index_split_016.xhtml', 'file_size': 39012, 'name': 'index_split_016.xhtml'}, {'path': 'index_split_017.xhtml', 'file_size': 66222, 'name': 'index_split_017.xhtml'}, {'path': 'index_split_018.xhtml', 'file_size': 56837, 'name': 'index_split_018.xhtml'}, {'path': 'index_split_019.xhtml', 'file_size': 30660, 'name': 'index_split_019.xhtml'}, {'path': 'index_split_020.xhtml', 'file_size': 50490, 'name': 'index_split_020.xhtml'}, {'path': 'index_split_021.xhtml', 'file_size': 21250, 'name': 'index_split_021.xhtml'}, {'path': 'index_split_022.xhtml', 'file_size': 54467, 'name': 'index_split_022.xhtml'}], 'library_container': <calibre.ebooks.oeb.polish.container.EpubContainer object at 0x00000214AC3B7DF0>, 'kobo_opf_name': 'content.opf', 'kobo_opf_dir': '', 'kobo_manifest': [{'path': 'titlepage.xhtml', 'file_size': 836, 'name': 'titlepage.xhtml'}, {'path': 'jacket.xhtml', 'file_size': 7558, 'name': 'jacket.xhtml'}, {'path': 'index_split_000.xhtml', 'file_size': 1109, 'name': 'index_split_000.xhtml'}, {'path': 'index_split_001.xhtml', 'file_size': 2167, 'name': 'index_split_001.xhtml'}, {'path': 'index_split_002.xhtml', 'file_size': 74395, 'name': 'index_split_002.xhtml'}, {'path': 'index_split_003.xhtml', 'file_size': 85433, 'name': 'index_split_003.xhtml'}, {'path': 'index_split_004.xhtml', 'file_size': 55819, 'name': 'index_split_004.xhtml'}, {'path': 'index_split_005.xhtml', 'file_size': 60344, 'name': 'index_split_005.xhtml'}, {'path': 'index_split_006.xhtml', 'file_size': 87978, 'name': 'index_split_006.xhtml'}, {'path': 'index_split_007.xhtml', 'file_size': 90272, 'name': 'index_split_007.xhtml'}, {'path': 'index_split_008.xhtml', 'file_size': 93126, 'name': 'index_split_008.xhtml'}, {'path': 'index_split_009.xhtml', 'file_size': 97508, 'name': 'index_split_009.xhtml'}, {'path': 'index_split_010.xhtml', 'file_size': 67533, 'name': 'index_split_010.xhtml'}, {'path': 'index_split_011.xhtml', 'file_size': 73448, 'name': 'index_split_011.xhtml'}, {'path': 'index_split_012.xhtml', 'file_size': 50604, 'name': 'index_split_012.xhtml'}, {'path': 'index_split_013.xhtml', 'file_size': 103485, 'name': 'index_split_013.xhtml'}, {'path': 'index_split_014.xhtml', 'file_size': 97144, 'name': 'index_split_014.xhtml'}, {'path': 'index_split_015.xhtml', 'file_size': 48874, 'name': 'index_split_015.xhtml'}, {'path': 'index_split_016.xhtml', 'file_size': 59253, 'name': 'index_split_016.xhtml'}, {'path': 'index_split_017.xhtml', 'file_size': 98436, 'name': 'index_split_017.xhtml'}, {'path': 'index_split_018.xhtml', 'file_size': 88730, 'name': 'index_split_018.xhtml'}, {'path': 'index_split_019.xhtml', 'file_size': 47072, 'name': 'index_split_019.xhtml'}, {'path': 'index_split_020.xhtml', 'file_size': 80725, 'name': 'index_split_020.xhtml'}, {'path': 'index_split_021.xhtml', 'file_size': 32427, 'name': 'index_split_021.xhtml'}, {'path': 'index_split_022.xhtml', 'file_size': 83880, 'name': 'index_split_022.xhtml'}], 'kobo_container': <calibre.ebooks.oeb.polish.container.EpubContainer object at 0x00000214ACD1B7F0>, 'kobo_database_manifest': [], 'icon': 'toc.png'}
DEBUG:  108.5 update_device_toc_for_books - ContentID= file:///mnt/onboard/Wells, Martha/City of Bones - Martha Wells.kepub.epub
DEBUG:  108.5 remove_all_toc_entries - contentId= file:///mnt/onboard/Wells, Martha/City of Bones - Martha Wells.kepub.epub
DEBUG:  108.6 update_device_toc_for_book - bookTitle=City of Bones, len(book['library_chapters'])=25
DEBUG:  108.6 update_device_toc_for_book - chapter= {'title': 'Start', 'path': 'titlepage.xhtml-1', 'toc_depth': 1, 'added': False}
DEBUG:  108.6 update_device_toc_for_book - chapterContentId= file:///mnt/onboard/Wells, Martha/City of Bones - Martha Wells.kepub.epub!!titlepage.xhtml-1
DEBUG:  109.1 getDatabaseChapterId - chapterContentId=None
DEBUG:  109.1 update_device_toc_for_book - has_chapter= False
DEBUG:  109.1 addChapterToDatabase - regex matches= ('/mnt/onboard/Wells, Martha/City of Bones - Martha Wells.kepub.epub!!titlepage.xhtml-1', '/mnt/onboard/Wells, Martha/City of Bones - Martha Wells.kepub.epub!!titlepage.xhtml')
DEBUG:  109.1 addChapterToDatabase - insertContentData= ('/mnt/onboard/Wells, Martha/City of Bones - Martha Wells.kepub.epub!!titlepage.xhtml-1', 899, 'application/x-kobo-epub+zip', 'file:///mnt/onboard/Wells, Martha/City of Bones - Martha Wells.kepub.epub', 'City of Bones', 'Start', None, 0, '', 1, '/mnt/onboard/Wells, Martha/City of Bones - Martha Wells.kepub.epub!!titlepage.xhtml')
DEBUG:  109.1 update_device_toc_for_book - chapter= {'title': 'Cover', 'path': 'titlepage.xhtml-1', 'toc_depth': 1, 'added': False}
DEBUG:  109.1 update_device_toc_for_book - chapterContentId= file:///mnt/onboard/Wells, Martha/City of Bones - Martha Wells.kepub.epub!!titlepage.xhtml-1
DEBUG:  109.1 getDatabaseChapterId - chapterContentId=None
DEBUG:  109.1 update_device_toc_for_book - has_chapter= False
DEBUG:  109.1 addChapterToDatabase - regex matches= ('/mnt/onboard/Wells, Martha/City of Bones - Martha Wells.kepub.epub!!titlepage.xhtml-1', '/mnt/onboard/Wells, Martha/City of Bones - Martha Wells.kepub.epub!!titlepage.xhtml')
DEBUG:  109.1 addChapterToDatabase - insertContentData= ('/mnt/onboard/Wells, Martha/City of Bones - Martha Wells.kepub.epub!!titlepage.xhtml-1', 899, 'application/x-kobo-epub+zip', 'file:///mnt/onboard/Wells, Martha/City of Bones - Martha Wells.kepub.epub', 'City of Bones', 'Cover', None, 1, '', 1, '/mnt/onboard/Wells, Martha/City of Bones - Martha Wells.kepub.epub!!titlepage.xhtml')
calibre 5.32 [64bit]  embedded-python: True is64bit: True
Windows-10-10.0.19041 Windows ('64bit', 'WindowsPE')
('Windows', '10', '10.0.19041')
Python 3.8.5
Windows: ('10', '10.0.19041', '', 'Multiprocessor Free')
Interface language: None
Successfully initialized third party plugins: DeDRM (7, 1, 0) && GetFileName (0, 1, 1) && Goodreads (1, 5, 1) && Kobo Utilities (2, 14, 1) && KoboTouchExtended (3, 5, 4) && Modify ePub (1, 6, 3) && Quality Check (1, 11, 4)
Traceback (most recent call last):
  File "calibre_plugins.koboutilities.action", line 5361, in update_book_toc_on_device
  File "calibre_plugins.koboutilities.action", line 5789, in update_device_toc_for_books
  File "calibre_plugins.koboutilities.action", line 5813, in update_device_toc_for_book
  File "calibre_plugins.koboutilities.action", line 5926, in addChapterToDatabase
apsw.ConstraintError: ConstraintError: UNIQUE constraint failed: content.ContentID

Last edited by enuddleyarbl; 11-16-2021 at 10:26 PM.
enuddleyarbl is offline   Reply With Quote
Advert
Old 11-17-2021, 04:46 AM   #2316
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303822
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
That error suggests that a there is a duplicate ToC in the book. The ToC is stored in a table called "content". The primary key on this is the column "ContentID". That has to be unique. For the ToC entries, the ContentID is made up of the path to the book plus the path of the file inside the book plus a fragment if it is used. And some other stuff depending. In this case, it seems there are two ToC entries "Start" and "Cover", both pointing to the same file "titlepage.xhtml". That is a little bit weird and I haven't seen it before. Most times I have seen a "Start" entry in the ToC, it is the only entry. It's probably put in by some tool when it can't generate a better ToC.

I just tried this. And the device only adds one of these ToC entries when the book is imported. The ToC check sees both of these entries in the book but doesn't compensate. I'll fix that, but, it might be a few days.

Personally, I would remove the extra entry in the book. It's not really doing anything. If it actually pointed to the the start of the actual text, it would make more sense. It makes me think was a book like I mentioned above that only had "Start" and then someone created a full ToC for but didn't remove the existing entry.

You should be able to work out which books are suffering from this in the debug log. In this case, the book is "City of Bones" by Martha Wells. This should be the first book that failed in the list. All the earlier books should be fixed. And I'll look at a bit better error handling as well.
davidfor is offline   Reply With Quote
Old 11-17-2021, 11:16 AM   #2317
enuddleyarbl
Guru
enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.
 
enuddleyarbl's Avatar
 
Posts: 734
Karma: 1077122
Join Date: Sep 2013
Device: Kobo Forma
Thanks for the reply. I had seen those ToC entries pointing to the same spots in the book but didn't realize that was the problem. I'm not sure where the multiple pointers to the same locations came from, but I'll go through the problematic books and see if getting rid of them helps. As you say, they just point to the same place (usually the cover or things like acknowledgements), so getting rid of them isn't really an issue.
enuddleyarbl is offline   Reply With Quote
Old 11-17-2021, 06:43 PM   #2318
Karellen
Wizard
Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.
 
Karellen's Avatar
 
Posts: 1,209
Karma: 4949904
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
Hello @davidfor and thank you for this plugin.

I am setting up my Libra 2 and trying to ensure my Series are uploaded correctly. The series are uploaded and displayed in the device library, but the books are not in the order as shown in Calibre.

In Calibre I use the default Series/Number fields to order books in the series. When I transfer to Kobo, the order is not transferred. I have used the "Manage series Information in device library" option and can order the books there.

My questions are:
1. Can I automatically transfer the order number when the book is sideloaded. If yes, what setting do I need to change in the image?
2. I have tried to Lock the series order, but the lock does not seem to hold. I get "0 books updated" and when I reenter the manage series screen, the lock icon is not there. Are there situations where this is expected not to work?

Thanks
Attached Thumbnails
Click image for larger version

Name:	collections.jpg
Views:	883
Size:	52.7 KB
ID:	190297  
Karellen is offline   Reply With Quote
Old 11-17-2021, 07:44 PM   #2319
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 30,107
Karma: 57259780
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Series is now independent of collections (you don't need the later)

Try the plugboard to insert series_index into the Title
Code:
{series_index} - {title} -> {title}
theducks is offline   Reply With Quote
Old 11-17-2021, 08:08 PM   #2320
hobnail
Running with scissors
hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.
 
Posts: 1,552
Karma: 14325282
Join Date: Nov 2019
Device: none
Quote:
Originally Posted by Karellen View Post
Hello @davidfor and thank you for this plugin.
Thanks
What theducks said. Here's how my KoboTouch is configured. Note the grayed out "Set series information". It becomes selectable if I uncheck "Update metadata on Book Details pages".
Attached Thumbnails
Click image for larger version

Name:	Capture1.PNG
Views:	401
Size:	30.6 KB
ID:	190298   Click image for larger version

Name:	Capture2.PNG
Views:	417
Size:	27.3 KB
ID:	190299  
hobnail is offline   Reply With Quote
Old 11-17-2021, 08:18 PM   #2321
Karellen
Wizard
Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.
 
Karellen's Avatar
 
Posts: 1,209
Karma: 4949904
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
Quote:
Originally Posted by theducks View Post
Series is now independent of collections (you don't need the later)

Try the plugboard to insert series_index into the Title
Code:
{series_index} - {title} -> {title}
Thanks @theducks.

I have not used plugboards before. I would rather keep the title clean.
Looking at the book list on the Kobo, it displays the Title on the first line, Series on the second line and Author on the third line.

So if I add {series}{series_index:0>2s| - | - } with a destination field of Series, will that work?

I guess I should also disable Collections in the plugin settings, as I seem to be duplicating the series in Collection and Series.
Karellen is offline   Reply With Quote
Old 11-17-2021, 10:08 PM   #2322
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 30,107
Karma: 57259780
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Kobo does include the index on the series line, I just don't think it orders it using the index
(sorry, but I rarely have multiple books in a series on my device. I remove them as soon as I logged the Finished date (I don't use the plugin feature as I don't want PROGRESS dates logged, only when Finished , and never clear a previous logged finished)
theducks is offline   Reply With Quote
Old 11-17-2021, 11:36 PM   #2323
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303822
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by Karellen View Post
Thanks @theducks.

I have not used plugboards before. I would rather keep the title clean.
Looking at the book list on the Kobo, it displays the Title on the first line, Series on the second line and Author on the third line.

So if I add {series}{series_index:0>2s| - | - } with a destination field of Series, will that work?
No, you do not need to do that. The Kobo devices actually understand series info and treats it as such. The series name and index are stored in the database. They are displayed in the list and used for sorting. If you do the above, then the device will treat each book as a being in a separate series. I think the only reason to fiddle with the series name is if you want to adjust if for some reason. Length or putting "The" on the end are probably the main reasons. But, I'm pretty sure the device does the latter when sorting.

The only issue with this is that the device does not read the series metadata from the book when importing them. You need to connect to calibre again to update the metadata for this to happen. After that connection, the series information will be displayed. There is also some hidden stuff happening for the series list and sorting there. But, the driver takes care of that.
Quote:
I guess I should also disable Collections in the plugin settings, as I seem to be duplicating the series in Collection and Series.
No, using Series for collections is not very useful now. Personally, I never found them that useful as I just ended up with several hundred collections with one or two books in them.
davidfor is offline   Reply With Quote
Old 11-17-2021, 11:54 PM   #2324
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303822
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by davidfor View Post
Personally, I never found them that useful as I just ended up with several hundred collections with one or two books in them.
After writing that, I wondered if it was possible to still have the series info but not have the series in the Series tab. And it is (with a little database manipulation).

The reason for the test is that one of the things I think that is missing from the series tab, is being able to filter the list. I'd like to be able to hide all series with only one book. Or some other small number of books. I can sort by number of books, but, if I am looking for something, then alphabetical sorting works better for me. Not showing the one- or two-book series would be useful. Of course, it would be even better to filter based on the number of unread books, but, Kobo would have to do that.

What I am thinking of doing is to add an option to the driver to set the minimum number of books in a series for the values used by the Series tab to be set. The displayed series info will still be set, so it will show in the book lists and should sort correctly (which I have to test) and will be searchable. It won't affect purchased books as Kobo sets those details. And if the series is a mix of purchased and sideloaded, I will probably set the full series info for the sideloaded books as well no matter what the setting.

Right now I am still thinking about it. I haven't looked at the code to see if it is practical there. But, I have experimented with the database and it seems to work as I want. And I have no idea when I would do it. But, I'm putting it out there to see if it would help others.
davidfor is offline   Reply With Quote
Old 11-18-2021, 02:09 AM   #2325
Karellen
Wizard
Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.
 
Karellen's Avatar
 
Posts: 1,209
Karma: 4949904
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
Quote:
Originally Posted by davidfor View Post
No, you do not need to do that. The Kobo devices actually understand series info and treats it as such. The series name and index are stored in the database. They are displayed in the list and used for sorting. If you do the above, then the device will treat each book as a being in a separate series. I think the only reason to fiddle with the series name is if you want to adjust if for some reason. Length or putting "The" on the end are probably the main reasons. But, I'm pretty sure the device does the latter when sorting.
Ok, I have removed that plugboard rule. It didn't work anyway.
In Calibre all my series are exactly as I want them. Correct Series, and books in the correct canonical order, regardless of what the publishing date is. Series were transferring across ok, but the book order number was not. It was just blank.
I haven't played with the ereader since my post above as got a bit busy, but maybe the problem I am having is touched on in your next statement.

Quote:
Originally Posted by davidfor View Post
The only issue with this is that the device does not read the series metadata from the book when importing them. You need to connect to calibre again to update the metadata for this to happen. After that connection, the series information will be displayed. There is also some hidden stuff happening for the series list and sorting there. But, the driver takes care of that.
Maybe this was the problem. I had to reconnect for the metadata to transfer and update the order numbers. I'll try that again tomorrow.


Quote:
Originally Posted by davidfor View Post
No, using Series for collections is not very useful now. Personally, I never found them that useful as I just ended up with several hundred collections with one or two books in them.
I was getting confused with Series and Collections. I didn't realise they were two separate things in the ereader.


Quote:
Originally Posted by davidfor View Post
After writing that, I wondered if it was possible to still have the series info but not have the series in the Series tab. And it is (with a little database manipulation).

The reason for the test is that one of the things I think that is missing from the series tab, is being able to filter the list. I'd like to be able to hide all series with only one book. Or some other small number of books. I can sort by number of books, but, if I am looking for something, then alphabetical sorting works better for me. Not showing the one- or two-book series would be useful. Of course, it would be even better to filter based on the number of unread books, but, Kobo would have to do that.

What I am thinking of doing is to add an option to the driver to set the minimum number of books in a series for the values used by the Series tab to be set. The displayed series info will still be set, so it will show in the book lists and should sort correctly (which I have to test) and will be searchable. It won't affect purchased books as Kobo sets those details. And if the series is a mix of purchased and sideloaded, I will probably set the full series info for the sideloaded books as well no matter what the setting.
Sounds reasonable. Personally I want to see the Series regardless of how many books there are. That way I know at a glance whether I can read the series straight away or I need to purchase the remaining books. Though I can do that on Calibre anyway by checking my stub entries.

What I would like, and I'll look how it is done once I finished Series, is to remove the duplication of having books listed in the Series screen, but then they are also listed in "Books". I would rather have series books in Series, and non-series books in Books.
I suppose Collections would do that for me.
Karellen is offline   Reply With Quote
Reply

Tags
calibre, kobo, kobo utilities, kobo-utilities, plugins

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[GUI Plugin] Manga plugin mastertea Plugins 6 01-06-2022 02:43 AM
[GUI Plugin] Save Virtual Libraries To Column (GUI) chaley Plugins 14 04-04-2021 05:25 AM
Kobo Utilities Plugin Question nikev Kobo Reader 10 09-25-2018 11:55 PM
[GUI Plugin] Plugin Updater **Deprecated** kiwidude Plugins 159 06-19-2011 12:27 PM


All times are GMT -4. The time now is 05:34 AM.


MobileRead.com is a privately owned, operated and funded community.