mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-14 02:26:53 -07:00
Add the ability to set octal permissions on the processed files prior to handing it off to Sickrage/Couchpotato
If set, the `chmodDirectory` option instructs the nzbToMedia post-processing script to set the recursive directory permissions to the octal value specified.
This commit is contained in:
parent
14be873c7c
commit
cb0de3ca98
3 changed files with 17 additions and 0 deletions
|
@ -195,6 +195,12 @@ class autoProcessMovie(object):
|
|||
if result == 0:
|
||||
logger.debug("Transcoding succeeded for files in {0}".format(dirName), section)
|
||||
dirName = newDirName
|
||||
|
||||
chmod_directory = int(cfg.get("chmodDirectory", 0), 8)
|
||||
logger.debug("Config setting 'chmodDirectory' currently set to {0}".format(oct(chmod_directory)), section)
|
||||
if chmod_directory:
|
||||
logger.info("Attempting to set the octal permission of '{0}' on directory '{1}'".format(oct(chmod_directory), dirName), section)
|
||||
core.rchmod(dirName, chmod_directory)
|
||||
else:
|
||||
logger.error("Transcoding failed for files in {0}".format(dirName), section)
|
||||
return [1, "{0}: Failed to post-process - Transcoding failed".format(section)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue