![]() |
#1 |
Deviser
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,265
Karma: 2090983
Join Date: Aug 2013
Location: Texas
Device: none
|
Calibre Links, library_id, UUID, and Duplicates
While adding the new Calibre Links functionality to CalibreSpy, I necessarily looked at this new Calibre 5.6 function:
Code:
def create_copy_links(menu, data=None): library_id = getattr(db, 'server_library_id', None) The issue is that up to Calibre 5.6, it did not matter whatsoever to Calibre itself whether the UUID was actually unique. Now it appears to assume so. Therein lies the rub. Many users have several or many libraries with the identical UUID. Why? [1] They took a 50,000 book library, physically copied it into a new directory (library) name, then deleted all of the Fiction, leaving only NonFiction. The original library was similarly pruned, leaving only Fiction. A simple Calibre > Library > Library Maintenance > Check Library easily deleted orphan books and authors, and then compressed both "new" libraries...having the identical UUID. [2] Some plugins use special "template" libraries that the user of said plugins are required to use by checking the UUID. Hence, all of their customized versions of the mother template libraries have the identical UUID of their respective original templates. Backwards compatibility is a real issue. Changing each library's UUID is not an option. Perhaps a new server_library_id UUID needs to be created, and Calibre have a menu action to automatically detect and repair duplicates (e.g. by using the historical list of known libraries retained by Calibre). DaltonST Last edited by DaltonST; 12-08-2020 at 10:28 AM. |
![]() |
![]() |
![]() |
#2 |
Plugin Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,951
Karma: 4604435
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
|
I have no comment on this technical issue, but I do wonder if it should be in the Development sub-forum instead of Plugins?
|
![]() |
![]() |
Advert | |
|
![]() |
#3 | |
Deviser
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,265
Karma: 2090983
Join Date: Aug 2013
Location: Texas
Device: none
|
Quote:
Not at all. This is about a standard Calibre deficiency/bug. In fact, I believe this may be a component of BR's bug in Launchpad and her post in Library Management. https://bugs.launchpad.net/calibre/+bug/1907159 DaltonST Last edited by DaltonST; 12-08-2020 at 12:49 PM. |
|
![]() |
![]() |
![]() |
#4 |
Plugin Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,951
Karma: 4604435
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
|
... Okay, I'll leave it here then.
I can confirm the issue--copying a library on disk results in two libraries with the same library_id. Which my plugins use as a key for separating library specific settings. IIRC, I've had reports before of users whose libraries shared settings and I basically didn't believe them... |
![]() |
![]() |
![]() |
#5 | |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,707
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
![]() I assume you're referring to this post in Library Management ==>> https://www.mobileread.com/forums/sh...1&postcount=36 -- I realised that "gotcha" when I renamed a library from "Author Info" to "Authors"; IIRC renaming symlink targets has a similar "gotcha". However, it is the "Authors" library that I've been having problems when I copy calibre:\\show:book links from its books, and paste them into my Books library Author.Link fields. I seem to have gotten around that problem by 'fixing' them in the database with SQLite Browser. I have no idea why that should have made a difference ![]() I agree with JimmXinu, this is not an issue that belongs in the Plugins sub-forum specifically, my two 'issues' don't require any plugins. I'm not sure it belongs in Development either, but I'll move it there with a redirect in here so that other PI devs are aware of it. I'll also post a link to it in in the Custom URL Scheme thread in Library Management. That should keep all three of us happy ![]() BR |
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Deviser
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,265
Karma: 2090983
Join Date: Aug 2013
Location: Texas
Device: none
|
I would have posted the Original Post in the "Calibre Technical" subforum if there were one. Development is for "hacking on Calibre" per Chaley's https://www.mobileread.com/forums/sh...d.php?t=122042. This has nothing to do with hacking on Calibre. Non-unique Library IDs is a error in Calibre. So, perhaps it belongs in the main Calibre forum, if not the Library Management subforum. BTW, Calibre Links do not work (for me at least) when there are multiple libraries with the identical libary_id UUID, since the link points to many separate libraries. That is why I referenced your Library Management and Launchpad posts. DaltonST Last edited by DaltonST; 12-09-2020 at 09:37 AM. |
![]() |
![]() |
![]() |
#7 | |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,707
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
![]() I checked the library_id values of my 8 libraries, there are no duplicate values. I have never needed to copy a Library, they were all created via the Create/switch library dialogue. I found a 'solution' to my show-books links working/not-working. Out of frustration, at the thought of editing 1800+ link values in Manage Authors… again, I tried pasting an edited list of values into the authors.link column via SQLite Browser ![]() Not only did it work, it seems to have fixed the problem Kovid has made a couple of changes: Windows: Fix the case of library names in copied calibre:// links Make testing for calibre:// matching current db more robust Not sure what the second one is, it may relate to your issue. BR Last edited by BetterRed; 12-09-2020 at 04:25 PM. |
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
How do I find out my library_id? | Irvin | Server | 5 | 01-04-2019 01:30 AM |
Touch Normal links becomes footnotes links in epub made with Calibre | il_mix | Kobo Reader | 15 | 08-10-2014 01:19 PM |
urn:urn|uuid versus regular(?) uuid | At_Libitum | Library Management | 4 | 10-16-2013 07:47 PM |
Duplicates handling with Find Duplicates plugin | erfjr | Calibre | 0 | 03-05-2013 02:52 PM |
Calibre Duplicates | mitch13 | Calibre | 5 | 11-13-2010 06:42 AM |