Quote:
Originally Posted by GeniusJ
Code:
# - Scan a Calibre root folder for library directories ending in " Library"
# Root folder that contains all Calibre libraries
# Each actual library is a subfolder ending in " Library"
$CalibreRoot = "R:\Jim\Dropbox\Books\Calibre"
|
This assumes the file structure
[some path]\Calibre
\[some name] library
\[some name]library
\[some name] library
etc.
And most of us have a single (or maybe two) libraries, name created when we installed Calibre. I happened to name mine "Calibre Library" but it's in a root directory - so I need to make the line
$CalibreRoot ="D:"
------------------------------------------------------
The important bits (for me) were
1) columns got deleted (because Calibre wasn't using them?)
2) Calibre Sync
does use those columns
3) here are the SQL statements to re-create them
At one point in my career (mid 80s) I was 'toolsmith' for a software development group and got to be really good at .BAT files. 40 years later I'm pretty rusty, but to the extent that they syntax is the same (exceptions are new) this looks really good.
For my own peace of mind I ran a test:
1) created c:\test
2) copied sqlite3.exe and Calibre-Fix-AllLibraries.ps1 to c:\test
3) created c:\test library
4) copied metadata.db to c:\test library
5) opened powershell
6) CD'd to c:\test
7) entered the line .\Calibre-Fix-AllLibraries.ps1 (note the ".\")
...and got "UPDATED: test library"
I copied the modified metadata.db to my calibre library folder, started Calibre and the app appears to run fine.
I copied metadata.db to the calibre library folders I have on my android tablet and phone and refresh is now working.
For anyone else looking to replicate what I did here are the lines I changed
Code:
# Path to sqlite3 command-line executable
# This must be the sqlite3.exe tool, not the DLL
$Sqlite3 = "C:\test\sqlite3.exe"
# Root folder that contains all Calibre libraries
# Each actual library is a subfolder ending in " Library"
$CalibreRoot = "C:\test"
And THANK YOU!!