![]() |
#2311 |
Bookmaker
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 427
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? |
![]() |
![]() |
#2312 | |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 46,891
Karma: 169810634
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
|
|
![]() |
![]() |
#2313 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
Quote:
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. |
|
![]() |
![]() |
#2314 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
Quote:
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 -----------
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. |
|
![]() |
![]() |
#2315 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 782
Karma: 1538394
Join Date: Sep 2013
Device: Kobo Sage
|
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 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:
Last edited by enuddleyarbl; 11-16-2021 at 10:26 PM. |
![]() |
![]() |
#2316 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,905
Karma: 47303824
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. |
![]() |
![]() |
#2317 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 782
Karma: 1538394
Join Date: Sep 2013
Device: Kobo Sage
|
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.
|
![]() |
![]() |
#2318 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,622
Karma: 9500498
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 ![]() |
![]() |
![]() |
#2319 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,123
Karma: 60406498
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} |
![]() |
![]() |
#2320 |
Running with scissors
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,590
Karma: 14328510
Join Date: Nov 2019
Device: none
|
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".
|
![]() |
![]() |
#2321 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,622
Karma: 9500498
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
|
Quote:
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. |
|
![]() |
![]() |
#2322 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,123
Karma: 60406498
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) |
![]() |
![]() |
#2323 | ||
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
Quote:
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:
|
||
![]() |
![]() |
#2324 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
Quote:
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. |
|
![]() |
![]() |
#2325 | ||||
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,622
Karma: 9500498
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
|
Quote:
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:
Quote:
Quote:
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. |
||||
![]() |
![]() |
Tags |
calibre, kobo, kobo utilities, kobo-utilities, plugins |
|
![]() |
||||
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 |