Mobileread
Calibre Portable and Libraries
#11  DoctorOhh 12-15-2010, 05:11 AM
Quote chaley
Do you use a batch file to set the CALIBRE_CONFIG_DIRECTORY environment variable, or do you have it hard-wired into your windows environment?
Currently I only use the batch file to set the config directory and start calibre.

Quote chaley
I set the env var in a batch file, but do not use --with-library there. I have no trouble switching libraries.
With just the config set in the batch file I have no problem switching libraries either.

Previously I was setting these three variables

CALIBRE_CONFIG_DIRECTORY
CALIBRE_LIBRARY_DIRECTORY
CALIBRE_OVERRIDE_DATABASE_PATH

and this was when I experienced trouble. Wallowing in my ignorance I assumed it was a Windows problem. I figured someone that cared more than I did would come forward. Since it has been months with no report I figured it was just me.

I'm happy with just using the variable for the config directory, but thought I would speak up and let the OP know that he isn't alone.
Reply 

#12  chaley 12-15-2010, 05:21 AM
Quote dwanthny
Previously I was setting these three variables

CALIBRE_CONFIG_DIRECTORY
CALIBRE_LIBRARY_DIRECTORY
CALIBRE_OVERRIDE_DATABASE_PATH

and this was when I experienced trouble. Wallowing in my ignorance I assumed it was a Windows problem. I figured someone that cared more than I did would come forward. Since it has been months with no report I figured it was just me.
Ahhh, I forgot about CALIBRE_OVERRIDE_DATABASE_PATH.

Looking at the code, setting CALIBRE_OVERRIDE_DATABASE_PATH will totally break multi-library operations. It will *always* use the same database, no matter what library folder hierarchy is being used. For example, copy to library will copy to the other folder hierarchy but update the current database. Not good.

I think that change library (and copy to library) should be disabled when CALIBRE_OVERRIDE_DATABASE_PATH is used, and will submit code to do just that.
Reply 

#13  DoctorOhh 12-15-2010, 05:39 AM
Quote chaley
I think that change library (and copy to library) should be disabled when CALIBRE_OVERRIDE_DATABASE_PATH is used, and will submit code to do just that.
Good idea and with the restriction, if applicable, maybe a updated blurb on this page explaining the limitation.
Reply 

#14  itimpi 12-15-2010, 07:16 AM
I will have a look a the batch file, and if the CALIBRE_LIBRARY_PATH and CALIBRE_OVERRIDE_DATABASE_PATH are pointing to the same location (which I guess will be the case for the vast majority of users) avoid setting the CALIBRE_OVERRIDE_DATABASE_PATH at all. This will mean that the additional check chaley mentions above will not affect most users.
Reply 

 « First  « Prev   (2/2)
Today's Posts | Search this Thread | Login | Register