mirror of
https://github.com/SickGear/SickGear.git
synced 2025-01-05 17:43:37 +00:00
Merge branch 'master' into develop
This commit is contained in:
commit
a9da4c2486
7 changed files with 21 additions and 3 deletions
|
@ -6,6 +6,11 @@
|
|||
* Fix restore table row colours on the Manage/Episode Status Management page
|
||||
|
||||
|
||||
### 0.8.3 (2015-04-25 08:48:00 UTC)
|
||||
|
||||
* Fix clearing of the provider cache
|
||||
|
||||
|
||||
### 0.8.2 (2015-04-19 06:45:00 UTC)
|
||||
|
||||
* Fix IPTorrents provider search strings and URL for new site changes
|
||||
|
|
|
@ -1439,3 +1439,10 @@ def check_port(host, port, timeout=1.0):
|
|||
except socket.error:
|
||||
if s:
|
||||
s.close()
|
||||
|
||||
def clear_unused_providers():
|
||||
providers = [x.cache.providerID for x in sickbeard.providers.sortedProviderList() if x.isActive()]
|
||||
|
||||
if providers:
|
||||
myDB = db.DBConnection('cache.db')
|
||||
myDB.action('DELETE FROM provider_cache WHERE provider NOT IN (%s)' % ','.join(['?'] * len(providers)), providers)
|
|
@ -420,11 +420,11 @@ class NewznabCache(tvcache.TVCache):
|
|||
if not data:
|
||||
return []
|
||||
|
||||
self.setLastUpdate()
|
||||
|
||||
# clear cache
|
||||
self._clearCache()
|
||||
|
||||
self.setLastUpdate()
|
||||
|
||||
if self._checkAuth(data):
|
||||
items = data.entries
|
||||
cl = []
|
||||
|
|
|
@ -462,7 +462,7 @@ def searchProviders(show, episodes, manualSearch=False):
|
|||
logger.log(u"Performing season pack search for " + show.name)
|
||||
|
||||
try:
|
||||
curProvider.cache.updateCache()
|
||||
curProvider.cache._clearCache()
|
||||
searchResults = curProvider.findSearchResults(show, episodes, search_mode, manualSearch)
|
||||
except exceptions.AuthException, e:
|
||||
logger.log(u"Authentication error: " + ex(e), logger.ERROR)
|
||||
|
|
|
@ -44,6 +44,9 @@ class ShowUpdater():
|
|||
if sickbeard.USE_FAILED_DOWNLOADS:
|
||||
failed_history.trimHistory()
|
||||
|
||||
# clear the data of unused providers
|
||||
sickbeard.helpers.clear_unused_providers()
|
||||
|
||||
logger.log(u"Doing full update on all shows")
|
||||
|
||||
# clean out cache directory, remove everything > 12 hours old
|
||||
|
|
|
@ -284,6 +284,7 @@ class TVCache():
|
|||
sqlResults = list(itertools.chain(*sqlResults))
|
||||
|
||||
if not sqlResults:
|
||||
self.setLastSearch()
|
||||
return neededEps
|
||||
|
||||
# for each cache entry
|
||||
|
|
|
@ -4263,6 +4263,8 @@ class ConfigProviders(Config):
|
|||
sickbeard.NEWZNAB_DATA = '!!!'.join([x.configStr() for x in sickbeard.newznabProviderList])
|
||||
sickbeard.PROVIDER_ORDER = provider_list
|
||||
|
||||
helpers.clear_unused_providers()
|
||||
|
||||
sickbeard.save_config()
|
||||
|
||||
if len(results) > 0:
|
||||
|
|
Loading…
Reference in a new issue