mirror of
https://github.com/SickGear/SickGear.git
synced 2024-12-02 17:33:37 +00:00
Merge branch 'master' into develop
This commit is contained in:
commit
ed38709674
4 changed files with 30 additions and 3 deletions
|
@ -29,6 +29,13 @@
|
|||
|
||||
|
||||
|
||||
### 0.16.23 (2018-08-21 21:00:00 UTC)
|
||||
|
||||
* Fix detection of existing files
|
||||
* Change add sanitize 'imdbid' field in tvdb_api v2
|
||||
* Change indexer_id in imdb_info (switchIndexer)
|
||||
|
||||
|
||||
### 0.16.22 (2018-08-18 12:30:00 UTC)
|
||||
|
||||
* Change TVDB data parsing for gueststars, writers and genre
|
||||
|
|
|
@ -640,6 +640,12 @@ class Tvdb:
|
|||
v = None
|
||||
else:
|
||||
v = None
|
||||
elif 'imdbid' == k:
|
||||
if v:
|
||||
if re.search(r'^(tt)?\d{1,7}$', v, flags=re.I):
|
||||
v = self._clean_data(v)
|
||||
else:
|
||||
v = ''
|
||||
else:
|
||||
v = self._clean_data(v)
|
||||
if k in map_show:
|
||||
|
|
|
@ -180,7 +180,8 @@ class Quality:
|
|||
If no quality is achieved it will try sceneQuality regex
|
||||
"""
|
||||
|
||||
name = os.path.basename(name)
|
||||
from sickbeard import encodingKludge as ek
|
||||
name = ek.ek(os.path.basename, name)
|
||||
|
||||
# if we have our exact text then assume we put it there
|
||||
for x in sorted(Quality.qualityStrings.keys(), reverse=True):
|
||||
|
@ -201,7 +202,8 @@ class Quality:
|
|||
Return The quality from the scene episode File
|
||||
"""
|
||||
|
||||
name = os.path.basename(name)
|
||||
from sickbeard import encodingKludge as ek
|
||||
name = ek.ek(os.path.basename, name)
|
||||
|
||||
checkName = lambda quality_list, func: func([re.search(x, name, re.I) for x in quality_list])
|
||||
|
||||
|
|
|
@ -820,7 +820,7 @@ class TVShow(object):
|
|||
logger.log('Since this file was renamed, file %s was checked and quality "%s" found'
|
||||
% (file, Quality.qualityStrings[new_quality]), logger.DEBUG)
|
||||
status, quality = sickbeard.common.Quality.splitCompositeStatus(cur_ep.status)
|
||||
if Quality.UNKNOWN != new_quality or SKIPPED == status:
|
||||
if Quality.UNKNOWN != new_quality or status in (SKIPPED, UNAIRED):
|
||||
cur_ep.status = Quality.compositeStatus(DOWNLOADED, new_quality)
|
||||
|
||||
# check for status/quality changes as long as it's a new file
|
||||
|
@ -857,6 +857,16 @@ class TVShow(object):
|
|||
% (cur_ep.status, Quality.compositeStatus(new_status, new_quality)), logger.DEBUG)
|
||||
cur_ep.status = Quality.compositeStatus(new_status, new_quality)
|
||||
|
||||
elif same_file:
|
||||
status, quality = Quality.splitCompositeStatus(cur_ep.status)
|
||||
if status in (SKIPPED, UNAIRED):
|
||||
new_quality = Quality.nameQuality(file, self.is_anime)
|
||||
if Quality.UNKNOWN == new_quality:
|
||||
new_quality = Quality.fileQuality(file)
|
||||
logger.log('Since this file has status: "%s", file %s was checked and quality "%s" found'
|
||||
% (statusStrings[status], file, Quality.qualityStrings[new_quality]), logger.DEBUG)
|
||||
cur_ep.status = Quality.compositeStatus(DOWNLOADED, new_quality)
|
||||
|
||||
with cur_ep.lock:
|
||||
result = cur_ep.get_sql()
|
||||
if None is not result:
|
||||
|
@ -1371,6 +1381,8 @@ class TVShow(object):
|
|||
self.ids[old_indexer]['status'] = MapStatus.NONE
|
||||
self.ids[self.indexer]['status'] = MapStatus.SOURCE
|
||||
self.ids[self.indexer]['id'] = self.indexerid
|
||||
if isinstance(self.imdb_info, dict):
|
||||
self.imdb_info['indexer_id'] = self.indexerid
|
||||
save_mapping(self)
|
||||
name_cache.remove_from_namecache(old_indexerid)
|
||||
|
||||
|
|
Loading…
Reference in a new issue