diff --git a/data/interfaces/default/config.html b/data/interfaces/default/config.html index d80baab9..39aeb506 100755 --- a/data/interfaces/default/config.html +++ b/data/interfaces/default/config.html @@ -703,18 +703,20 @@
Folder path where torrents will be assigned to -
- Add torrent only -
-
- Add torrent and force start -
-
- Add torrent and pause -
-
- qBittorrent "Add torrent" options -
+
+ + +
diff --git a/mylar/config.py b/mylar/config.py index 069110bc..1a72220e 100644 --- a/mylar/config.py +++ b/mylar/config.py @@ -348,7 +348,7 @@ _CONFIG_DEFINITIONS = OrderedDict({ 'QBITTORRENT_PASSWORD': (str, 'qBittorrent', None), 'QBITTORRENT_LABEL': (str, 'qBittorrent', None), 'QBITTORRENT_FOLDER': (str, 'qBittorrent', None), - 'QBITTORRENT_LOADACTION': (int, 'qBittorrent', 0), #0': client default, #1': force start, #2': add paused + 'QBITTORRENT_LOADACTION': (str, 'qBittorrent', 'default'), #default, force_start, paused 'OPDS_ENABLE': (bool, 'OPDS', False), 'OPDS_AUTHENTICATION': (bool, 'OPDS', False), diff --git a/mylar/torrent/clients/qbittorrent.py b/mylar/torrent/clients/qbittorrent.py index e1fd4571..5be911e8 100644 --- a/mylar/torrent/clients/qbittorrent.py +++ b/mylar/torrent/clients/qbittorrent.py @@ -111,14 +111,14 @@ class TorrentClient(object): else: logger.debug('Successfully submitted for add via file. Verifying item is now on client.') - if mylar.CONFIG.QBITTORRENT_LOADACTION == 1: + if mylar.CONFIG.QBITTORRENT_LOADACTION == 'force_start': logger.info('Attempting to force start torrent') try: startit = self.client.force_start(hash) logger.info('startit returned:' + str(startit)) except: logger.warn('Unable to force start torrent - please check your client.') - elif mylar.CONFIG.QBITTORRENT_LOADACTION == 2: + elif mylar.CONFIG.QBITTORRENT_LOADACTION == 'pause': logger.info('Attempting to pause torrent after loading') try: startit = self.client.pause(hash) diff --git a/mylar/webserve.py b/mylar/webserve.py index 9abccf5e..50fb7a31 100644 --- a/mylar/webserve.py +++ b/mylar/webserve.py @@ -4739,9 +4739,7 @@ class WebInterface(object): "qbittorrent_password": mylar.CONFIG.QBITTORRENT_PASSWORD, "qbittorrent_label": mylar.CONFIG.QBITTORRENT_LABEL, "qbittorrent_folder": mylar.CONFIG.QBITTORRENT_FOLDER, - "qbittorrent_clientdefault": helpers.radio(mylar.CONFIG.QBITTORRENT_LOADACTION, 0), - "qbittorrent_forcestart": helpers.radio(mylar.CONFIG.QBITTORRENT_LOADACTION, 1), - "qbittorrent_addpaused": helpers.radio(mylar.CONFIG.QBITTORRENT_LOADACTION, 2), + "qbittorrent_loadaction": mylar.CONFIG.QBITTORRENT_LOADACTION, "blackhole_dir": mylar.CONFIG.BLACKHOLE_DIR, "usenet_retention": mylar.CONFIG.USENET_RETENTION, "nzbsu": helpers.checked(mylar.CONFIG.NZBSU),