mirror of
https://github.com/moparisthebest/SickRage
synced 2024-12-12 11:02:21 -05:00
Provider DB connections remain open instead of constantly open/close for misc db calls.
This commit is contained in:
parent
267affa5e9
commit
423c09fd9e
@ -74,10 +74,15 @@ class TVCache():
|
||||
|
||||
self.provider = provider
|
||||
self.providerID = self.provider.getID()
|
||||
self.providerDB = None
|
||||
self.minTime = 10
|
||||
|
||||
def _getDB(self):
|
||||
return CacheDBConnection(self.providerID)
|
||||
# init provider database if not done already
|
||||
if not self.providerDB:
|
||||
self.providerDB = CacheDBConnection(self.providerID)
|
||||
|
||||
return self.providerDB
|
||||
|
||||
def _clearCache(self):
|
||||
if self.shouldClearCache():
|
||||
|
Loading…
Reference in New Issue
Block a user