View Single Post
Old 02-20-2022, 11:26 PM   #2676
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: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by giddie View Post
Thanks for your work on this plugin! I manage two Kobo devices with Calibre - my own and (occasionally) my wife's. For my own, I'd like Calibre to synchronise collections, so I have a column set up for that. But I don't want to overwrite my wife's collections on her device when I connect. Is there any way to set up this kind of per-device configuration, like the Kobo Utilities plugin does?
Unfortunately no. I did look at making it device specific at some point, but, some of the dependencies makes that hard. I'll revisit this at some point, but, I don't know when.

An alternative is to use a custom column with a template for the collections. I haven't looked at this before, but there is a function "connected_device_uuid" that could be used. It takes the parameter for the storage and returns the UUID that calibre has in the "driveinfo.calibre" file from the root directory of the device.

With that you could use a template something like:

Code:
if (connected_device_uuid("main") == 'efb3184b-26e8-4017-8359-51b4168d4a92') then
 $#mm_collections
fi;
That is the UUID for my Glo and when it is plugged in, it returns the values that are in the column #mm_collections. Which is a tag-like column.

I have not tested the above for creating collections. The template works in one of my test custom columns. And as it returns a list of tags, it should work with no problems if I used that column as a collection column in the driver configuration.
davidfor is offline   Reply With Quote