mirror of
https://github.com/moparisthebest/SickRage
synced 2024-08-13 16:53:54 -04:00
commit
e57fa4d585
@ -101,15 +101,12 @@ class ShowContainer(dict):
|
||||
|
||||
#keep only the 100th latest results
|
||||
if time.time() - self._lastgc > 20:
|
||||
tbd = self._stack[:-100]
|
||||
i = 0
|
||||
for o in tbd:
|
||||
for o in self._stack[:-100]:
|
||||
del self[o]
|
||||
del self._stack[i]
|
||||
i += 1
|
||||
|
||||
_lastgc = time.time()
|
||||
del tbd
|
||||
self._stack = self._stack[-100:]
|
||||
|
||||
self._lastgc = time.time()
|
||||
|
||||
super(ShowContainer, self).__setitem__(key, value)
|
||||
|
||||
|
@ -1164,8 +1164,12 @@ def mapIndexersToShow(showObj):
|
||||
|
||||
# for each mapped entry
|
||||
for curResult in sqlResults:
|
||||
nlist = [i for i in curResult if i is not None]
|
||||
# Check if its mapped with both tvdb and tvrage.
|
||||
if len(nlist) >= 4:
|
||||
logger.log(u"Found indexer mapping in cache for show: " + showObj.name, logger.DEBUG)
|
||||
mapped[int(curResult['mindexer'])] = int(curResult['mindexer_id'])
|
||||
return mapped
|
||||
else:
|
||||
sql_l = []
|
||||
for indexer in sickbeard.indexerApi().indexers:
|
||||
|
Loading…
Reference in New Issue
Block a user