From 81a6d9c4fa56f8055416e20a9faad48910605038 Mon Sep 17 00:00:00 2001 From: Labrys of Knossos Date: Sat, 19 Jan 2019 14:27:32 -0500 Subject: [PATCH] Refactor torrent linking configuration --- core/__init__.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/core/__init__.py b/core/__init__.py index 4f7afff9..317809a2 100644 --- a/core/__init__.py +++ b/core/__init__.py @@ -511,16 +511,21 @@ def configure_torrent_deltetion(): DELETE_ORIGINAL = int(CFG['Torrent']['deleteOriginal']) +def configure_torrent_linking(): + global USE_LINK + + USE_LINK = CFG['Torrent']['useLink'] # no | hard | sym + + def configure_torrents(): global TORRENT_CLIENT_AGENT - global USE_LINK global OUTPUT_DIRECTORY global TORRENT_DEFAULT_DIRECTORY TORRENT_CLIENT_AGENT = CFG['Torrent']['clientAgent'] # utorrent | deluge | transmission | rtorrent | vuze | qbittorrent |other - USE_LINK = CFG['Torrent']['useLink'] # no | hard | sym OUTPUT_DIRECTORY = CFG['Torrent']['outputDirectory'] # /abs/path/to/complete/ TORRENT_DEFAULT_DIRECTORY = CFG['Torrent']['default_downloadDirectory'] + configure_torrent_linking() configure_flattening() configure_torrent_deltetion() configure_torrent_categories()