Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 12-08-2020, 10:24 AM   #1
DaltonST
Deviser
DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.
 
DaltonST's Avatar
 
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)
Calibre table library_id normally has a single record with a Calibre-setup generated (theoretically unique) UUID, such as "aedee8f6-9de0-4f01-ae45-f9e82c02450e".


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.
DaltonST is offline   Reply With Quote
Old 12-08-2020, 12:28 PM   #2
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
JimmXinu's Avatar
 
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?
JimmXinu is offline   Reply With Quote
Advert
Old 12-08-2020, 12:46 PM   #3
DaltonST
Deviser
DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.
 
DaltonST's Avatar
 
Posts: 2,265
Karma: 2090983
Join Date: Aug 2013
Location: Texas
Device: none
Quote:
Originally Posted by JimmXinu View Post
I have no comment on this technical issue, but I do wonder if it should be in the Development sub-forum instead of Plugins?

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.
DaltonST is offline   Reply With Quote
Old 12-08-2020, 01:33 PM   #4
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
JimmXinu's Avatar
 
Posts: 6,951
Karma: 4604435
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
Quote:
Originally Posted by DaltonST View Post
Not at all.
... 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...
JimmXinu is offline   Reply With Quote
Old 12-08-2020, 04:18 PM   #5
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 21,707
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by DaltonST View Post
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
… and his post in…

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
BetterRed is offline   Reply With Quote
Advert
Old 12-09-2020, 09:26 AM   #6
DaltonST
Deviser
DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.
 
DaltonST's Avatar
 
Posts: 2,265
Karma: 2090983
Join Date: Aug 2013
Location: Texas
Device: none
Quote:
Originally Posted by BetterRed View Post
I'm not sure it belongs in Development either...

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.
DaltonST is offline   Reply With Quote
Old 12-09-2020, 04:12 PM   #7
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 21,707
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by DaltonST View Post
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
My initial thought was Library Management, then the main Calibre forum, but I settled on Development on the toss of a mental coin

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 Which might suggest my problem was somehow related to Manage Authors - but I can't fathom how.

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.
BetterRed is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
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


All times are GMT -4. The time now is 11:00 AM.


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