Commit 471976ba authored by echel0n's avatar echel0n

Fixed issues with source updates.

parent 5b429fc1
# Changelog
- * 63dc190 - 2019-03-06: Release v9.4.82
- * 7c68ee2 - 2019-03-09: Fixed issues with source updates.
- * ee7439e - 2019-03-06: Release v9.4.82
- * 8a67674 - 2019-03-06: Release v9.4.81
- * 6de5fa5 - 2019-03-05: Release v9.4.80
- * 43baedf - 2019-03-05: Fixed saving of provider settings so that booleans are saved as integers
......
......@@ -606,7 +606,7 @@ class SourceUpdateManager(UpdateManager):
try:
# prepare the update dir
sr_update_dir = os.path.join(sickrage.PROG_DIR, 'sr-update')
sr_update_dir = os.path.join(sickrage.MAIN_DIR, 'sr-update')
if os.path.isdir(sr_update_dir):
sickrage.app.log.info("Clearing out update folder " + sr_update_dir + " before extracting")
......@@ -653,17 +653,21 @@ class SourceUpdateManager(UpdateManager):
# walk temp folder and move files to main folder
content_dir = os.path.join(sr_update_dir, update_dir_contents[0])
sickrage.app.log.info("Moving files from " + content_dir + " to " + sickrage.PROG_DIR)
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.PROG_DIR, dirname, curfile)
new_path = os.path.join(sickrage.MAIN_DIR, dirname, curfile)
if os.path.isfile(new_path) and os.path.exists(new_path):
os.remove(new_path)
shutil.move(old_path, new_path)
try:
shutil.move(old_path, new_path)
except IOError:
os.makedirs(os.path.dirname(new_path))
shutil.move(old_path, new_path)
# install requirements
if not self.install_requirements():
......
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