Commit 11fe489c authored by echel0n's avatar echel0n

Merge branch 'release/9.4.69'

parents 0b9f7c7f 502eb016
# Changelog
- * 7be7535 - 2019-02-23: Release v9.4.68
- * 9b3bf61 - 2019-02-23: Release v9.4.69
- * ffa69b5 - 2019-02-23: Don't attempt daily or backlog searches if nothing to search for. Version updater now moves entire folder at once instead of walking it for source updates.
- * 2f89453 - 2019-02-23: Pre-Release v9.4.69.dev1
- * 8324c57 - 2019-02-23: Added new release mapping %SY to allow appending the show year to episodes. Added new show option to append show year to show folder if needed. Added check for existing show year in show name, if found, do not append show year.
- * c3441ed - 2019-02-23: Release v9.4.68
- * 3f6df12 - 2019-02-23: Release v9.4.67
- * 83d1b88 - 2019-02-23: Moved RSS cache updates to separate background task that executes every 15 minutes. Parsed search results no longer grab their show id's from TheTVDB or Trackt since we only care about shows existing in library. Search results returned for shows not existing in library are discarded.
- * 9c78d0b - 2019-02-23: Release v9.4.66
......
......@@ -25,6 +25,7 @@ class Show(object):
self.genre = "Comedy"
self.indexerid = 00001
self.air_by_date = 0
self.startyear = 2011
self.sports = 0
self.anime = 0
self.scene = 0
......
......@@ -98,9 +98,9 @@ class BacklogSearcher(object):
self._last_backlog_search = self._get_last_backlog_search(curShow.indexerid)
segments = self._get_segments(curShow, from_date)
if segments:
sickrage.app.search_queue.put(BacklogQueueItem(curShow, segments))
if not segments:
else:
sickrage.app.log.debug("Nothing needs to be downloaded for {}, skipping".format(curShow.name))
# don't consider this an actual backlog search if we only did recent eps
......
......@@ -56,9 +56,9 @@ class DailySearcher(object):
continue
segments = self._get_segments(curShow, datetime.date.today())
if segments:
sickrage.app.search_queue.put(DailySearchQueueItem(curShow, segments))
if not segments:
else:
sickrage.app.log.debug("Nothing needs to be downloaded for {}, skipping".format(curShow.name))
self.amActive = False
......
......@@ -1120,6 +1120,7 @@ class TVEpisode(object):
'%SQN': Quality.sceneQualityStrings[epQual] + encoder,
'%SQ.N': dot(Quality.sceneQualityStrings[epQual] + encoder),
'%SQ_N': us(Quality.sceneQualityStrings[epQual] + encoder),
'%SY': str(self.show.startyear),
'%S': str(self.season),
'%0S': '%02d' % self.season,
'%E': str(self.episode),
......@@ -1223,7 +1224,7 @@ class TVEpisode(object):
season_ep_regex = r'''
(?P<pre_sep>[ _.-]*)
((?:s(?:eason|eries)?\s*)?%0?S(?![._]?N))
((?:s(?:eason|eries)?\s*)?%0?S(?![._]?N|Y))
(.*?)
(%0?E(?![._]?N))
(?P<post_sep>[ _.-]*)
......@@ -1273,8 +1274,7 @@ class TVEpisode(object):
# for limited extend we only append the last ep
if multi in (NAMING_LIMITED_EXTEND, NAMING_LIMITED_EXTEND_E_PREFIXED) and other_ep != \
self.relatedEps[
-1]:
self.relatedEps[-1]:
continue
elif multi == NAMING_DUPLICATE:
......@@ -1300,8 +1300,7 @@ class TVEpisode(object):
if self.season != 0: # dont set absolute numbers if we are on specials !
if anime_type == 1: # this crazy person wants both ! (note: +=)
ep_string += sep + "%(#)03d" % {
"#": curAbsolute_number}
ep_string += sep + "%(#)03d" % {"#": curAbsolute_number}
elif anime_type == 2: # total anime freak only need the absolute number ! (note: =)
ep_string = "%(#)03d" % {"#": curAbsolute_number}
......
......@@ -650,18 +650,10 @@ class SourceUpdateManager(UpdateManager):
sickrage.app.log.warning("Invalid update data, update failed: " + str(update_dir_contents))
return False
# walk temp folder and move files to main folder
# move update folder to main app folder
content_dir = os.path.join(sr_update_dir, update_dir_contents[0])
sickrage.app.log.info("Moving files from " + content_dir + " to " + sickrage.MAIN_DIR)
for dirname, __, filenames in os.walk(content_dir):
dirname = dirname[len(content_dir) + 1:]
for curfile in filenames:
old_path = os.path.join(content_dir, dirname, curfile)
new_path = os.path.join(sickrage.MAIN_DIR, dirname, curfile)
if os.path.isfile(new_path):
os.remove(new_path)
shutil.move(old_path, new_path)
sickrage.app.log.info("Moving folder " + content_dir + " to " + sickrage.MAIN_DIR)
shutil.move(content_dir, sickrage.MAIN_DIR)
# install requirements
if not self.install_requirements():
......
This diff is collapsed.
......@@ -2612,7 +2612,7 @@ class HomeAddShows(Home):
quality_preset=None, anyQualities=None, bestQualities=None, flatten_folders=None, subtitles=None,
subtitles_sr_metadata=None, fullShowPath=None, other_shows=None, skipShow=None, providedIndexer=None,
anime=None, scene=None, blacklist=None, whitelist=None, defaultStatusAfter=None,
skip_downloaded=None, providedName=None):
skip_downloaded=None, providedName=None, add_show_year=None):
"""
Receive tvdb id, dir, and other options and create a show from them. If extra show dirs are
provided then it forwards back to newShow, if not it goes to /home.
......@@ -2672,6 +2672,8 @@ class HomeAddShows(Home):
show_dir = os.path.normpath(fullShowPath)
else:
show_dir = os.path.join(rootDir, sanitizeFileName(show_name))
if add_show_year and not re.match(r'.*\(\d+\)$', show_dir):
show_dir = "{} ({})".format(show_dir, re.search(r'\d{4}', series_pieces[5]).group(0))
# blanket policy - if the dir exists you should have used "add existing show" numbnuts
if os.path.isdir(show_dir) and not fullShowPath:
......
......@@ -54,7 +54,7 @@
</div>
<div class="row field-pair">
<div class="col-lg-3 col-md-4 col-sm-5">
<label class="component-title">${_('Skip downloaded')}</label>
<label class="component-title">${_('Skip Downloaded')}</label>
</div>
<div class="col-lg-9 col-md-8 col-sm-7 component-desc">
<label>
......@@ -63,6 +63,17 @@
</label>
</div>
</div>
<div class="row field-pair">
<div class="col-lg-3 col-md-4 col-sm-5">
<label class="component-title">${_('Append Show Year to Show Folder')}</label>
</div>
<div class="col-lg-9 col-md-8 col-sm-7 component-desc">
<label>
<input type="checkbox" class="toggle color-primary is-material" name="add_show_year"
id="add_show_year" />
</label>
</div>
</div>
<div class="row field-pair">
<div class="col-lg-3 col-md-4 col-sm-5">
<label class="component-title">${_('Status for previously aired episodes')}</label>
......
This diff is collapsed.
9.4.68
\ No newline at end of file
9.4.69
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment