Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 10-30-2022, 02:54 PM   #1
lightmaster
Member
lightmaster began at the beginning.
 
lightmaster's Avatar
 
Posts: 23
Karma: 10
Join Date: Aug 2022
Device: Kindle PW4 10th gen; Kobo Libra 2
Calibre thinks there are multiple copies of books on my Kindle running KOReader

I have a Kindle Paperwhite and I'm running KOReader on it. When I connect KOReader to WiFi and wirelessly connect to Calibre (Calibre detects it as "Wireless Device: KOReader (KindlePaperWhite4)"), Calibre keeps telling me that there are multiple copies of the same book on my device. I do not use the stock Kindle reader at all, and all formats on it are stored as epub. I can reliably reproduce this issue simply by sending a book that is not currently on my kindle to the kindle twice, then disconnecting and reconnecting to Calibre. Calibre will then tell me that the book exists twice, and when I go to "Remove Books > Remove matching books from device", it tells me that both copies are on "Main Memory" and have identical paths (ie, same exact file detected twice). If I send the same book a third time, and disconnect and reconnect, it will say the single file is now 3 different copies of the book.
lightmaster is offline   Reply With Quote
Old 10-30-2022, 07:25 PM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 44,273
Karma: 23661992
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
presumably the KOReader firmware is reporting the book twice to calibre. I dont know much about the wireless driver or KOReader, but that's pretty much the only way I know of that calibre will think there are multiple copies of a file.
kovidgoyal is offline   Reply With Quote
Advert
Old 10-31-2022, 12:41 AM   #3
lightmaster
Member
lightmaster began at the beginning.
 
lightmaster's Avatar
 
Posts: 23
Karma: 10
Join Date: Aug 2022
Device: Kindle PW4 10th gen; Kobo Libra 2
I thought I was creating this post in the "Calibre" section, didn't realize I created in the "Calibre > Device" section. Please move this thread to the appropriate section if this isn't the correct one.


Is it Calibre, the wireless driver, or the KOReader app that creates/modifies the `.metadata.calibre` file that's in the library folder on my device? If I open the metadata file and look for the book that calibre falsely thinks is on the device twice, I see completely identical, duplicate entries for the book in question. I guess whatever part of the process that modifies that file is failing to check if the book already exists in the metadata, so when calibre reads the metadata file on the subsequent connections, it sees the metadata there twice?

Code:
{
        "series_index": 1,
        "size": 642262,
        "series": "Kiera Hudson 2",
        "tags": [
            "Werewolves",
            "tim orourke",
            "Fantasy",
            "Vampires",
            "werewolf",
            "potter",
            "Romance",
            "Young Adult",
            "diaries",
            "kiera hudson",
            "Horror",
            "vampire",
            "To Read"
        ],
        "uuid": "22fc4ff1-4c97-4e54-b2ab-92ff1557b04a",
        "last_modified": "2022-10-29T06:48:05+00:00",
        "lpath": "Kiera Hudson 2/1 - Dead Flesh - O'Rourke, Tim.epub",
        "authors": [
            "Tim O'Rourke"
        ],
        "title": "Dead Flesh"
    },
    {
        "series_index": 1,
        "size": 642262,
        "series": "Kiera Hudson 2",
        "tags": [
            "Werewolves",
            "tim orourke",
            "Fantasy",
            "Vampires",
            "werewolf",
            "potter",
            "Romance",
            "Young Adult",
            "diaries",
            "kiera hudson",
            "Horror",
            "vampire",
            "To Read"
        ],
        "uuid": "22fc4ff1-4c97-4e54-b2ab-92ff1557b04a",
        "last_modified": "2022-10-29T06:48:05+00:00",
        "lpath": "Kiera Hudson 2/1 - Dead Flesh - O'Rourke, Tim.epub",
        "authors": [
            "Tim O'Rourke"
        ],
        "title": "Dead Flesh"
    }
lightmaster is offline   Reply With Quote
Old 10-31-2022, 08:42 AM   #4
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 11,911
Karma: 7076137
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by lightmaster View Post
Is it Calibre, the wireless driver, or the KOReader app that creates/modifies the `.metadata.calibre` file that's in the library folder on my device?
The wireless driver doesn't create or use that file, which means it must be koreader creating it.
chaley is offline   Reply With Quote
Old 10-31-2022, 04:30 PM   #5
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 75,702
Karma: 134319572
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Maybe this should be in the KOReader forum.
JSWolf is offline   Reply With Quote
Advert
Old 10-31-2022, 04:56 PM   #6
lightmaster
Member
lightmaster began at the beginning.
 
lightmaster's Avatar
 
Posts: 23
Karma: 10
Join Date: Aug 2022
Device: Kindle PW4 10th gen; Kobo Libra 2
Yea, I'm just making sure it wasn't some component of Calibre first, since Calibre does say that it's updating metadata on the device each time I send a book to KOReader. Gonna make a post on their GitHub about it when I get a chance.
lightmaster is offline   Reply With Quote
Old 10-31-2022, 05:27 PM   #7
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 11,911
Karma: 7076137
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by lightmaster View Post
Yea, I'm just making sure it wasn't some component of Calibre first, since Calibre does say that it's updating metadata on the device each time I send a book to KOReader.
FWIW: that says that the wireless driver is sending "updated" metadata back to the device for books the device claims to have. The exact meaning is complicated by whether or not the device supports metadata caching in the driver, but is up to the device to update its own "database" with the metadata sent by the driver.

The driver has no access to the device's memory. It requests information from the client and uses that to build a list of books on the device. Later it gives metadata back to the client, and the client does whatever it wants with that metadata. When you send a book it is the client that decides where to store it and whether it is an overwrite or a new format.
chaley is offline   Reply With Quote
Old 10-31-2022, 07:21 PM   #8
lightmaster
Member
lightmaster began at the beginning.
 
lightmaster's Avatar
 
Posts: 23
Karma: 10
Join Date: Aug 2022
Device: Kindle PW4 10th gen; Kobo Libra 2
So if I understand the flow correctly, then this means it's entirely on the device to determine whether the newly added/overridden book is a brand new file that isn't currently stored on the device, versus this book has the exact same folder and filename and therefore is just an updated book. Therefore the bug must be in KOReader's implementation of a wireless Calibre client.
lightmaster is offline   Reply With Quote
Old 11-01-2022, 07:16 AM   #9
lightmaster
Member
lightmaster began at the beginning.
 
lightmaster's Avatar
 
Posts: 23
Karma: 10
Join Date: Aug 2022
Device: Kindle PW4 10th gen; Kobo Libra 2
The KOReader team found a bug in the wireless Calibre plugin in KOReader. Thanks for pointing me over there.
lightmaster is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there a way to find all books w/ multiple copies? MarjaE Library Management 3 08-31-2019 01:18 AM
How to avoid importing duplicate copies of Kindle books when adding books to calibre kgwdc Calibre 1 08-11-2018 07:19 PM
All my books on device, but Calibre thinks 12% of them aren't. Geremia Library Management 0 12-27-2014 07:15 PM
Keeping Calibre customizations in sync across multiple copies CuriousGrrl Calibre 6 05-12-2013 06:15 PM
Multiple copies of books mr ploppy Amazon Kindle 4 10-30-2010 01:20 PM


All times are GMT -4. The time now is 02:53 AM.


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