mirror of
https://github.com/SickGear/SickGear.git
synced 2025-01-20 16:43:43 +00:00
Merge pull request #533 from JackDandy/feature/FixAddExistingAndPP
Fix add existing shows from folders that contain a plus char and post…
This commit is contained in:
commit
3455f73b5d
6 changed files with 20 additions and 12 deletions
|
@ -47,6 +47,8 @@
|
|||
* Update py-unrar2 library 99.3 to 99.6 (2fe1e98)
|
||||
* Fix py-unrar2 on unix to handle different date formats output by different unrar command line versions
|
||||
* Fix Add and Edit show quality selection when Quality 'Custom' is used
|
||||
* Fix add existing shows from folders that contain a plus char
|
||||
* Fix post process issue where items in history was processed out of turn
|
||||
|
||||
[develop changelog]
|
||||
Enable Alpha Ratio again now that the secure login page over https is fixed
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<span class="component-title input">Quality</span>
|
||||
<span class="component-desc">
|
||||
#set $selected = None
|
||||
<select id="qualityPreset" class="form-control form-control-inline input-sm">
|
||||
<select id="qualityPreset" name="quality_preset" class="form-control form-control-inline input-sm">
|
||||
<option value="0">Custom</option>
|
||||
#for $curPreset in sorted($qualityPresets):
|
||||
<option value="$curPreset" #if $curPreset == $overall_quality then "selected=\"selected\"" else ""# #if $qualityPresetStrings[$curPreset].endswith("0p") then "style=\"padding-left: 15px;\"" else ""#>$qualityPresetStrings[$curPreset]</option>
|
||||
|
|
|
@ -60,7 +60,7 @@
|
|||
</select>
|
||||
</div><br />
|
||||
|
||||
<div id="customQuality">
|
||||
<div id="customQuality" class="show-if-quality-custom">
|
||||
<div class="manageCustom pull-left">
|
||||
<h4 style="font-size:14px">Initial</h4>
|
||||
#set $anyQualityList = filter(lambda x: x > $common.Quality.NONE, $common.Quality.qualityStrings)
|
||||
|
|
|
@ -730,8 +730,7 @@ class PostProcessor(object):
|
|||
"""
|
||||
|
||||
# if SickGear snatched this then assume it's safe
|
||||
if ep_obj.status in common.Quality.SNATCHED + common.Quality.SNATCHED_PROPER\
|
||||
+ common.Quality.SNATCHED_BEST or self.in_history:
|
||||
if ep_obj.status in common.Quality.SNATCHED + common.Quality.SNATCHED_PROPER + common.Quality.SNATCHED_BEST:
|
||||
self._log(u'SickGear snatched this episode, marking it safe to replace', logger.DEBUG)
|
||||
return True
|
||||
|
||||
|
@ -807,6 +806,10 @@ class PostProcessor(object):
|
|||
self._log(u'Marking it unsafe to replace the episode that already exists in database with a file of lower quality', logger.DEBUG)
|
||||
return False
|
||||
|
||||
if self.in_history:
|
||||
self._log(u'SickGear snatched this episode, marking it safe to replace', logger.DEBUG)
|
||||
return True
|
||||
|
||||
# None of the conditions were met, marking it unsafe to replace
|
||||
self._log(u'Marking it unsafe to replace because no positive condition is met, you may force replace but it would be better to examine the files', logger.DEBUG)
|
||||
return False
|
||||
|
|
|
@ -448,7 +448,7 @@ class ProcessTVShow(object):
|
|||
my_db = db.DBConnection()
|
||||
sql_result = my_db.select('SELECT * FROM tv_episodes WHERE release_name = ?', [dir_name])
|
||||
if sql_result:
|
||||
self._log_helper(u'Found a release directory%s that has already been processed,<br />.. skipping: %s'
|
||||
self._log_helper(u'Found a release directory %s that has already been processed,<br />.. skipping: %s'
|
||||
% (showlink, dir_name))
|
||||
if ep_detail_sql:
|
||||
reset_status(parse_result.show.indexerid,
|
||||
|
@ -463,7 +463,7 @@ class ProcessTVShow(object):
|
|||
|
||||
sql_result = my_db.select('SELECT * FROM tv_episodes WHERE release_name = ?', [videofile.rpartition('.')[0]])
|
||||
if sql_result:
|
||||
self._log_helper(u'Found a video, but that release%s was already processed,<br />.. skipping: %s'
|
||||
self._log_helper(u'Found a video, but that release %s was already processed,<br />.. skipping: %s'
|
||||
% (showlink, videofile))
|
||||
if ep_detail_sql:
|
||||
reset_status(parse_result.show.indexerid,
|
||||
|
@ -481,7 +481,7 @@ class ProcessTVShow(object):
|
|||
|
||||
sql_result = my_db.select(search_sql, [u'%' + videofile])
|
||||
if sql_result:
|
||||
self._log_helper(u'Found a video, but the episode%s is already processed,<br />.. skipping: %s'
|
||||
self._log_helper(u'Found a video, but the episode %s is already processed,<br />.. skipping: %s'
|
||||
% (showlink, videofile))
|
||||
if ep_detail_sql:
|
||||
reset_status(parse_result.show.indexerid,
|
||||
|
|
|
@ -1218,7 +1218,7 @@ class Home(MainHandler):
|
|||
flatten_folders=None, paused=None, directCall=False, air_by_date=None, sports=None, dvdorder=None,
|
||||
indexerLang=None, subtitles=None, archive_firstmatch=None, rls_ignore_words=None,
|
||||
rls_require_words=None, anime=None, blacklist=None, whitelist=None,
|
||||
scene=None, tag=None):
|
||||
scene=None, tag=None, quality_preset=None):
|
||||
|
||||
if show is None:
|
||||
errString = 'Invalid show ID: ' + str(show)
|
||||
|
@ -1238,6 +1238,9 @@ class Home(MainHandler):
|
|||
|
||||
showObj.exceptions = scene_exceptions.get_scene_exceptions(showObj.indexerid)
|
||||
|
||||
if None is not quality_preset and int(quality_preset):
|
||||
bestQualities = []
|
||||
|
||||
if not location and not anyQualities and not bestQualities and not flatten_folders:
|
||||
t = PageTemplate(headers=self.request.headers, file='editShow.tmpl')
|
||||
t.submenu = self.HomeMenu()
|
||||
|
@ -2305,7 +2308,7 @@ class NewHomeAddShows(Home):
|
|||
return self.newShow('|'.join(['', '', indexer_id, showName]), use_show_name=True)
|
||||
|
||||
def addNewShow(self, whichSeries=None, indexerLang='en', rootDir=None, defaultStatus=None,
|
||||
anyQualities=None, bestQualities=None, flatten_folders=None, subtitles=None,
|
||||
quality_preset=None, anyQualities=None, bestQualities=None, flatten_folders=None, subtitles=None,
|
||||
fullShowPath=None, other_shows=None, skipShow=None, providedIndexer=None, anime=None,
|
||||
scene=None, blacklist=None, whitelist=None, wanted_begin=None, wanted_latest=None, tag=None):
|
||||
"""
|
||||
|
@ -2398,7 +2401,7 @@ class NewHomeAddShows(Home):
|
|||
|
||||
if not anyQualities:
|
||||
anyQualities = []
|
||||
if not bestQualities:
|
||||
if not bestQualities or int(quality_preset):
|
||||
bestQualities = []
|
||||
if type(anyQualities) != list:
|
||||
anyQualities = [anyQualities]
|
||||
|
@ -2445,8 +2448,6 @@ class NewHomeAddShows(Home):
|
|||
elif type(shows_to_add) != list:
|
||||
shows_to_add = [shows_to_add]
|
||||
|
||||
shows_to_add = [urllib.unquote_plus(x) for x in shows_to_add]
|
||||
|
||||
promptForSettings = config.checkbox_to_value(promptForSettings)
|
||||
|
||||
indexer_id_given = []
|
||||
|
@ -3010,6 +3011,8 @@ class Manage(MainHandler):
|
|||
|
||||
if quality_preset == 'keep':
|
||||
anyQualities, bestQualities = Quality.splitQuality(showObj.quality)
|
||||
elif int(quality_preset):
|
||||
bestQualities = []
|
||||
|
||||
exceptions_list = []
|
||||
|
||||
|
|
Loading…
Reference in a new issue