Fix OperationalError: Database is locked and heavily speed up sync

This commit is contained in:
croneter 2018-11-03 18:40:11 +01:00
parent 9c3c8b0d35
commit 8bffc5a30f

View file

@ -474,7 +474,9 @@ def kodi_sql(media_type=None):
db_path = v.DB_TEXTURE_PATH db_path = v.DB_TEXTURE_PATH
else: else:
db_path = v.DB_VIDEO_PATH db_path = v.DB_VIDEO_PATH
return connect(db_path, timeout=60.0) conn = connect(db_path, timeout=5.0)
conn.execute('PRAGMA journal_mode=WAL')
return conn
def create_actor_db_index(): def create_actor_db_index():