View Single Post
Old 04-30-2017, 02:40 AM   #113
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 installed JS to clean out the preferences for PI's I have uninstalled and no longer use. I ran the feature on all my libraries. As a result I then had a __jspref (I think that was the name) table in every database.

Is there some way to remove the JS data from a database when/after it's been un-installed, other than via a 3rd party utility.

BR
BR:

I wanted to do that automatically when JS is uninstalled, but the API does not (yet?) have an "on_permanent_uninstall" function that can be overridden in ui.py to do things such as that.

In the meantime, try this as a .bat file:

Code:
calibre-debug -c "import sqlite3;conn = sqlite3.connect('X:\MyLibraryName\metadata.db');c = conn.cursor();c.execute('DROP TABLE IF EXISTS __js_settings');conn.commit();conn.close()"

I have used the above while testing JS, so it works for me on Windows 10. I saved the .bat file as an ASCII text file, not UTF-8.


DaltonST
DaltonST is offline   Reply With Quote