1
0
Fork 0
mirror of https://github.com/evilhero/mylar synced 2024-12-25 01:01:47 +00:00

Fix for branch check, Updated config HTML for uTorrent support.

This commit is contained in:
Jason Cline 2016-05-06 13:31:46 -04:00
parent 9f193dba80
commit 162094b980
4 changed files with 144 additions and 90 deletions

View file

@ -385,73 +385,70 @@
</td>
<td>
<legend>Torrents</legend>
<fieldset>
<div class="row checkbox">
<input id="enable_torrents" type="checkbox" onclick="initConfigCheckbox($(this));" name="enable_torrents" value=1 ${config['enable_torrents']} /><label>Use Torrents</label>
</div>
<div class="config">
<div class="row">
<label>Minimum # of seeders</label>
<input type="text" name="minseeds" value="${config['minseeds']}" size="10">
</div>
<div class="row checkbox left clearfix">
<input id="torrent_local" type="checkbox" onclick="initConfigCheckbox($(this));" name="torrent_local" value=1 ${config['torrent_local']} /><label>Local Torrent Client</label>
</div>
<div class="config">
<div Class="row">
<label>Watch Directory</label>
<input type="text" name="local_watchdir" value="${config['local_watchdir']}" size="30"><br/>
<small>Local Folder your torrent client watches</small>
</div>
</div>
<div class="row checkbox left clearfix">
<input id="use_utorrent" type="checkbox" onclick="initConfigCheckbox($(this));" name="use_utorrent" value=1 ${config['use_utorrent']} /><label>uTorrent Client</label>
</div>
<div class="config">
<div class="row">
<label>uTorrent Host</label>
<input type="text" name="utorrent_host" value="${config['utorrent_host']}" size="30">
</div>
<div class="row">
<label>uTorrent Username</label>
<input type="text" name="utorrent_username" value="${config['utorrent_username']}" size="30">
</div>
<div class="row">
<label>uTorrent Password</label>
<input type="password" name="utorrent_password" value="${config['utorrent_password']}" size="30">
</div>
<div class="row">
<label>uTorrent Label</label>
<input type="text" name="utorrent_label" value="${config['utorrent_label']}" size="30"><br/>
<small>Label for your uTorrent downloads</small>
</div>
</div>
<div class="row checkbox left clearfix">
<input id="torrent_seedbox" type="checkbox" onclick="initConfigCheckbox($(this));" name="torrent_seedbox" value=1 ${config['torrent_seedbox']} /><label>Seedbox Client</label>
</div>
<div class="config">
<div class="row">
<label>Seedbox Host</label>
<input type="text" name="seedbox_host" value="${config['seedbox_host']}" size="30">
</div>
<div class="row">
<label>Seedbox Port (SFTP)</label>
<input type="text" name="seedbox_port" value="${config['seedbox_port']}" size="30">
</div>
<div class="row">
<label>Seedbox Username</label>
<input type="text" name="seedbox_user" value="${config['seedbox_user']}" size="30">
</div>
<div class="row">
<label>Seedbox Password</label>
<input type="password" name="seedbox_pass" value="${config['seedbox_pass']}" size="30">
</div>
<div class="row">
<label>Watch Directory</label>
<input type="text" name="seedbox_watchdir" value="${config['seedbox_watchdir']}" size="30"><br/>
<small>Folder path your torrent seedbox client watches</small>
</div>
</div>
<fieldset>
<div class="row checkbox">
<input id="enable_torrents" type="checkbox" onclick="initConfigCheckbox($(this));" name="enable_torrents" value=1 ${config['enable_torrents']} /><label>Use Torrents</label>
</div>
<div class="config">
<input type="radio" name="torrent_downloader" id="torrent_downloader_watchlist" value="0" ${config['torrent_downloader_watchlist']}>Local Watchdir
<input type="radio" name="torrent_downloader" id="torrent_downloader_utorrent" value="1" ${config['torrent_downloader_utorrent']}> uTorrent
<!-- <input type="radio" name="torrent_downloader" id="torrent_downloader_rtorrent" value="2" ${config['torrent_downloader_rtorrent']}>rTorrent -->
<input type="radio" name="torrent_downloader" id="torrent_downloader_seedbox" value="3" ${config['torrent_downloader_seedbox']}>Seedbox
<div class="row">
<label>Minimum # of seeders</label>
<input type="text" name="minseeds" value="${config['minseeds']}" size="10">
</div>
</div>
</fieldset>
<fieldset id="watchlist_options">
<div Class="row">
<label>Watch Directory</label>
<input type="text" name="local_watchdir" value="${config['local_watchdir']}" size="30"><br/>
<small>Local Folder your torrent client watches</small>
</div>
</fieldset>
<fieldset id="utorrent_options">
<div class="row">
<label>uTorrent Host</label>
<input type="text" name="utorrent_host" value="${config['utorrent_host']}" size="30">
</div>
<div class="row">
<label>uTorrent Username</label>
<input type="text" name="utorrent_username" value="${config['utorrent_username']}" size="30">
</div>
<div class="row">
<label>uTorrent Password</label>
<input type="password" name="utorrent_password" value="${config['utorrent_password']}" size="30">
</div>
<div class="row">
<label>uTorrent Label</label>
<input type="text" name="utorrent_label" value="${config['utorrent_label']}" size="30"><br/>
<small>Label for your uTorrent downloads</small>
</div>
</fieldset>
<fieldset id="seedbox_options">
<div class="row">
<label>Seedbox Host</label>
<input type="text" name="seedbox_host" value="${config['seedbox_host']}" size="30">
</div>
<div class="row">
<label>Seedbox Port (SFTP)</label>
<input type="text" name="seedbox_port" value="${config['seedbox_port']}" size="30">
</div>
<div class="row">
<label>Seedbox Username</label>
<input type="text" name="seedbox_user" value="${config['seedbox_user']}" size="30">
</div>
<div class="row">
<label>Seedbox Password</label>
<input type="password" name="seedbox_pass" value="${config['seedbox_pass']}" size="30">
</div>
<div class="row">
<label>Watch Directory</label>
<input type="text" name="seedbox_watchdir" value="${config['seedbox_watchdir']}" size="30"><br/>
<small>Folder path your torrent seedbox client watches</small>
</div>
</fieldset>
</div>
</fieldset>
</td>
@ -1307,6 +1304,28 @@
$("#blackhole_options").show();
}
if ($("#torrent_downloader_watchlist").is(":checked"))
{
$("#utorrent_options,#rtorrent_options,#seedbox_options").hide();
$("#watchlist_options").show();
}
if ($("#torrent_downloader_utorrent").is(":checked"))
{
$("#watchlist_options,#rtorrent_options,#seedbox_options").hide();
$("#utorrent_options").show();
}
if ($("#torrent_downloader_rtorrent").is(":checked"))
{
$("#utorrent_options,#watchlist_options,#seedbox_options").hide();
$("#rtorrent_options").show();
}
if ($("#torrent_downloader_seedbox").is(":checked"))
{
$("#utorrent_options,#rtorrent_options,#watchlist_options").hide();
$("#seedbox_options").show();
}
$('input[type=radio]').change(function(){
if ($("#nzb_downloader_sabnzbd").is(":checked"))
{
@ -1320,6 +1339,22 @@
{
$("#sabnzbd_options,#nzbget_options").fadeOut("fast", function() { $("#blackhole_options").fadeIn() });
}
if ($("#torrent_downloader_watchlist").is(":checked"))
{
$("#utorrent_options,#rtorrent_options,#seedbox_options").fadeOut("fast", function() { $("#watchlist_options").fadeIn() });
}
if ($("#torrent_downloader_utorrent").is(":checked"))
{
$("#watchlist_options,#rtorrent_options,#seedbox_options").fadeOut("fast", function() { $("#utorrent_options").fadeIn() });
}
if ($("#torrent_downloader_rtorrent").is(":checked"))
{
$("#utorrent_options,#watchlist_options,#seedbox_options").fadeOut("fast", function() { $("#rtorrent_options").fadeIn() });
}
if ($("#torrent_downloader_seedbox").is(":checked"))
{
$("#utorrent_options,#rtorrent_options,#watchlist_options").fadeOut("fast", function() { $("#seedbox_options").fadeIn() });
}
});
var deletedNewznabs = 0;
@ -1450,9 +1485,6 @@
initConfigCheckbox("#usenzbsu");
initConfigCheckbox("#usedognzb");
initConfigCheckbox("#enable_torrents");
initConfigCheckbox("#torrent_local");
initConfigCheckbox("#torrent_seedbox");
initConfigCheckbox("#use_utorrent");
initConfigCheckbox("#enable_torrent_search");
initConfigCheckbox("#enable_32p");
initConfigCheckbox("#enable_rss");

View file

@ -349,10 +349,11 @@ FAILED_DOWNLOAD_HANDLING = 0
FAILED_AUTO = 0
ENABLE_TORRENTS = 0
TORRENT_DOWNLOADER = None #0 = watchfolder, #1 = uTorrent, #2 = rTorrent, #3 = seedbox
MINSEEDS = 0
TORRENT_LOCAL = 0
TORRENT_LOCAL = False
LOCAL_WATCHDIR = None
TORRENT_SEEDBOX = 0
TORRENT_SEEDBOX = False
SEEDBOX_HOST = None
SEEDBOX_PORT = None
SEEDBOX_USER = None
@ -376,6 +377,7 @@ FEEDINFO_32P = None
VERIFY_32P = 1
SNATCHEDTORRENT_NOTIFY = 0
USE_RTORRENT = False
RTORRENT_HOST = None
RTORRENT_USERNAME = None
RTORRENT_PASSWORD = None
@ -383,7 +385,7 @@ RTORRENT_STARTONLOAD = 0
RTORRENT_LABEL = None
RTORRENT_DIRECTORY = None
USE_UTORRENT = 0
USE_UTORRENT = False
UTORRENT_HOST = None
UTORRENT_USERNAME = None
UTORRENT_PASSWORD = None
@ -447,10 +449,10 @@ def initialize():
USE_NZBGET, NZBGET_HOST, NZBGET_PORT, NZBGET_USERNAME, NZBGET_PASSWORD, NZBGET_CATEGORY, NZBGET_PRIORITY, NZBGET_DIRECTORY, NZBSU, NZBSU_UID, NZBSU_APIKEY, NZBSU_VERIFY, DOGNZB, DOGNZB_APIKEY, DOGNZB_VERIFY, \
NEWZNAB, NEWZNAB_NAME, NEWZNAB_HOST, NEWZNAB_APIKEY, NEWZNAB_VERIFY, NEWZNAB_UID, NEWZNAB_ENABLED, EXTRA_NEWZNABS, NEWZNAB_EXTRA, \
ENABLE_TORZNAB, TORZNAB_NAME, TORZNAB_HOST, TORZNAB_APIKEY, TORZNAB_CATEGORY, TORZNAB_VERIFY, \
EXPERIMENTAL, ALTEXPERIMENTAL, RTORRENT_HOST, RTORRENT_USERNAME, RTORRENT_PASSWORD, RTORRENT_STARTONLOAD, RTORRENT_LABEL, RTORRENT_DIRECTORY, USE_UTORRENT, UTORRENT_HOST, UTORRENT_USERNAME, UTORRENT_PASSWORD, UTORRENT_LABEL, \
EXPERIMENTAL, ALTEXPERIMENTAL, USE_RTORRENT, RTORRENT_HOST, RTORRENT_USERNAME, RTORRENT_PASSWORD, RTORRENT_STARTONLOAD, RTORRENT_LABEL, RTORRENT_DIRECTORY, USE_UTORRENT, UTORRENT_HOST, UTORRENT_USERNAME, UTORRENT_PASSWORD, UTORRENT_LABEL, \
ENABLE_META, CMTAGGER_PATH, CBR2CBZ_ONLY, CT_TAG_CR, CT_TAG_CBL, CT_CBZ_OVERWRITE, UNRAR_CMD, CT_SETTINGSPATH, UPDATE_ENDED, INDIE_PUB, BIGGIE_PUB, IGNORE_HAVETOTAL, SNATCHED_HAVETOTAL, PROVIDER_ORDER, \
dbUpdateScheduler, searchScheduler, RSSScheduler, WeeklyScheduler, VersionScheduler, FolderMonitorScheduler, \
ENABLE_TORRENTS, MINSEEDS, TORRENT_LOCAL, LOCAL_WATCHDIR, TORRENT_SEEDBOX, SEEDBOX_HOST, SEEDBOX_PORT, SEEDBOX_USER, SEEDBOX_PASS, SEEDBOX_WATCHDIR, \
ENABLE_TORRENTS, TORRENT_DOWNLOADER, MINSEEDS, TORRENT_LOCAL, LOCAL_WATCHDIR, TORRENT_SEEDBOX, SEEDBOX_HOST, SEEDBOX_PORT, SEEDBOX_USER, SEEDBOX_PASS, SEEDBOX_WATCHDIR, \
ENABLE_RSS, RSS_CHECKINTERVAL, RSS_LASTRUN, FAILED_DOWNLOAD_HANDLING, FAILED_AUTO, ENABLE_TORRENT_SEARCH, ENABLE_KAT, KAT_PROXY, KAT_VERIFY, ENABLE_32P, MODE_32P, KEYS_32P, RSSFEED_32P, USERNAME_32P, PASSWORD_32P, AUTHKEY_32P, PASSKEY_32P, FEEDINFO_32P, VERIFY_32P, SNATCHEDTORRENT_NOTIFY, \
PROWL_ENABLED, PROWL_PRIORITY, PROWL_KEYS, PROWL_ONSNATCH, NMA_ENABLED, NMA_APIKEY, NMA_PRIORITY, NMA_ONSNATCH, PUSHOVER_ENABLED, PUSHOVER_PRIORITY, PUSHOVER_APIKEY, PUSHOVER_USERKEY, PUSHOVER_ONSNATCH, BOXCAR_ENABLED, BOXCAR_ONSNATCH, BOXCAR_TOKEN, \
PUSHBULLET_ENABLED, PUSHBULLET_APIKEY, PUSHBULLET_DEVICEID, PUSHBULLET_ONSNATCH, LOCMOVE, NEWCOM_DIR, FFTONEWCOM_DIR, \
@ -470,6 +472,7 @@ def initialize():
CheckSection('Newznab')
CheckSection('Torznab')
CheckSection('Torrents')
CheckSection('uTorrent')
# Set global variables based on config file or use defaults
try:
HTTP_PORT = check_setting_int(CFG, 'General', 'http_port', 8090)
@ -519,6 +522,7 @@ def initialize():
CHECK_GITHUB_ON_STARTUP = bool(check_setting_int(CFG, 'General', 'check_github_on_startup', 1))
CHECK_GITHUB_INTERVAL = check_setting_int(CFG, 'General', 'check_github_interval', 360)
GIT_USER = check_setting_str(CFG, 'General', 'git_user', 'evilhero')
GIT_BRANCH = check_setting_str(CFG,'General', 'git_branch', 'master')
DESTINATION_DIR = check_setting_str(CFG, 'General', 'destination_dir', '')
MULTIPLE_DEST_DIRS = check_setting_str(CFG, 'General', 'multiple_dest_dirs', '')
@ -664,9 +668,9 @@ def initialize():
FAILED_AUTO = bool(check_setting_int(CFG, 'General', 'failed_auto', 0))
ENABLE_TORRENTS = bool(check_setting_int(CFG, 'Torrents', 'enable_torrents', 0))
MINSEEDS = check_setting_str(CFG, 'Torrents', 'minseeds', '0')
TORRENT_LOCAL = bool(check_setting_int(CFG, 'Torrents', 'torrent_local', 0))
# TORRENT_LOCAL = bool(check_setting_int(CFG, 'Torrents', 'torrent_local', 0)) -- Depriciated
LOCAL_WATCHDIR = check_setting_str(CFG, 'Torrents', 'local_watchdir', '')
TORRENT_SEEDBOX = bool(check_setting_int(CFG, 'Torrents', 'torrent_seedbox', 0))
# TORRENT_SEEDBOX = bool(check_setting_int(CFG, 'Torrents', 'torrent_seedbox', 0)) -- Depriciated
SEEDBOX_HOST = check_setting_str(CFG, 'Torrents', 'seedbox_host', '')
SEEDBOX_PORT = check_setting_str(CFG, 'Torrents', 'seedbox_port', '')
SEEDBOX_USER = check_setting_str(CFG, 'Torrents', 'seedbox_user', '')
@ -754,8 +758,15 @@ def initialize():
PR_NUM = 0 # provider counter here (used for provider orders)
PR = []
USE_UTORRENT = bool(check_setting_int(CFG, 'uTorrent', 'use_utorrent', 0))
TORRENT_DOWNLOADER = check_setting_int(CFG, 'General', 'torrent_downloader', 0)
if TORRENT_DOWNLOADER == 0: TORRENT_LOCAL = True
elif TORRENT_DOWNLOADER == 1: USE_UTORRENT = True
elif TORRENT_DOWNLOADER == 2: USE_RTORRENT = True
elif TORRENT_DOWNLOADER == 3: TORRENT_SEEDBOX = True
else:
TORRENT_DOWNLOADER = 0
TORRENT_LOCAL = True
#USE_UTORRENT = bool(check_setting_int(CFG, 'uTorrent', 'use_utorrent', 0))
UTORRENT_HOST = check_setting_str(CFG, 'uTorrent', 'utorrent_host', '')
UTORRENT_USERNAME = check_setting_str(CFG, 'uTorrent', 'utorrent_username', '')
UTORRENT_PASSWORD = check_setting_str(CFG, 'uTorrent', 'utorrent_password', '')
@ -839,6 +850,7 @@ def initialize():
EXTRA_NEWZNABS = list(itertools.izip(*[itertools.islice(flattened_newznabs, i, None, EN_NUM) for i in range(EN_NUM)]))
#if ConfigV3 add the nzb_name to it..
#if ConfigV3 add the nzb_name to it..
if CONFIG_VERSION != '6': #just bump it up to V6 and throw in the VERIFY too.
ENABS = []
@ -1391,13 +1403,14 @@ def config_write():
new_config['General']['provider_order'] = flattened_providers
new_config['General']['nzb_downloader'] = int(NZB_DOWNLOADER)
new_config['General']['torrent_downloader'] = int(TORRENT_DOWNLOADER)
new_config['Torrents'] = {}
new_config['Torrents']['enable_torrents'] = int(ENABLE_TORRENTS)
new_config['Torrents']['minseeds'] = int(MINSEEDS)
new_config['Torrents']['torrent_local'] = int(TORRENT_LOCAL)
# new_config['Torrents']['torrent_local'] = int(TORRENT_LOCAL) - Depriciated
new_config['Torrents']['local_watchdir'] = LOCAL_WATCHDIR
new_config['Torrents']['torrent_seedbox'] = int(TORRENT_SEEDBOX)
# new_config['Torrents']['torrent_seedbox'] = int(TORRENT_SEEDBOX) - Depriciated
new_config['Torrents']['seedbox_host'] = SEEDBOX_HOST
new_config['Torrents']['seedbox_port'] = SEEDBOX_PORT
new_config['Torrents']['seedbox_user'] = SEEDBOX_USER
@ -1471,7 +1484,7 @@ def config_write():
new_config['Newznab']['newznab'] = int(NEWZNAB)
new_config['uTorrent'] = {}
new_config['uTorrent']['use_utorrent'] = int(USE_UTORRENT)
#new_config['uTorrent']['use_utorrent'] = int(USE_UTORRENT)
new_config['uTorrent']['utorrent_host'] = UTORRENT_HOST
new_config['uTorrent']['utorrent_username'] = UTORRENT_USERNAME
new_config['uTorrent']['utorrent_password'] = UTORRENT_PASSWORD

View file

@ -7,6 +7,7 @@ import lib.requests as requests
import ftpsshup
import datetime
import gzip
import time
from StringIO import StringIO
import mylar
@ -899,6 +900,7 @@ def torsend2client(seriesname, issue, seriesyear, linkit, site):
tordata = torfile.read()
torfile.close()
hash = utorrent.calculate_torrent_hash(url, tordata)
time.sleep(10)
utorrent.labelTorrent(hash)
return "pass"

View file

@ -3585,7 +3585,10 @@ class WebInterface(object):
"nzbget_cat": mylar.NZBGET_CATEGORY,
"nzbget_priority": mylar.NZBGET_PRIORITY,
"nzbget_directory": mylar.NZBGET_DIRECTORY,
"use_utorrent":helpers.checked(mylar.USE_UTORRENT),
"torrent_downloader_watchlist": helpers.radio(mylar.TORRENT_DOWNLOADER, 0),
"torrent_downloader_utorrent": helpers.radio(mylar.TORRENT_DOWNLOADER, 1),
"torrent_downloader_rtorrent": helpers.radio(mylar.TORRENT_DOWNLOADER, 2),
"torrent_downloader_seedbox": helpers.radio(mylar.TORRENT_DOWNLOADER, 3),
"utorrent_host": mylar.UTORRENT_HOST,
"utorrent_username": mylar.UTORRENT_USERNAME,
"utorrent_password": mylar.UTORRENT_PASSWORD,
@ -3618,9 +3621,7 @@ class WebInterface(object):
"provider_order": mylar.PROVIDER_ORDER,
"enable_torrents": helpers.checked(mylar.ENABLE_TORRENTS),
"minseeds": mylar.MINSEEDS,
"torrent_local": helpers.checked(mylar.TORRENT_LOCAL),
"local_watchdir": mylar.LOCAL_WATCHDIR,
"torrent_seedbox": helpers.checked(mylar.TORRENT_SEEDBOX),
"seedbox_watchdir": mylar.SEEDBOX_WATCHDIR,
"seedbox_host": mylar.SEEDBOX_HOST,
"seedbox_port": mylar.SEEDBOX_PORT,
@ -3912,9 +3913,9 @@ class WebInterface(object):
usenet_retention=None, nzbsu=0, nzbsu_uid=None, nzbsu_apikey=None, nzbsu_verify=0, dognzb=0, dognzb_apikey=None, dognzb_verify=0, newznab=0, newznab_host=None, newznab_name=None, newznab_verify=0, newznab_apikey=None, newznab_uid=None, newznab_enabled=0,
enable_torznab=0, torznab_name=None, torznab_host=None, torznab_apikey=None, torznab_category=None, experimental=0, check_folder=None, enable_check_folder=0,
enable_meta=0, cbr2cbz_only=0, cmtagger_path=None, ct_tag_cr=0, ct_tag_cbl=0, ct_cbz_overwrite=0, unrar_cmd=None, enable_rss=0, rss_checkinterval=None, failed_download_handling=0, failed_auto=0, enable_torrent_search=0, enable_kat=0, enable_32p=0, mode_32p=0, rssfeed_32p=None, passkey_32p=None, username_32p=None, password_32p=None, snatchedtorrent_notify=0,
enable_torrents=0, minseeds=0, torrent_local=0, local_watchdir=None, torrent_seedbox=0, seedbox_watchdir=None, seedbox_user=None, seedbox_pass=None, seedbox_host=None, seedbox_port=None,
enable_torrents=0, minseeds=0, local_watchdir=None, seedbox_watchdir=None, seedbox_user=None, seedbox_pass=None, seedbox_host=None, seedbox_port=None,
prowl_enabled=0, prowl_onsnatch=0, prowl_keys=None, prowl_priority=None, nma_enabled=0, nma_apikey=None, nma_priority=0, nma_onsnatch=0, pushover_enabled=0, pushover_onsnatch=0, pushover_apikey=None, pushover_userkey=None, pushover_priority=None, boxcar_enabled=0, boxcar_onsnatch=0, boxcar_token=None,
pushbullet_enabled=0, pushbullet_apikey=None, pushbullet_deviceid=None, pushbullet_onsnatch=0, use_utorrent=0, utorrent_host=None, utorrent_username=None, utorrent_password=None, utorrent_label=None,
pushbullet_enabled=0, pushbullet_apikey=None, pushbullet_deviceid=None, pushbullet_onsnatch=0, torrent_downloader=0, utorrent_host=None, utorrent_username=None, utorrent_password=None, utorrent_label=None,
preferred_quality=0, move_files=0, rename_files=0, add_to_csv=1, cvinfo=0, lowercase_filenames=0, folder_format=None, file_format=None, enable_extra_scripts=0, extra_scripts=None, enable_pre_scripts=0, pre_scripts=None, post_processing=0, file_opts=None, syno_fix=0, search_delay=None, chmod_dir=0777, chmod_file=0660, chowner=None, chgroup=None,
tsab=None, destination_dir=None, create_folders=1, replace_spaces=0, replace_char=None, use_minsize=0, minsize=None, use_maxsize=0, maxsize=None, autowant_all=0, autowant_upcoming=0, comic_cover_local=0, zero_level=0, zero_level_n=None, interface=None, dupeconstraint=None, ddump=0, duplicate_dump=None, **kwargs):
mylar.COMICVINE_API = comicvine_api
@ -3979,15 +3980,16 @@ class WebInterface(object):
mylar.RSS_CHECKINTERVAL = rss_checkinterval
mylar.ENABLE_TORRENTS = int(enable_torrents)
mylar.MINSEEDS = int(minseeds)
mylar.TORRENT_LOCAL = int(torrent_local)
mylar.TORRENT_DOWNLOADER = int(torrent_downloader)
#mylar.TORRENT_LOCAL = int(torrent_local)
mylar.LOCAL_WATCHDIR = local_watchdir
mylar.TORRENT_SEEDBOX = int(torrent_seedbox)
#mylar.TORRENT_SEEDBOX = int(torrent_seedbox)
mylar.SEEDBOX_WATCHDIR = seedbox_watchdir
mylar.SEEDBOX_HOST = seedbox_host
mylar.SEEDBOX_PORT = seedbox_port
mylar.SEEDBOX_USER = seedbox_user
mylar.SEEDBOX_PASS = seedbox_pass
mylar.USE_UTORRENT = int(use_utorrent)
#mylar.USE_UTORRENT = int(use_utorrent)
mylar.UTORRENT_HOST = utorrent_host
mylar.UTORRENT_USERNAME = utorrent_username
mylar.UTORRENT_PASSWORD = utorrent_password
@ -4148,6 +4150,11 @@ class WebInterface(object):
if mylar.NZB_DOWNLOADER == 0: mylar.USE_SABNZBD = True
elif mylar.NZB_DOWNLOADER == 1: mylar.USE_NZBGET = True
elif mylar.NZB_DOWNLOADER == 2: mylar.USE_BLACKHOLE = True
if mylar.TORRENT_DOWNLOADER == 0: mylar.TORRENT_LOCAL = True
elif mylar.TORRENT_DOWNLOADER == 1: mylar.USE_UTORRENT = True
elif mylar.TORRENT_DOWNLOADER == 2: mylar.USE_RTORRENT = True
elif mylar.TORRENT_DOWNLOADER == 3: mylar.USE_SEEDBOX = True
# Write the config
mylar.config_write()