Commit ffa69b51 authored by echel0n's avatar echel0n

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.
parent 2f89453a
# Changelog # Changelog
- * 7dd9d9b - 2019-02-23: Pre-Release v9.4.69.dev1 - * eb10a43 - 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. - * 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 - * c3441ed - 2019-02-23: Release v9.4.68
- * 3f6df12 - 2019-02-23: Release v9.4.67 - * 3f6df12 - 2019-02-23: Release v9.4.67
......
...@@ -98,9 +98,9 @@ class BacklogSearcher(object): ...@@ -98,9 +98,9 @@ class BacklogSearcher(object):
self._last_backlog_search = self._get_last_backlog_search(curShow.indexerid) self._last_backlog_search = self._get_last_backlog_search(curShow.indexerid)
segments = self._get_segments(curShow, from_date) segments = self._get_segments(curShow, from_date)
sickrage.app.search_queue.put(BacklogQueueItem(curShow, segments)) 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)) 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 # don't consider this an actual backlog search if we only did recent eps
......
...@@ -56,9 +56,9 @@ class DailySearcher(object): ...@@ -56,9 +56,9 @@ class DailySearcher(object):
continue continue
segments = self._get_segments(curShow, datetime.date.today()) segments = self._get_segments(curShow, datetime.date.today())
sickrage.app.search_queue.put(DailySearchQueueItem(curShow, segments)) 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)) sickrage.app.log.debug("Nothing needs to be downloaded for {}, skipping".format(curShow.name))
self.amActive = False self.amActive = False
......
...@@ -650,18 +650,10 @@ class SourceUpdateManager(UpdateManager): ...@@ -650,18 +650,10 @@ class SourceUpdateManager(UpdateManager):
sickrage.app.log.warning("Invalid update data, update failed: " + str(update_dir_contents)) sickrage.app.log.warning("Invalid update data, update failed: " + str(update_dir_contents))
return False 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]) 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) sickrage.app.log.info("Moving folder " + content_dir + " to " + sickrage.MAIN_DIR)
for dirname, __, filenames in os.walk(content_dir): shutil.move(content_dir, sickrage.MAIN_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)
# install requirements # install requirements
if not self.install_requirements(): if not self.install_requirements():
......
...@@ -1975,7 +1975,7 @@ class CMD_ShowAddNew(ApiCall): ...@@ -1975,7 +1975,7 @@ class CMD_ShowAddNew(ApiCall):
"desc": "True if episodes should be archived when first match is downloaded, False otherwise" "desc": "True if episodes should be archived when first match is downloaded, False otherwise"
}, },
"add_show_year": { "add_show_year": {
"desc": "True if show year should be appended to show folder, False otherwise" "desc": "True if show year should be appended to show folder name, False otherwise"
}, },
} }
} }
......
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