Commit eca1d42f authored by echel0n's avatar echel0n
Browse files

Refactored naming convention of misc helper functions.

Added ability to disable stripping of special permissions from files.
parent 63f98ef0
# Changelog
- * fec82ca - 2018-11-11: Cleaned up subtitles code.
- * 23957a3 - 2018-11-11: Refactored naming convention of misc helper functions. Added ability to disable stripping of special permissions from files.
- * 63f98ef - 2018-11-11: Cleaned up subtitles code.
- * 1558dce - 2018-11-10: Fixed issue with displaying language flags in views
- * 0173a0f - 2018-11-10: Release v9.4.28
- * c5ea143 - 2018-11-10: Release v9.4.27
......
......@@ -204,14 +204,14 @@ class Core(object):
# migrate old database file names to new ones
if os.path.isfile(os.path.abspath(os.path.join(self.data_dir, 'sickbeard.db'))):
if os.path.isfile(os.path.join(self.data_dir, 'sickrage.db')):
helpers.moveFile(os.path.join(self.data_dir, 'sickrage.db'),
os.path.join(self.data_dir, '{}.bak-{}'
helpers.move_file(os.path.join(self.data_dir, 'sickrage.db'),
os.path.join(self.data_dir, '{}.bak-{}'
.format('sickrage.db',
datetime.datetime.now().strftime(
'%Y%m%d_%H%M%S'))))
helpers.moveFile(os.path.abspath(os.path.join(self.data_dir, 'sickbeard.db')),
os.path.abspath(os.path.join(self.data_dir, 'sickrage.db')))
helpers.move_file(os.path.abspath(os.path.join(self.data_dir, 'sickbeard.db')),
os.path.abspath(os.path.join(self.data_dir, 'sickrage.db')))
# load config
self.config.load()
......
......@@ -28,7 +28,7 @@ from hachoir_metadata import extractMetadata
from hachoir_parser import guessParser
import sickrage
from sickrage.core.helpers import copyFile
from sickrage.core.helpers import copy_file
from sickrage.metadata import GenericMetadata
......@@ -226,7 +226,7 @@ class ImageCache(object):
os.makedirs(self._thumbnails_dir())
sickrage.app.log.info("Copying from " + image_path + " to " + dest_path)
copyFile(image_path, dest_path)
copy_file(image_path, dest_path)
return True
......
......@@ -433,6 +433,7 @@ class Config(object):
self.calendar_icons = False
self.no_restart = False
self.allowed_video_file_exts = []
self.strip_special_file_bits = False
self.thetvdb_apitoken = ""
self.trakt_api_key = '5c65f55e11d48c35385d9e8670615763a605fad28374c8ae553a7b7a50651ddd'
self.trakt_api_secret = 'b53e32045ac122a445ef163e6d859403301ffe9b17fb8321d428531b69022a82'
......@@ -830,7 +831,8 @@ class Config(object):
'keep_processed_dir': True,
'processor_follow_symlinks': False,
'allowed_extensions': 'srt,nfo,srr,sfv',
'view_changelog': False
'view_changelog': False,
'strip_special_file_bits': True
},
'NZBget': {
'nzbget_host': '',
......@@ -1517,6 +1519,7 @@ class Config(object):
self.random_user_agent = self.check_setting_bool('General', 'random_user_agent')
self.allowed_extensions = self.check_setting_str('General', 'allowed_extensions')
self.view_changelog = self.check_setting_bool('General', 'view_changelog')
self.strip_special_file_bits = self.check_setting_bool('General', 'strip_special_file_bits')
# GUI SETTINGS
self.gui_lang = self.check_setting_str('GUI', 'gui_lang')
......@@ -2018,7 +2021,8 @@ class Config(object):
'processor_follow_symlinks': int(self.processor_follow_symlinks),
'delete_non_associated_files': int(self.delete_non_associated_files),
'allowed_extensions': self.allowed_extensions,
'view_changelog': int(self.view_changelog)
'view_changelog': int(self.view_changelog),
'strip_special_file_bits': int(self.strip_special_file_bits)
},
'GUI': {
'gui_lang': self.gui_lang,
......
......@@ -21,6 +21,7 @@ from __future__ import unicode_literals
import base64
import ctypes
import datetime
import errno
import io
import os
import platform
......@@ -435,39 +436,42 @@ def list_media_files(path):
return files
def copyFile(srcFile, destFile):
def copy_file(src_file, dest_file):
"""
Copy a file from source to destination
:param srcFile: Path of source file
:param destFile: Path of destination file
:param src_file: Path of source file
:param dest_file: Path of destination file
"""
try:
shutil.copyfile(srcFile, destFile)
except Exception as e:
sickrage.app.log.warning(str(e))
shutil.copyfile(src_file, dest_file)
except OSError as e:
if e.errno == errno.ENOSPC:
sickrage.app.log.warning(e)
else:
sickrage.app.log.error(e)
else:
try:
shutil.copymode(srcFile, destFile)
shutil.copymode(src_file, dest_file)
except OSError:
pass
def moveFile(srcFile, destFile):
def move_file(src_file, dest_file):
"""
Move a file from source to destination
:param srcFile: Path of source file
:param destFile: Path of destination file
:param src_file: Path of source file
:param dest_file: Path of destination file
"""
try:
shutil.move(srcFile, destFile)
fixSetGroupID(destFile)
shutil.move(src_file, dest_file)
fix_set_group_id(dest_file)
except OSError:
copyFile(srcFile, destFile)
os.unlink(srcFile)
copy_file(src_file, dest_file)
os.unlink(src_file)
def link(src, dst):
......@@ -486,21 +490,27 @@ def link(src, dst):
os.link(src, dst)
def hardlinkFile(srcFile, destFile):
def hardlink_file(src_file, dest_file):
"""
Create a hard-link (inside filesystem link) between source and destination
:param srcFile: Source file
:param destFile: Destination file
:param src_file: Source file
:param dest_file: Destination file
"""
try:
link(srcFile, destFile)
fixSetGroupID(destFile)
except Exception as e:
sickrage.app.log.warning("Failed to create hardlink of %s at %s. Error: %r. Copying instead"
% (srcFile, destFile, e))
copyFile(srcFile, destFile)
link(src_file, dest_file)
fix_set_group_id(dest_file)
except OSError as e:
if e.errno == errno.EEXIST:
# File exists. Don't fallback to copy
sickrage.app.log.warning('Failed to create hardlink of {src} at {dest}. Error: {error!r}'.format(
**{'src': src_file, 'dest': dest_file, 'error': e}))
else:
sickrage.app.log.warning(
"Failed to create hardlink of {src} at {dest}. Error: {error!r}. Copying instead".format(
**{'src': src_file, 'dest': dest_file, 'error': e}))
copy_file(src_file, dest_file)
def symlink(src, dst):
......@@ -519,23 +529,28 @@ def symlink(src, dst):
os.symlink(src, dst)
def moveAndSymlinkFile(srcFile, destFile):
def move_and_symlink_file(src_file, dest_file):
"""
Move a file from source to destination, then create a symlink back from destination from source. If this fails, copy
the file from source to destination
:param srcFile: Source file
:param destFile: Destination file
:param src_file: Source file
:param dest_file: Destination file
"""
try:
shutil.move(srcFile, destFile)
fixSetGroupID(destFile)
symlink(destFile, srcFile)
except Exception as e:
sickrage.app.log.warning("Failed to create symlink of %s at %s. Error: %r. Copying instead"
% (srcFile, destFile, e))
copyFile(srcFile, destFile)
shutil.move(src_file, dest_file)
fix_set_group_id(dest_file)
symlink(dest_file, src_file)
except OSError as e:
if e.errno == errno.EEXIST:
# File exists. Don't fallback to copy
sickrage.app.log.warning('Failed to create symlink of {src} at {dest}. Error: {error!r}'.format(
**{'src': src_file, 'dest': dest_file, 'error': e}))
else:
sickrage.app.log.warning("Failed to create symlink of {src} at {dest}. Error: {error!r}. Copying instead".format(
**{'src': src_file, 'dest': dest_file, 'error': e}))
copy_file(src_file, dest_file)
def make_dirs(path):
......@@ -573,7 +588,7 @@ def make_dirs(path):
sickrage.app.log.debug("Folder %s didn't exist, creating it" % sofar)
os.mkdir(sofar)
# use normpath to remove end separator, otherwise checks permissions against itself
chmodAsParent(os.path.normpath(sofar))
chmod_as_parent(os.path.normpath(sofar))
# do the library update for synoindex
sickrage.app.notifier_providers['synoindex'].addFolder(sofar)
except (OSError, IOError) as e:
......@@ -621,7 +636,7 @@ def delete_empty_folders(check_empty_dir, keep_dir=None):
pass
def fileBitFilter(mode):
def file_bit_filter(mode):
"""
Strip special filesystem bits from file
......@@ -636,9 +651,10 @@ def fileBitFilter(mode):
return mode
def chmodAsParent(childPath):
def chmod_as_parent(child_path):
"""
Retain permissions of parent for childs
(Does not work for Windows hosts)
:param childPath: Child Path to change permissions to sync from parent
......@@ -647,82 +663,85 @@ def chmodAsParent(childPath):
if os.name == 'nt' or os.name == 'ce':
return
parentPath = os.path.dirname(childPath)
parent_path = os.path.dirname(child_path)
if not parentPath:
sickrage.app.log.debug("No parent path provided in " + childPath + ", unable to get permissions from it")
if not parent_path:
sickrage.app.log.debug("No parent path provided in " + child_path + ", unable to get permissions from it")
return
childPath = os.path.join(parentPath, os.path.basename(childPath))
child_path = os.path.join(parent_path, os.path.basename(child_path))
if not os.path.exists(child_path):
return
parentPathStat = os.stat(parentPath)
parentMode = stat.S_IMODE(parentPathStat[stat.ST_MODE])
parent_path_stat = os.stat(parent_path)
parent_mode = stat.S_IMODE(parent_path_stat[stat.ST_MODE])
childPathStat = os.stat(childPath)
childPath_mode = stat.S_IMODE(childPathStat[stat.ST_MODE])
child_path_stat = os.stat(child_path)
child_path_mode = stat.S_IMODE(child_path_stat[stat.ST_MODE])
if os.path.isfile(childPath):
childMode = fileBitFilter(parentMode)
if os.path.isfile(child_path) and sickrage.app.config.strip_special_file_bits:
child_mode = file_bit_filter(parent_mode)
else:
childMode = parentMode
child_mode = parent_mode
if childPath_mode == childMode:
if child_path_mode == child_mode:
return
childPath_owner = childPathStat.st_uid
child_path_owner = child_path_stat.st_uid
user_id = os.geteuid()
if user_id != 0 and user_id != childPath_owner:
sickrage.app.log.debug("Not running as root or owner of " + childPath + ", not trying to set permissions")
if user_id not in (0, child_path_owner):
sickrage.app.log.debug("Not running as root or owner of " + child_path + ", not trying to set permissions")
return
try:
os.chmod(childPath, childMode)
os.chmod(child_path, child_mode)
sickrage.app.log.debug(
"Setting permissions for %s to %o as parent directory has %o" % (childPath, childMode, parentMode))
"Setting permissions for %s to %o as parent directory has %o" % (child_path, child_mode, parent_mode))
except OSError:
sickrage.app.log.debug("Failed to set permission for %s to %o" % (childPath, childMode))
sickrage.app.log.debug("Failed to set permission for %s to %o" % (child_path, child_mode))
def fixSetGroupID(childPath):
def fix_set_group_id(child_path):
"""
Inherid SGID from parent
Inherit SGID from parent
(does not work on Windows hosts)
:param childPath: Path to inherit SGID permissions from parent
:param child_path: Path to inherit SGID permissions from parent
"""
if os.name == 'nt' or os.name == 'ce':
return
parentPath = os.path.dirname(childPath)
parentStat = os.stat(parentPath)
parentMode = stat.S_IMODE(parentStat[stat.ST_MODE])
parent_path = os.path.dirname(child_path)
parent_stat = os.stat(parent_path)
parent_mode = stat.S_IMODE(parent_stat[stat.ST_MODE])
childPath = os.path.join(parentPath, os.path.basename(childPath))
child_path = os.path.join(parent_path, os.path.basename(child_path))
if parentMode & stat.S_ISGID:
parentGID = parentStat[stat.ST_GID]
childStat = os.stat(childPath)
childGID = childStat[stat.ST_GID]
if parent_mode & stat.S_ISGID:
parent_gid = parent_stat[stat.ST_GID]
child_stat = os.stat(child_path)
child_gid = child_stat[stat.ST_GID]
if childGID == parentGID:
if child_gid == parent_gid:
return
childPath_owner = childStat.st_uid
child_path_owner = child_stat.st_uid
user_id = os.geteuid()
if user_id != 0 and user_id != childPath_owner:
if user_id not in (0, child_path_owner):
sickrage.app.log.debug(
"Not running as root or owner of {}, not trying to set the set-group-ID".format(childPath))
"Not running as root or owner of {}, not trying to set the set-group-ID".format(child_path))
return
try:
os.chown(childPath, -1, parentGID) # @UndefinedVariable - only available on UNIX
sickrage.app.log.debug("Respecting the set-group-ID bit on the parent directory for {}".format(childPath))
os.chown(child_path, -1, parent_gid)
sickrage.app.log.debug("Respecting the set-group-ID bit on the parent directory for {}".format(child_path))
except OSError:
sickrage.app.log.error("Failed to respect the set-group-ID bit on the parent directory for {} (setting "
"group ID {})".format(childPath, parentGID))
"group ID {})".format(child_path, parent_gid))
def sanitizeSceneName(name, anime=False):
......@@ -948,7 +967,7 @@ def restoreConfigZip(archive, targetDir, restore_database=True, restore_config=T
return tail or os.path.basename(head)
bakFilename = '{0}-{1}'.format(path_leaf(targetDir), datetime.datetime.now().strftime('%Y%m%d_%H%M%S'))
moveFile(targetDir, os.path.join(os.path.dirname(targetDir), bakFilename))
move_file(targetDir, os.path.join(os.path.dirname(targetDir), bakFilename))
with zipfile.ZipFile(archive, 'r', allowZip64=True) as zip_file:
for member in zip_file.namelist():
......@@ -1029,26 +1048,26 @@ def restoreSR(srcDir, dstDir):
if os.path.exists(srcFile):
if os.path.isfile(dstFile):
moveFile(dstFile, bakFile)
moveFile(srcFile, dstFile)
move_file(dstFile, bakFile)
move_file(srcFile, dstFile)
# databse
if os.path.exists(os.path.join(srcDir, 'database')):
if os.path.exists(os.path.join(dstDir, 'database')):
moveFile(os.path.join(dstDir, 'database'), os.path.join(dstDir, '{}.bak-{}'
.format('database',
move_file(os.path.join(dstDir, 'database'), os.path.join(dstDir, '{}.bak-{}'
.format('database',
datetime.datetime.now().strftime(
'%Y%m%d_%H%M%S'))))
moveFile(os.path.join(srcDir, 'database'), dstDir)
move_file(os.path.join(srcDir, 'database'), dstDir)
# cache
if os.path.exists(os.path.join(srcDir, 'cache')):
if os.path.exists(os.path.join(dstDir, 'cache')):
moveFile(os.path.join(dstDir, 'cache'), os.path.join(dstDir, '{}.bak-{}'
.format('cache',
move_file(os.path.join(dstDir, 'cache'), os.path.join(dstDir, '{}.bak-{}'
.format('cache',
datetime.datetime.now().strftime(
'%Y%m%d_%H%M%S'))))
moveFile(os.path.join(srcDir, 'cache'), dstDir)
move_file(os.path.join(srcDir, 'cache'), dstDir)
return True
except Exception as e:
......@@ -1357,7 +1376,7 @@ def restoreVersionedFile(backup_file, version):
sickrage.app.log.debug("Trying to backup %s to %s.r%s before restoring backup"
% (new_file, new_file, version))
moveFile(new_file, new_file + '.' + 'r' + str(version))
move_file(new_file, new_file + '.' + 'r' + str(version))
except Exception as e:
sickrage.app.log.warning("Error while trying to backup file %s before proceeding with restore: %r"
% (restore_file, e))
......@@ -1833,4 +1852,4 @@ def episode_num(season=None, episode=None, **kwargs):
return 'S{0:0>2}E{1:02}'.format(season, episode)
elif numbering == 'absolute':
if not (season and episode) and (season or episode):
return '{0:0>3}'.format(season or episode)
\ No newline at end of file
return '{0:0>3}'.format(season or episode)
......@@ -31,7 +31,8 @@ from sickrage.core.common import Quality, ARCHIVED, DOWNLOADED
from sickrage.core.exceptions import EpisodeNotFoundException, EpisodePostProcessingFailedException, \
NoFreeSpaceException
from sickrage.core.helpers import findCertainShow, show_names, replaceExtension, makeDir, \
chmodAsParent, moveFile, copyFile, hardlinkFile, moveAndSymlinkFile, remove_non_release_groups, remove_extension, \
chmod_as_parent, move_file, copy_file, hardlink_file, move_and_symlink_file, remove_non_release_groups, \
remove_extension, \
isFileLocked, verify_freespace, delete_empty_folders, make_dirs, symlink, is_rar_file, glob_escape
from sickrage.core.nameparser import InvalidNameException, InvalidShowException, \
NameParser
......@@ -365,7 +366,7 @@ class PostProcessor(object):
if not dir_exists:
sickrage.app.log.warning("Unable to create subtitles folder " + subs_new_path)
else:
chmodAsParent(subs_new_path)
chmod_as_parent(subs_new_path)
new_file_path = os.path.join(subs_new_path, new_file_name)
else:
new_file_path = os.path.join(new_path, new_file_name)
......@@ -386,8 +387,8 @@ class PostProcessor(object):
self._log("Moving file from " + cur_file_path + " to " + new_file_path, sickrage.app.log.DEBUG)
try:
moveFile(cur_file_path, new_file_path)
chmodAsParent(new_file_path)
move_file(cur_file_path, new_file_path)
chmod_as_parent(new_file_path)
except (IOError, OSError) as e:
self._log("Unable to move file {} to {}: {}".format(cur_file_path, new_file_path, e),
sickrage.app.log.WARNING)
......@@ -410,8 +411,8 @@ class PostProcessor(object):
self._log("Copying file from " + cur_file_path + " to " + new_file_path, sickrage.app.log.DEBUG)
try:
copyFile(cur_file_path, new_file_path)
chmodAsParent(new_file_path)
copy_file(cur_file_path, new_file_path)
chmod_as_parent(new_file_path)
except (IOError, OSError) as e:
self._log("Unable to copy file {} to {}: {}".format(cur_file_path, new_file_path, e),
sickrage.app.log.WARNING)
......@@ -438,8 +439,8 @@ class PostProcessor(object):
if os.path.exists(new_file_path):
os.remove(new_file_path)
hardlinkFile(cur_file_path, new_file_path)
chmodAsParent(new_file_path)
hardlink_file(cur_file_path, new_file_path)
chmod_as_parent(new_file_path)
except (IOError, OSError) as e:
self._log("Unable to hardlink file {} to {}: {}".format(cur_file_path, new_file_path, e),
sickrage.app.log.WARNING)
......@@ -463,8 +464,8 @@ class PostProcessor(object):
self._log("Moving then symbolic linking file from " + cur_file_path + " to " + new_file_path,
sickrage.app.log.DEBUG)
try:
moveAndSymlinkFile(cur_file_path, new_file_path)
chmodAsParent(new_file_path)
move_and_symlink_file(cur_file_path, new_file_path)
chmod_as_parent(new_file_path)
except (IOError, OSError) as e:
self._log("Unable to move and symlink file {} to {}: {}".format(cur_file_path, new_file_path, e),
sickrage.app.log.WARNING)
......@@ -492,7 +493,7 @@ class PostProcessor(object):
os.remove(new_file_path)
symlink(cur_file_path, new_file_path)
chmodAsParent(cur_file_path)
chmod_as_parent(cur_file_path)
except (IOError, OSError) as e:
self._log("Unable to symlink file {} to {}: {}".format(cur_file_path, new_file_path, e),
sickrage.app.log.WARNING)
......@@ -1050,7 +1051,7 @@ class PostProcessor(object):
try:
os.mkdir(ep_obj.show.location)
chmodAsParent(ep_obj.show.location)
chmod_as_parent(ep_obj.show.location)
# do the library update for synoindex
sickrage.app.notifier_providers['synoindex'].addFolder(ep_obj.show.location)
......
......@@ -26,7 +26,7 @@ from datetime import date
import sickrage
from sickrage.core.common import Quality
from sickrage.core.common import SKIPPED, WANTED, UNKNOWN
from sickrage.core.helpers import findCertainShow, sanitizeFileName, makeDir, chmodAsParent
from sickrage.core.helpers import findCertainShow, sanitizeFileName, makeDir, chmod_as_parent
from sickrage.core.queues.search import BacklogQueueItem
from sickrage.core.traktapi import srTraktAPI
from sickrage.indexers import IndexerApi
......@@ -428,7 +428,7 @@ class TraktSearcher(object):
sickrage.app.log.warning("Unable to create the folder %s , can't add the show" % showPath)
return
else:
chmodAsParent(showPath)
chmod_as_parent(showPath)
sickrage.app.show_queue.addShow(int(indexer), int(indexer_id), showPath,
default_status=status,
......
......@@ -34,7 +34,7 @@ from sickrage.core.exceptions import NoNFOException, \
EpisodeNotFoundException, EpisodeDeletedException
from sickrage.core.helpers import is_media_file, try_int, replaceExtension, \
touchFile, sanitizeSceneName, remove_non_release_groups, remove_extension, sanitizeFileName, \
safe_getattr, make_dirs, moveFile, delete_empty_folders
safe_getattr, make_dirs, move_file, delete_empty_folders
from sickrage.core.nameparser import NameParser, InvalidNameException, InvalidShowException
from sickrage.core.processors.post_processor import PostProcessor
from sickrage.core.scene_numbering import get_scene_absolute_numbering, get_scene_numbering
......@@ -1390,7 +1390,7 @@ class TVEpisode(object):
# move the file
try:
sickrage.app.log.info("Renaming file from %s to %s" % (cur_path, new_path))
moveFile(cur_path, new_path)
move_file(cur_path, new_path)
except (OSError, IOError) as e:
sickrage.app.log.warning("Failed renaming %s to %s : %r" % (cur_path, new_path, e))
return False
......
......@@ -46,7 +46,7 @@ from sickrage.core.common import ARCHIVED, DOWNLOADED, IGNORED, \
WANTED, dateFormat, dateTimeFormat, get_quality_string, statusStrings, \
timeFormat
from sickrage.core.exceptions import CantUpdateShowException, CantRemoveShowException, CantRefreshShowException
from sickrage.core.helpers import chmodAsParent, findCertainShow, makeDir, \
from sickrage.core.helpers import chmod_as_parent, findCertainShow, makeDir, \
pretty_filesize, sanitizeFileName, srdatetime, try_int, readFileBuffered, app_statistics
from sickrage.core.media.banner import Banner
from sickrage.core.media.fanart import FanArt
......@@ -2075,7 +2075,7 @@ class CMD_ShowAddNew(ApiCall):
return _responds(RESULT_FAILURE, {"path": showPath},
"Unable to create the folder " + showPath + ", can't add the show")
else:
chmodAsParent(showPath)
chmod_as_parent(showPath)
sickrage.app.show_queue.addShow(
int(indexer), int(self.indexerid), showPath, default_status=newStatus, quality=newQuality,
......
......@@ -58,7 +58,7 @@ from sickrage.core.common import FAILED, IGNORED, Overview, Quality, SKIPPED, \
from sickrage.core.exceptions import CantRefreshShowException, \
CantUpdateShowException, EpisodeDeletedException, \
NoNFOException, CantRemoveShowException
from sickrage.core.helpers import argToBool, backupSR, chmodAsParent, findCertainShow, generateApiKey, \
from sickrage.core.helpers import argToBool, backupSR, chmod_as_parent, findCertainShow, generateApiKey, \
getDiskSpaceUsage, makeDir, readFileBuffered, \
remove_article, restoreConfigZip, \
sanitizeFileName, clean_url, try_int, torrent_webui_url, checkbox_to_value, clean_host, \
......@@ -74,7 +74,7 @@ from sickrage.core.scene_exceptions import get_scene_exceptions, update_scene_ex
from sickrage.core.scene_numbering import get_scene_absolute_numbering, \
get_scene_absolute_numbering_for_show, get_scene_numbering, \
get_scene_numbering_for_show, get_xem_absolute_numbering_for_show, \
get_xem_numbering_for_show, set_scene_numbering
get_xem_numbering_for_show, set_scene_numbering, xem_refresh
from sickrage.core.traktapi import srTraktAPI
from sickrage.core.tv.episode import TVEpisode
from sickrage.core.tv.show.coming_episodes import ComingEpisodes
......@@ -1428,7 +1428,8 @@ class Home(WebHandler):
else:
showObj.release_groups.set_black_keywords([])
errors = []
warnings, errors = [], []
with showObj.lock:
newQuality = try_int(quality_preset, None)
if not newQuality:
......@@ -1465,7 +1466,7 @@ class Home(WebHandler):
if os.path.normpath(showObj.location) != os.path.normpath(location):
sickrage.app.log.debug(os.path.normpath(showObj.location) + " != " + os.path.normpath(location))