0

My add-on deletes thumbnails. It would be easier to delete Textures13.db and restart Kodi but I want it without restarting for service purposes. With Kodi 20 editing the SQLite database works, but only restarting makes it read the database again to repopulate thumbnails. This used to work on previous versions.

Kodi has a function to update add-ons database but I can’t find an equivalent to textures13.db. Removing VACUUM doesn’t change the behavior:

def clearTextures13DB():
    import sqlite3
    import csv

    db = xbmcvfs.translatePath('special://database/Textures13.db')
    conn = sqlite3.connect(db)
    cur = conn.cursor()

    cur.execute("DELETE FROM texture;")
    cur.execute("DELETE FROM path;")
    cur.execute("DELETE FROM sizes;")

    conn.commit()
    cur.execute("VACUUM;")
    conn.close()

The thumbnails are also deleted with another command. This works but Kodi doesn't recognize the changes until restart.

0 Answers0