Browse Source

Merge branch 'hotfix/0.21.18'

tags/release_0.21.18^0 release_0.21.18
JackDandy 5 years ago
parent
commit
08097f4b3b
  1. 7
      CHANGES.md
  2. 7
      lib/sg_helpers.py
  3. 2
      sickbeard/helpers.py
  4. 2
      sickbeard/postProcessor.py

7
CHANGES.md

@ -1,4 +1,9 @@
### 0.21.17 (2020-03-03 21:35:00 UTC)
### 0.21.18 (2020-03-04 19:20:00 UTC)
* Fix NotifierFactory AttributeError on first run init
### 0.21.17 (2020-03-03 21:35:00 UTC)
* Fix do not process magnet links in search results
* Fix saving media process settings

7
lib/sg_helpers.py

@ -465,13 +465,13 @@ def chmod_as_parent(child_path):
logger.error(u'Failed to set permission for %s to %o' % (child_path, child_mode))
def make_dirs(path, syno=True):
def make_dirs(path, syno=False):
"""
Creates any folders that are missing and assigns them the permissions of their
parents
:param path: path
:type path: AnyStr
:param syno:
:param syno: whether to trigger a syno library update for path
:type syno: bool
:return: success
:rtype: bool
@ -504,7 +504,6 @@ def make_dirs(path, syno=True):
ek.ek(os.mkdir, sofar)
# use normpath to remove end separator, otherwise checks permissions against itself
chmod_as_parent(ek.ek(os.path.normpath, sofar))
# todo: reenable
if syno:
# do the library update for synoindex
NOTIFIERS.NotifierFactory().get('SYNOINDEX').addFolder(sofar)
@ -534,7 +533,7 @@ def write_file(filepath, # type: AnyStr
"""
result = False
if make_dirs(ek.ek(os.path.dirname, filepath), False):
if make_dirs(ek.ek(os.path.dirname, filepath)):
try:
if raw:
with ek.ek(io.FileIO, filepath, 'wb') as fh:

2
sickbeard/helpers.py

@ -598,7 +598,7 @@ def rename_ep_file(cur_path, new_path, old_path_length=0):
# put the extension on the incoming file
new_path += cur_file_ext
make_dirs(ek.ek(os.path.dirname, new_path))
make_dirs(ek.ek(os.path.dirname, new_path), syno=True)
# move the file
try:

2
sickbeard/postProcessor.py

@ -1141,7 +1141,7 @@ class PostProcessor(object):
self._log(u'Destination folder for this episode is ' + dest_path, logger.DEBUG)
# create any folders we need
if not helpers.make_dirs(dest_path):
if not helpers.make_dirs(dest_path, syno=True):
raise exceptions_helper.PostProcessingFailed(u'Unable to create destination folder: ' + dest_path)
# figure out the base name of the resulting episode file

Loading…
Cancel
Save