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
|
#keep only the 100th latest results
|
||||||
if time.time() - self._lastgc > 20:
|
if time.time() - self._lastgc > 20:
|
||||||
tbd = self._stack[:-100]
|
for o in self._stack[:-100]:
|
||||||
i = 0
|
|
||||||
for o in tbd:
|
|
||||||
del self[o]
|
del self[o]
|
||||||
del self._stack[i]
|
|
||||||
i += 1
|
|
||||||
|
|
||||||
_lastgc = time.time()
|
self._stack = self._stack[-100:]
|
||||||
del tbd
|
|
||||||
|
self._lastgc = time.time()
|
||||||
|
|
||||||
super(ShowContainer, self).__setitem__(key, value)
|
super(ShowContainer, self).__setitem__(key, value)
|
||||||
|
|
||||||
|
@ -1164,8 +1164,12 @@ def mapIndexersToShow(showObj):
|
|||||||
|
|
||||||
# for each mapped entry
|
# for each mapped entry
|
||||||
for curResult in sqlResults:
|
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)
|
logger.log(u"Found indexer mapping in cache for show: " + showObj.name, logger.DEBUG)
|
||||||
mapped[int(curResult['mindexer'])] = int(curResult['mindexer_id'])
|
mapped[int(curResult['mindexer'])] = int(curResult['mindexer_id'])
|
||||||
|
return mapped
|
||||||
else:
|
else:
|
||||||
sql_l = []
|
sql_l = []
|
||||||
for indexer in sickbeard.indexerApi().indexers:
|
for indexer in sickbeard.indexerApi().indexers:
|
||||||
|
Loading…
Reference in New Issue
Block a user