From 521d2b7a050593d1898aac31fbbcc9187666bb04 Mon Sep 17 00:00:00 2001 From: Labrys of Knossos Date: Sat, 19 Jan 2019 14:25:25 -0500 Subject: [PATCH] Refactor torrent permission configuration --- core/__init__.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/core/__init__.py b/core/__init__.py index e53999ec..3104d779 100644 --- a/core/__init__.py +++ b/core/__init__.py @@ -499,13 +499,18 @@ def configure_torrent_resuming(): TORRENT_RESUME = int(CFG['Torrent']['resume']) +def configure_torrent_permissions(): + global TORRENT_CHMOD_DIRECTORY + + TORRENT_CHMOD_DIRECTORY = int(str(CFG['Torrent']['chmodDirectory']), 8) + + def configure_torrents(): global TORRENT_CLIENT_AGENT global USE_LINK global OUTPUT_DIRECTORY global TORRENT_DEFAULT_DIRECTORY global DELETE_ORIGINAL - global TORRENT_CHMOD_DIRECTORY TORRENT_CLIENT_AGENT = CFG['Torrent']['clientAgent'] # utorrent | deluge | transmission | rtorrent | vuze | qbittorrent |other USE_LINK = CFG['Torrent']['useLink'] # no | hard | sym @@ -514,7 +519,7 @@ def configure_torrents(): configure_flattening() configure_torrent_categories() DELETE_ORIGINAL = int(CFG['Torrent']['deleteOriginal']) - TORRENT_CHMOD_DIRECTORY = int(str(CFG['Torrent']['chmodDirectory']), 8) + configure_torrent_permissions() configure_torrent_resuming() configure_utorrent() configure_transmission()