Skip to content

Commit 24730b3

Browse files
committed
🚑 Hotfix
1 parent cc8e9a5 commit 24730b3

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

addon.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2-
<addon id="script.module.jurialmunkey" name="jurialmunkey common" provider-name="jurialmunkey" version="0.2.15">
2+
<addon id="script.module.jurialmunkey" name="jurialmunkey common" provider-name="jurialmunkey" version="0.2.16">
33
<requires>
44
<import addon="xbmc.python" version="3.0.1"/>
55
<import addon="script.module.requests" version="2.9.1"/>

resources/modules/jurialmunkey/scache.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ class SimpleCache(object):
4040
_db_timeout = 3.0
4141
_db_read_timeout = 1.0
4242
_queue_limit = 100
43-
_connections = []
4443

4544
def __init__(self, folder=None, filename=None):
4645
'''Initialize our caching class'''
@@ -97,9 +96,6 @@ def close(self):
9796
while self._busy_tasks and not self.monitor.abortRequested():
9897
self.monitor.waitForAbort(0.25)
9998

100-
for con in self._connections:
101-
con.close()
102-
10399
self.kodi_log(f'CACHE: Closed {self._sc_name}', 2)
104100

105101
def __del__(self):
@@ -354,7 +350,7 @@ def _get_database(self, read_only=False):
354350
'''get reference to our sqllite _database - performs basic integrity check'''
355351
timeout = self._db_read_timeout if read_only else self._db_timeout
356352
try:
357-
connection = sqlite3.connect(self._db_file, timeout=timeout, isolation_level=None, check_same_thread=False)
353+
connection = sqlite3.connect(self._db_file, timeout=timeout, isolation_level=None)
358354
connection.execute('SELECT * FROM simplecache LIMIT 1')
359355
return self._set_pragmas(connection)
360356
except Exception as error:
@@ -378,7 +374,6 @@ def database_execute(database):
378374
# always use new db object because we need to be sure that data is available for other simplecache instances
379375
try:
380376
with self._get_database(read_only=read_only) as database:
381-
self._connections.append(database)
382377
return database_execute(database)
383378

384379
except Exception as database_exception:

0 commit comments

Comments
 (0)