mirror of
https://github.com/lazylibrarian/LazyLibrarian.git
synced 2026-01-25 22:28:04 -05:00
2157 lines
100 KiB
HTML
2157 lines
100 KiB
HTML
<%inherit file="base.html"/>
|
|
<%!
|
|
import lazylibrarian
|
|
%>
|
|
|
|
<%def name="headerIncludes()">
|
|
<div id="subhead_container">
|
|
<ul id="subhead_menu">
|
|
<li><a onclick="self.shutdownQA(this)" id="button">Shutdown</a></li>
|
|
<li><a id="button" onclick="self.restartQA(this, '', '')">Restart</a></li>
|
|
<li ><a id="button" href="checkForUpdates">Check Version</a></li>
|
|
</ul>
|
|
</div>
|
|
</%def>
|
|
<%def name="body()">
|
|
<BR>
|
|
<h1>  Config</h1>
|
|
<form action="configUpdate" method="post">
|
|
<div id="form">
|
|
<div id="tabs">
|
|
<ul>
|
|
<li role='presentation' id="1" ><a href="#tabs-1">Interface</a></li>
|
|
<li role='presentation' id="2" ><a href="#tabs-2">Importing</a></li>
|
|
<li role='presentation' id="3" ><a href="#tabs-3">Downloaders</a></li>
|
|
<li role='presentation' id="4" ><a href="#tabs-4">Providers</a></li>
|
|
<li role='presentation' id="5" ><a href="#tabs-5">Processing</a></li>
|
|
<li role='presentation' id="6" ><a href="#tabs-6">Notifications</a></li>
|
|
<li role='presentation' id="7" ><a href="#tabs-7">Categories</a></li>
|
|
<li role='presentation' id="8" ><a href="#tabs-8">Filters</a></li>
|
|
</ul>
|
|
</div>
|
|
<div class="table_wrapper">
|
|
|
|
<div class="tabs-1">
|
|
<table class="configtable" summary="Webinterface">
|
|
<tr>
|
|
<td>
|
|
<div>
|
|
<input type="text" id="current_tab" name="current_tab" value="${lazylibrarian.CURRENT_TAB}" class="hidden">
|
|
<label>Hostname:</label><input type="text" name="http_host" value="${lazylibrarian.HTTP_HOST}" size="20">
|
|
</div>
|
|
<div>
|
|
<label>Port:</label><input type="text" name="http_port" value="${lazylibrarian.HTTP_PORT}" size="10">
|
|
</div>
|
|
<label>Web Root:</label><input type="text" name="http_root" value="${lazylibrarian.HTTP_ROOT}" size="20">
|
|
<%
|
|
if lazylibrarian.HTTP_PROXY == True:
|
|
checked = 'checked="checked"'
|
|
else:
|
|
checked = ''
|
|
%>
|
|
<BR>
|
|
<input type="checkbox" id="http_proxy" name="http_proxy" value=1 ${checked} />
|
|
<label> Enable http proxy</label>
|
|
<%
|
|
if lazylibrarian.HTTPS_ENABLED == True:
|
|
checked = 'checked="checked"'
|
|
else:
|
|
checked = ''
|
|
%>
|
|
<BR>
|
|
<input type="checkbox" id="https_enabled" name="https_enabled" value=1 ${checked} />
|
|
<label> Enable https</label>
|
|
<fieldset id="https_options">
|
|
<label>Https Certificate:</label><input type="text" name="https_cert" value="${lazylibrarian.HTTPS_CERT}" size="20">
|
|
<br>
|
|
<label>Https Key:</label><input type="text" name="https_key" value="${lazylibrarian.HTTPS_KEY}" size="20">
|
|
</fieldset>
|
|
<br>
|
|
<br>
|
|
<label>Logdir:</label><input type="text" name="logdir" value="${lazylibrarian.LOGDIR}" size="26"><br>
|
|
<label>Log Limit:</label><input type="text" name="loglimit" value="${lazylibrarian.LOGLIMIT}" size="4"><br>
|
|
<i class="smalltext">Size of on-screen log, smaller is faster and uses less memory</i><br>
|
|
<label>Log Level:</label><input type="text" name="loglevel" value="${lazylibrarian.LOGLEVEL}" size="4"><br>
|
|
<i class="smalltext">0=Quiet, 1=Normal, 2=Debug, >2=file/console log always set to debug (ignores toggle)</i>
|
|
<br>
|
|
<label>Table Display Length:</label>
|
|
<select name="displaylength">
|
|
%for displaylength in [5, 10, 15, 25, 50, 100, -1]:
|
|
<%
|
|
if displaylength == lazylibrarian.DISPLAYLENGTH:
|
|
selected = 'selected="selected"'
|
|
else:
|
|
selected = ''
|
|
%>
|
|
<option value="${displaylength}" ${selected}>${displaylength}</option>
|
|
%endfor
|
|
</select><br>
|
|
<i class="smalltext">Use -1 to display all rows</i>
|
|
<br>
|
|
<div>
|
|
<label>Proxy Host:</label><input type="text" name="proxy_host" value="${lazylibrarian.PROXY_HOST}" size="20"><br>
|
|
<i class="smalltext">Set this value if you are behind a proxy</i>
|
|
</div>
|
|
<br>
|
|
<div>
|
|
<label>Proxy Type:</label><input type="text" name="proxy_type" value="${lazylibrarian.PROXY_TYPE}" size="10"><br>
|
|
<i class="smalltext">http, https, etc</i>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<div>
|
|
<label>Username:</label><input type="text" name="http_user" value="${lazylibrarian.HTTP_USER}" size="20">
|
|
</div>
|
|
<div>
|
|
<label>Password:</label><input type="password" name="http_pass" value="${lazylibrarian.HTTP_PASS}" size="20">
|
|
</div>
|
|
<%
|
|
if lazylibrarian.LAUNCH_BROWSER == True:
|
|
checked = 'checked="checked"'
|
|
else:
|
|
checked = ''
|
|
%>
|
|
<input type="checkbox" name="launch_browser" value=1 ${checked} />
|
|
<label> Launch browser</label>
|
|
<%
|
|
if lazylibrarian.API_ENABLED == True:
|
|
checked = 'checked="checked"'
|
|
else:
|
|
checked = ''
|
|
%>
|
|
<div class="row checkbox">
|
|
<input type="checkbox" id="api_enabled" name="api_enabled" value=1 ${checked} />
|
|
<label title="Allow remote applications to interface with LazyLibrarian">
|
|
Enable API
|
|
</label>
|
|
</div>
|
|
<fieldset id="api_options">
|
|
<div id="api_options" class="row">
|
|
<label>API key</label>
|
|
<input type="text" name="api_key" id="api_key" value="${lazylibrarian.API_KEY}" size="36">
|
|
<input type="button" value="Generate" id="generateAPI" onClick="document.location.reload(true)">
|
|
<br><small>Current API key: <strong>${lazylibrarian.API_KEY}</strong></small>
|
|
</div>
|
|
</fieldset>
|
|
<h5>Interface: <select name="http_look" style="float:right;"></h5>
|
|
%for http_look in config['http_look_list']:
|
|
<%
|
|
if http_look == lazylibrarian.HTTP_LOOK:
|
|
selected = 'selected="selected"'
|
|
else:
|
|
selected = ''
|
|
%>
|
|
<option value="${http_look}" ${selected}>${http_look}</option>
|
|
%endfor
|
|
</select>
|
|
<br>
|
|
<div class="row">
|
|
<input type="button" value="Show Jobs" id="show_Jobs" />
|
|
<input type="button" value="Restart Jobs" id="restart_Jobs" />
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="table_wrapper" style="display:none">
|
|
<div class="tabs-2">
|
|
<table class="configtable" summary="Importsettings">
|
|
<tr>
|
|
<td>
|
|
<h3>Book API</h3>
|
|
<BR>
|
|
<%
|
|
if lazylibrarian.BOOK_API == "GoodReads":
|
|
gr_selected = 'selected="selected"'
|
|
else:
|
|
gr_selected = ''
|
|
|
|
if lazylibrarian.BOOK_API == "GoogleBooks":
|
|
gb_selected = 'selected="selected"'
|
|
else:
|
|
gb_selected = ''
|
|
%>
|
|
<label>Book Search API .</label><select name="book_api" style="float:right;">
|
|
<option value = "GoodReads" ${gr_selected}>GoodReads</option>
|
|
<option value = "GoogleBooks" ${gb_selected}>GoogleBooks</option>
|
|
</select>
|
|
<BR>
|
|
<label>Goodreads API:</label><input type="text" name="gr_api" value="${lazylibrarian.GR_API}" size="30">
|
|
<BR>
|
|
<label>GoogleBooks API:</label><input type="text" name="gb_api" value="${lazylibrarian.GB_API}" size="30">
|
|
<BR><br><br>
|
|
<h3>File Formats</h3>
|
|
<BR>
|
|
<label>Ebooks:</label><input type="text" name="ebook_type" value="${lazylibrarian.EBOOK_TYPE}" size="0">
|
|
<br>
|
|
<small>Comma separated file extensions:
|
|
<BR>Default: epub, mobi, pdf </small>
|
|
<BR>
|
|
<label>Magazines:</label>
|
|
<input type="text" name="mag_type" value="${lazylibrarian.MAG_TYPE}" size="20">
|
|
<br>
|
|
<small>Comma separated file extensions:
|
|
<BR>Default: pdf </small>
|
|
</td>
|
|
<td>
|
|
<h3>Language</h3>
|
|
<BR>
|
|
<label>Import languages:</label><input type="text" name="imp_preflang" value="${lazylibrarian.IMP_PREFLANG}" size="20">
|
|
<br>
|
|
<i class="smalltext">Comma separated country shortcodes:
|
|
<br> GoodReads e.g: eng, en-US, spa, ita
|
|
<BR> GoogleBooks e.g: en, es, it
|
|
<BR> Default: en, eng, en-US, en-GB
|
|
<BR> Try adding "Unknown" to list if GoodReads is missing results, or "All" if you don't want to check for language</i>
|
|
<BR><BR>
|
|
<label>Languages for month names:</label><input type="text" name="imp_monthlang" value="${lazylibrarian.IMP_MONTHLANG}" size="20">
|
|
<br><i class="smalltext">Comma separated language codes for magazine issues:
|
|
<br> e.g: fr_FR.utf8, es_ES.utf8
|
|
<BR>Default: blank, English month names are preloaded Changes to this setting require a restart</i>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="table_wrapper" style="display:none">
|
|
<div class="tabs-3">
|
|
<table class="configtable" summary="Downloadsettings">
|
|
<tr>
|
|
<td>
|
|
<fieldset>
|
|
<h3>Usenet</h3>
|
|
<fieldset id="usenet_options">
|
|
<div class="row checkbox">
|
|
<%
|
|
if lazylibrarian.NZB_DOWNLOADER_SABNZBD == True:
|
|
checked = 'checked="checked"'
|
|
else:
|
|
checked = ''
|
|
%>
|
|
<input type="checkbox" name="nzb_downloader_sabnzbd" id="nzb_downloader_sabnzbd" value="1" ${checked} />
|
|
<label>Use Sabnzbd+</label>
|
|
</div>
|
|
<fieldset id="sabnzbd_options">
|
|
<div class="row">
|
|
<label>SABnzbd Host:</label>
|
|
<input type="text" name="sab_host" value="${lazylibrarian.SAB_HOST}" size="26" align="right">
|
|
</div>
|
|
<div class="row">
|
|
<label>SABnzbd Port:</label>
|
|
<input type="text" name="sab_port" value="${lazylibrarian.SAB_PORT}" size="26">
|
|
</div>
|
|
<div class="row">
|
|
<label>SABnzbd Username</label>
|
|
<input type="text" name="sab_user" value="${lazylibrarian.SAB_USER}" size="26">
|
|
</div>
|
|
<div class="row">
|
|
<label>SABnzbd Password:</label>
|
|
<input type="password" name="sab_pass" value="${lazylibrarian.SAB_PASS}" size="26">
|
|
</div>
|
|
<div class="row">
|
|
<label>SABnzbd API:</label>
|
|
<input type="text" name="sab_api" value="${lazylibrarian.SAB_API}" size="26">
|
|
</div>
|
|
<div class="row">
|
|
<label>SABnzbd Category:</label>
|
|
<input type="text" name="sab_cat" value="${lazylibrarian.SAB_CAT}" size="26">
|
|
</div>
|
|
<div class="row">
|
|
<label>SABnzbd SubDir:</label>
|
|
<input type="text" name="sab_subdir" value="${lazylibrarian.SAB_SUBDIR}" size="26">
|
|
</div>
|
|
<div class="row">
|
|
<label>Retention Max Age:</label>
|
|
<input type="text" name="usenet_retention" value="${lazylibrarian.USENET_RETENTION}" size="26">
|
|
</div>
|
|
<div class="row">
|
|
<label>SABnzb Connection:</label>
|
|
<input type="button" value="Test SABnzbd" id="testSABnzbd" style="float:right;">
|
|
</div>
|
|
</fieldset>
|
|
|
|
<div class="row checkbox">
|
|
<%
|
|
if lazylibrarian.NZB_DOWNLOADER_NZBGET == True:
|
|
checked = 'checked="checked"'
|
|
else:
|
|
checked = ''
|
|
%>
|
|
<input type="checkbox" name="nzb_downloader_nzbget" id="nzb_downloader_nzbget" value="1" ${checked} />
|
|
<label>Use NZBGet</label>
|
|
</div>
|
|
<fieldset id="nzbget_options">
|
|
<div class="row">
|
|
<label>NZBGet Host:</label>
|
|
<input type="text" name="nzbget_host" value="${lazylibrarian.NZBGET_HOST}" size="26" align="right">
|
|
</div>
|
|
<div class="row">
|
|
<label>NZBGet Port</label>
|
|
<input type="text" name="nzbget_port" value="${lazylibrarian.NZBGET_PORT}" size="26">
|
|
</div>
|
|
<div class="row">
|
|
<label>NZBGet Username</label>
|
|
<input type="text" name="nzbget_user" value="${lazylibrarian.NZBGET_USER}" size="26">
|
|
</div>
|
|
<div class="row">
|
|
<label>NZBGet Password:</label>
|
|
<input type="password" name="nzbget_pass" value="${lazylibrarian.NZBGET_PASS}" size="26">
|
|
</div>
|
|
<div class="row">
|
|
<label>NZBGet Category:</label>
|
|
<input type="text" name="nzbget_cat" value="${lazylibrarian.NZBGET_CATEGORY}" size="26">
|
|
</div>
|
|
<div class="row">
|
|
<label>NZBGet Priority:</label>
|
|
<input type="text" name="nzbget_priority" value="${lazylibrarian.NZBGET_PRIORITY}" size="26">
|
|
</div>
|
|
<div class="row">
|
|
<label>NZBget Connection:</label>
|
|
<input type="button" value="Test NZBget" id="testNZBget" style="float:right;">
|
|
</div>
|
|
</fieldset>
|
|
|
|
<div class="row checkbox">
|
|
<%
|
|
if lazylibrarian.USE_SYNOLOGY == True:
|
|
checked = 'checked="checked"'
|
|
else:
|
|
checked = ''
|
|
%>
|
|
<input type="checkbox" name="use_synology" id="use_synology" value="1" ${checked} />
|
|
<label>Use Synology DownloadStation</label>
|
|
</div>
|
|
<fieldset id="synology_options">
|
|
<div class="row">
|
|
<label>Synology Host:</label>
|
|
<input type="text" name="synology_host" value="${lazylibrarian.SYNOLOGY_HOST}" size="26" align="right">
|
|
</div>
|
|
<div class="row">
|
|
<label>Synology Port</label>
|
|
<input type="text" name="synology_port" value="${lazylibrarian.SYNOLOGY_PORT}" size="26">
|
|
</div>
|
|
<div class="row">
|
|
<label>Synology Username</label>
|
|
<input type="text" name="synology_user" value="${lazylibrarian.SYNOLOGY_USER}" size="26">
|
|
</div>
|
|
<div class="row">
|
|
<label>Synology Password:</label>
|
|
<input type="password" name="synology_pass" value="${lazylibrarian.SYNOLOGY_PASS}" size="26">
|
|
</div>
|
|
<div class="row">
|
|
<label>Synology Directory:</label>
|
|
<input type="text" name="synology_dir" value="${lazylibrarian.SYNOLOGY_DIR}" size="26">
|
|
</div>
|
|
<div class="row checkbox">
|
|
<%
|
|
if lazylibrarian.NZB_DOWNLOADER_SYNOLOGY == True:
|
|
checked = 'checked="checked"'
|
|
else:
|
|
checked = ''
|
|
%>
|
|
<input type="checkbox" name="nzb_downloader_synology" id="nzb_downloader_synology" value="1" ${checked} />
|
|
<label>Use DownloadStation for usenet</label>
|
|
</div>
|
|
<div class="row checkbox">
|
|
<%
|
|
if lazylibrarian.TOR_DOWNLOADER_SYNOLOGY == True:
|
|
checked = 'checked="checked"'
|
|
else:
|
|
checked = ''
|
|
%>
|
|
<input type="checkbox" name="tor_downloader_synology" id="tor_downloader_synology" value="1" ${checked} />
|
|
<label>Use DownloadStation for torrents</label>
|
|
</div>
|
|
<div class="row">
|
|
<label>Synology Connection:</label>
|
|
<input type="button" value="Test Synology" id="testSynology" style="float:right;">
|
|
</div>
|
|
</fieldset>
|
|
|
|
<div class="row checkbox">
|
|
<%
|
|
if lazylibrarian.NZB_DOWNLOADER_BLACKHOLE == True:
|
|
checked = 'checked="checked"'
|
|
else:
|
|
checked = ''
|
|
%>
|
|
<input type="checkbox" name="nzb_downloader_blackhole" id="nzb_downloader_blackhole" value="1" ${checked} />
|
|
<label>Use NZB Blackhole</label>
|
|
</div>
|
|
<fieldset id="nzb_blackhole_options">
|
|
<div class="row">
|
|
<label>NZB Blackhole Directory:</label>
|
|
<input type="text" name="nzb_blackholedir" value="${lazylibrarian.NZB_BLACKHOLEDIR}" size="26">
|
|
</fieldset>
|
|
</fieldset>
|
|
</fieldset>
|
|
</td>
|
|
<td>
|
|
<fieldset>
|
|
<h3>Torrents</h3>
|
|
<fieldset id="torrent_options">
|
|
|
|
<div class="row checkbox">
|
|
<%
|
|
if lazylibrarian.TOR_DOWNLOADER_DELUGE == True:
|
|
checked = 'checked="checked"'
|
|
else:
|
|
checked = ''
|
|
%>
|
|
<input type="checkbox" name="tor_downloader_deluge" id="tor_downloader_deluge" value="1" ${checked} />
|
|
<label>Use Deluge</label>
|
|
</div>
|
|
<fieldset id="deluge_options">
|
|
<div class="row">
|
|
<label>Deluge Host:</label>
|
|
<input type="text" name="deluge_host" value="${lazylibrarian.DELUGE_HOST}" size="26">
|
|
</div>
|
|
<div class="row">
|
|
<label>Deluge Port:</label>
|
|
<input type="text" name="deluge_port" value="${lazylibrarian.DELUGE_PORT}" size="26">
|
|
</div>
|
|
<div class="row">
|
|
<label>Username:</label>
|
|
<input type="text" name="deluge_user" value="${lazylibrarian.DELUGE_USER}" size="26">
|
|
</div>
|
|
<div class="row">
|
|
<label>Password:</label>
|
|
<input type="password" name="deluge_pass" value="${lazylibrarian.DELUGE_PASS}" size="26">
|
|
</div>
|
|
<div class="row">
|
|
<label>Deluge Label:</label>
|
|
<input type="text" name="deluge_label" value="${lazylibrarian.DELUGE_LABEL}" size="26">
|
|
</div>
|
|
<div class="row">
|
|
<input type="button" value="Test Deluge" id="testDeluge" style="float:right;">
|
|
</div>
|
|
</fieldset>
|
|
|
|
<div class="row checkbox">
|
|
<%
|
|
if lazylibrarian.TOR_DOWNLOADER_TRANSMISSION == True:
|
|
checked = 'checked="checked"'
|
|
else:
|
|
checked = ''
|
|
%>
|
|
<input type="checkbox" name="tor_downloader_transmission" id="tor_downloader_transmission" value="1" ${checked} />
|
|
<label>Use Transmission</label>
|
|
</div>
|
|
<fieldset id="transmission_options">
|
|
<div class="row">
|
|
<label>Transmission Host:</label>
|
|
<input type="text" name="transmission_host" value="${lazylibrarian.TRANSMISSION_HOST}" size="26">
|
|
</div>
|
|
<div class="row">
|
|
<label>Transmission Port :</label>
|
|
<input type="text" name="transmission_port" value="${lazylibrarian.TRANSMISSION_PORT}" size="26">
|
|
</div>
|
|
<div class="row">
|
|
<label>Username :</label>
|
|
<input type="text" name="transmission_user" value="${lazylibrarian.TRANSMISSION_USER}" size="26">
|
|
</div>
|
|
<div class="row">
|
|
<label>Password :</label>
|
|
<input type="password" name="transmission_pass" value="${lazylibrarian.TRANSMISSION_PASS}" size="26">
|
|
</div>
|
|
<div class="row">
|
|
<input type="button" value="Test Transmission" id="testTransmission" style="float:right;">
|
|
</div>
|
|
</fieldset>
|
|
|
|
<div class="row checkbox">
|
|
<%
|
|
if lazylibrarian.TOR_DOWNLOADER_RTORRENT == True:
|
|
checked = 'checked="checked"'
|
|
else:
|
|
checked = ''
|
|
%>
|
|
<input type="checkbox" name="tor_downloader_rtorrent" id="tor_downloader_rtorrent" value="1" ${checked} />
|
|
<label>Use rTorrent</label>
|
|
</div>
|
|
<fieldset id="rtorrent_options">
|
|
<div class="row">
|
|
<label>rTorrent Host:</label>
|
|
<input type="text" name="rtorrent_host" value="${lazylibrarian.RTORRENT_HOST}" size="26">
|
|
</div>
|
|
<div class="row">
|
|
<label>rTorrent User:</label>
|
|
<input type="text" name="rtorrent_user" value="${lazylibrarian.RTORRENT_USER}" size="26">
|
|
</div>
|
|
<div class="row">
|
|
<label>rTorrent Password:</label>
|
|
<input type="text" name="rtorrent_pass" value="${lazylibrarian.RTORRENT_PASS}" size="26">
|
|
</div>
|
|
<div class="row">
|
|
<label>rTorrent Label:</label>
|
|
<input type="text" name="rtorrent_label" value="${lazylibrarian.RTORRENT_LABEL}" size="26">
|
|
</div>
|
|
<div class="row">
|
|
<label>rTorrent Directory:</label>
|
|
<input type="text" name="rtorrent_dir" value="${lazylibrarian.RTORRENT_DIR}" size="26">
|
|
<br><small>
|
|
Leave rTorrent directory blank to use rtorrent defaults
|
|
</small>
|
|
</div>
|
|
<div class="row">
|
|
<input type="button" value="Test rTorrent" id="testrTorrent" style="float:right;">
|
|
</div>
|
|
</fieldset>
|
|
|
|
|
|
<div class="row checkbox">
|
|
<%
|
|
if lazylibrarian.TOR_DOWNLOADER_UTORRENT == True:
|
|
checked = 'checked="checked"'
|
|
else:
|
|
checked = ''
|
|
%>
|
|
<input type="checkbox" name="tor_downloader_utorrent" id="tor_downloader_utorrent" value="1" ${checked} />
|
|
<label>Use uTorrent</label>
|
|
</div>
|
|
<fieldset id="utorrent_options">
|
|
<div class="row">
|
|
<label>uTorrent Host:</label>
|
|
<input type="text" name="utorrent_host" value="${lazylibrarian.UTORRENT_HOST}" size="26">
|
|
</div>
|
|
<div class="row">
|
|
<label>uTorrent Port:</label>
|
|
<input type="text" name="utorrent_port" value="${lazylibrarian.UTORRENT_PORT}" size="26">
|
|
</div>
|
|
<div class="row">
|
|
<label>Username:</label>
|
|
<input type="text" name="utorrent_user" value="${lazylibrarian.UTORRENT_USER}" size="26">
|
|
</div>
|
|
<div class="row">
|
|
<label>Password:</label>
|
|
<input type="password" name="utorrent_pass" value="${lazylibrarian.UTORRENT_PASS}" size="26">
|
|
</div>
|
|
<div class="row">
|
|
<label>uTorrent Label:</label>
|
|
<input type="text" name="utorrent_label" value="${lazylibrarian.UTORRENT_LABEL}" size="26">
|
|
</div>
|
|
<div class="row">
|
|
<input type="button" value="Test uTorrent" id="testuTorrent" style="float:right;">
|
|
</div>
|
|
</fieldset>
|
|
<div class="row checkbox">
|
|
<%
|
|
if lazylibrarian.TOR_DOWNLOADER_QBITTORRENT == True:
|
|
checked = 'checked="checked"'
|
|
else:
|
|
checked = ''
|
|
%>
|
|
<input type="checkbox" name="tor_downloader_qbittorrent" id="tor_downloader_qbittorrent" value="1" ${checked} />
|
|
<label>Use qBittorrent</label>
|
|
</div>
|
|
<fieldset id="qbittorrent_options">
|
|
<div class="row">
|
|
<label>qBittorrent Host:</label>
|
|
<input type="text" name="qbittorrent_host" value="${lazylibrarian.QBITTORRENT_HOST}" size="26">
|
|
</div>
|
|
<div class="row">
|
|
<label>qBittorrent Port:</label>
|
|
<input type="text" name="qbittorrent_port" value="${lazylibrarian.QBITTORRENT_PORT}" size="26">
|
|
</div>
|
|
<div class="row">
|
|
<label>Username:</label>
|
|
<input type="text" name="qbittorrent_user" value="${lazylibrarian.QBITTORRENT_USER}" size="26">
|
|
</div>
|
|
<div class="row">
|
|
<label>Password:</label>
|
|
<input type="password" name="qbittorrent_pass" value="${lazylibrarian.QBITTORRENT_PASS}" size="26">
|
|
</div>
|
|
<div class="row">
|
|
<label>qBittorrent Label:</label>
|
|
<input type="text" name="qbittorrent_label" value="${lazylibrarian.QBITTORRENT_LABEL}" size="26">
|
|
</div>
|
|
<div class="row">
|
|
<input type="button" value="Test qBittorrent" id="testqBittorrent" style="float:right;">
|
|
</div>
|
|
</fieldset>
|
|
<div class="row checkbox">
|
|
<%
|
|
if lazylibrarian.TOR_DOWNLOADER_BLACKHOLE == True:
|
|
checked = 'checked="checked"'
|
|
else:
|
|
checked = ''
|
|
%>
|
|
<input type="checkbox" name="tor_downloader_blackhole" id="tor_downloader_blackhole" value="1" ${checked} />
|
|
<label>Use Torrent Blackhole</label>
|
|
</div>
|
|
<fieldset id="tor_blackhole_options">
|
|
<div class="row">
|
|
<label>Torrent Blackhole Directory:</label>
|
|
<input type="text" name="torrent_dir" value="${lazylibrarian.TORRENT_DIR}" size="26">
|
|
</div>
|
|
<div class="row checkbox">
|
|
<%
|
|
if lazylibrarian.TOR_CONVERT_MAGNET == True:
|
|
checked = 'checked="checked"'
|
|
else:
|
|
checked = ''
|
|
%>
|
|
<input type="checkbox" name="tor_convert_magnet" id="tor_convert_magnet" value="1" ${checked} />
|
|
<label>Convert magnet links into torrent files</label>
|
|
</div>
|
|
</fieldset>
|
|
<div>
|
|
<label>Minimum seeders:</label>
|
|
<input type="text" name="numberofseeders" value="${lazylibrarian.NUMBEROFSEEDERS}" size="5">
|
|
<BR>
|
|
<small>Number of minimum seeders a torrent must have to be accepted</small>
|
|
</div>
|
|
<div class="row checkbox">
|
|
<%
|
|
if lazylibrarian.KEEP_SEEDING == True:
|
|
checked = 'checked="checked"'
|
|
else:
|
|
checked = ''
|
|
%>
|
|
<input type="checkbox" name="keep_seeding" id="keep_seeding" value="1" ${checked} />
|
|
<label>Keep seeding after processing</label>
|
|
</div>
|
|
|
|
</fieldset>
|
|
<br>
|
|
<h3>Download Settings</h3>
|
|
<div class="row">
|
|
<label>Directory:</label><input type="text" name="download_dir" value="${lazylibrarian.DOWNLOAD_DIR}" size="26">
|
|
<BR>
|
|
<small>Full path to the folder where books are downloaded</small>
|
|
</div>
|
|
</fieldset>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="table_wrapper" style="display:none">
|
|
<div class="tabs-4">
|
|
<table class="configtable" summary="Providers">
|
|
<tr>
|
|
<td>
|
|
<fieldset id="newznab_options">
|
|
<h3>Newznab Providers</h3>
|
|
<br>
|
|
%for prov in lazylibrarian.NEWZNAB_PROV:
|
|
<%
|
|
if prov['ENABLED'] == True:
|
|
checked = 'checked="checked"'
|
|
else:
|
|
checked = ''
|
|
%>
|
|
<input type="checkbox" name="newznab[${loop.index}][enabled]" value=1 ${checked} style="margin-bottom:4px;" />
|
|
<input type="text" placeholder="Enter API Here" name="newznab[${loop.index}][api]" value="${prov['API']}" size="26" class="providers-input">
|
|
<input type="text" placeholder="Enter URL Here" name="newznab[${loop.index}][host]" value="${prov['HOST']}" size="26" class="providers-input">
|
|
<br>
|
|
%endfor
|
|
</fieldset>
|
|
</td>
|
|
<td>
|
|
<fieldset id="torznab_options">
|
|
<h3>Torznab Providers</h3>
|
|
<br>
|
|
%for prov in lazylibrarian.TORZNAB_PROV:
|
|
<%
|
|
if prov['ENABLED'] == True:
|
|
checked = 'checked="checked"'
|
|
else:
|
|
checked = ''
|
|
%>
|
|
<input type="checkbox" name="torznab[${loop.index}][enabled]" value=1 ${checked} style="margin-bottom:4px;" />
|
|
<input type="text" placeholder="Enter API Here" name="torznab[${loop.index}][api]" value="${prov['API']}" size="26" class="providers-input">
|
|
<input type="text" placeholder="Enter URL Here" name="torznab[${loop.index}][host]" value="${prov['HOST']}" size="26" class="providers-input">
|
|
<br>
|
|
%endfor
|
|
</fieldset>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<fieldset id="rss_options">
|
|
<h3>RSS Providers</h3>
|
|
<br>
|
|
%for prov in lazylibrarian.RSS_PROV:
|
|
<%
|
|
if prov['ENABLED'] == True:
|
|
checked = 'checked="checked"'
|
|
else:
|
|
checked = ''
|
|
%>
|
|
<input type="checkbox" name="rss[${loop.index}][enabled]" value=1 ${checked} style="margin-bottom:4px;" />
|
|
<input type="text" placeholder="Enter URL Here" name="rss[${loop.index}][host]" value="${prov['HOST']}" size="58" class="providers-rss-input"><br>
|
|
<br>
|
|
%endfor
|
|
</fieldset>
|
|
</td>
|
|
<td>
|
|
<h3>Torrent Providers</h3><br>
|
|
<%
|
|
if lazylibrarian.KAT == True:
|
|
checked = 'checked="checked"'
|
|
else:
|
|
checked = ''
|
|
%>
|
|
<input type="checkbox" name="kat" value=1 ${checked} style="margin-bottom:4px;" /> kickass
|
|
<input type="text" placeholder="Enter URL Here" name="kat_host" value="${lazylibrarian.KAT_HOST}" size="26">
|
|
<br>
|
|
<%
|
|
if lazylibrarian.TPB == True:
|
|
checked = 'checked="checked"'
|
|
else:
|
|
checked = ''
|
|
%>
|
|
<input type="checkbox" name="tpb" value=1 ${checked} style="margin-bottom:4px;" /> piratebay
|
|
<input type="text" placeholder="Enter URL Here" name="tpb_host" value="${lazylibrarian.TPB_HOST}" size="26">
|
|
<br>
|
|
<%
|
|
if lazylibrarian.ZOO == True:
|
|
checked = 'checked="checked"'
|
|
else:
|
|
checked = ''
|
|
%>
|
|
<input type="checkbox" name="zoo" value=1 ${checked} style="margin-bottom:4px;" /> zooqle
|
|
<input type="text" placeholder="Enter URL Here" name="zoo_host" value="${lazylibrarian.ZOO_HOST}" size="26">
|
|
<br>
|
|
<%
|
|
if lazylibrarian.TDL == True:
|
|
checked = 'checked="checked"'
|
|
else:
|
|
checked = ''
|
|
%>
|
|
<input type="checkbox" name="tdl" value=1 ${checked} style="margin-bottom:4px;" /> torrentdownload
|
|
<input type="text" placeholder="Enter URL Here" name="tdl_host" value="${lazylibrarian.TDL_HOST}" size="26">
|
|
<br>
|
|
<%
|
|
if lazylibrarian.EXTRA == True:
|
|
checked = 'checked="checked"'
|
|
else:
|
|
checked = ''
|
|
%>
|
|
<input type="checkbox" name="extra" value=1 ${checked} style="margin-bottom:4px;" /> extratorrent
|
|
<input type="text" placeholder="Enter URL Here" name="extra_host" value="${lazylibrarian.EXTRA_HOST}" size="26">
|
|
<br>
|
|
<%
|
|
if lazylibrarian.LIME == True:
|
|
checked = 'checked="checked"'
|
|
else:
|
|
checked = ''
|
|
%>
|
|
<input type="checkbox" name="lime" value=1 ${checked} style="margin-bottom:4px;" /> limetorrent
|
|
<input type="text" placeholder="Enter URL Here" name="lime_host" value="${lazylibrarian.LIME_HOST}" size="26">
|
|
<br>
|
|
<br><h3>Direct Download Providers</h3><br>
|
|
<%
|
|
if lazylibrarian.GEN == True:
|
|
checked = 'checked="checked"'
|
|
else:
|
|
checked = ''
|
|
%>
|
|
<input type="checkbox" name="gen" value=1 ${checked} style="margin-bottom:4px;" /> libgen
|
|
<input type="text" placeholder="Enter URL Here" name="gen_host" value="${lazylibrarian.GEN_HOST}" size="26">
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="table_wrapper" style="display:none">
|
|
<div class="tabs-5">
|
|
<table class="configtable" summary="Search & Processing">
|
|
<tr>
|
|
<td>
|
|
<h3>Intervals</h3>
|
|
</td>
|
|
<td>
|
|
<h3>Miscellaneous</h3>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<div>
|
|
<label>NZB/Tor Search Interval:</label>
|
|
<input type="text" name="search_interval" value="${lazylibrarian.SEARCH_INTERVAL}" size="8"> (mins)
|
|
</div>
|
|
<div>
|
|
<label>RSS Search Interval:</label>
|
|
<input type="text" name="searchrss_interval" value="${lazylibrarian.SEARCHRSS_INTERVAL}" size="8"> (mins)
|
|
</div>
|
|
<div>
|
|
<label>Post-Processing Interval:</label>
|
|
<input type="text" name="scan_interval" value="${lazylibrarian.SCAN_INTERVAL}" size="8"> (mins)
|
|
</div>
|
|
<div>
|
|
<label>Version Check Interval:</label>
|
|
<input type="text" name="versioncheck_interval" value="${lazylibrarian.VERSIONCHECK_INTERVAL}" size="8"> (hours)
|
|
</div>
|
|
<small>
|
|
<BR>
|
|
Changes to the scan intervals only take effect when the jobs are restarted, an interval of zero disables the task
|
|
</small>
|
|
</td>
|
|
<td>
|
|
<div>
|
|
<label>Cache expire after:</label>
|
|
<input type="text" name="cache_age" value="${lazylibrarian.CACHE_AGE}" size="8"> (days)
|
|
</div>
|
|
<label>Max Magazine Issue Age:</label>
|
|
<input type="text" name="mag_age" value="${lazylibrarian.MAG_AGE}" size="8"> (days)
|
|
</div>
|
|
<div>
|
|
<label>Remove failed tasks after:</label>
|
|
<input type="text" name="task_age" value="${lazylibrarian.TASK_AGE}" size="8"> (hours)
|
|
</div>
|
|
<div>
|
|
<label>Search Match Ratio:</label>
|
|
<input type="text" name="match_ratio" value="${lazylibrarian.MATCH_RATIO}" size="8"> (percent)
|
|
</div>
|
|
<div>
|
|
<label>Download Match Ratio:</label>
|
|
<input type="text" name="dload_ratio" value="${lazylibrarian.DLOAD_RATIO}" size="8"> (percent)
|
|
</div>
|
|
<label>git program:</label>
|
|
<input type="text" placeholder="git program" name="git_program" value="${lazylibrarian.GIT_PROGRAM}" size="26">
|
|
<BR>
|
|
<small>Path to git program unless already in your path.
|
|
<BR>You can usually leave this blank</small>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<h3>Folders</h3>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<div>
|
|
<label>Base Destination Folder:</label>
|
|
<input type="text" name="destination_dir" value="${lazylibrarian.DESTINATION_DIR}" size="26">
|
|
</div>
|
|
<BR>
|
|
</td>
|
|
<td>
|
|
<label>Alternate Import/Export Folder:</label>
|
|
<input type="text" name="alternate_dir" value="${lazylibrarian.ALTERNATE_DIR}" size="26">
|
|
<BR>
|
|
<small>Directory for wishlists and manually importing books</small>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<label>eBook Destination Folder:</label>
|
|
<input type="text" name="ebook_dest_folder" value="${lazylibrarian.EBOOK_DEST_FOLDER}" size="26">
|
|
<br><label>eBook Destination File:</label>
|
|
<input type="text" name="ebook_dest_file" value="${lazylibrarian.EBOOK_DEST_FILE}" size="26">
|
|
<BR>
|
|
<small>Options include $Author, $Title, any string
|
|
<BR>
|
|
Current limitation: each file has to be in unique subfolder
|
|
</small>
|
|
<div>
|
|
<%
|
|
if lazylibrarian.DESTINATION_COPY == True:
|
|
checked = 'checked="checked"'
|
|
else:
|
|
checked = ''
|
|
%>
|
|
<input type="checkbox" name="destination_copy" value=1 ${checked} /><label>Keep original files</label>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<label>Magazine Destination Folder:</label>
|
|
<input type="text" name="mag_dest_folder" value="${lazylibrarian.MAG_DEST_FOLDER}" size="26">
|
|
<br><label>Magazine Destination File:</label>
|
|
<input type="text" name="mag_dest_file" value="${lazylibrarian.MAG_DEST_FILE}" size="26">
|
|
<BR>
|
|
<small>Options include $Title, $IssueDate, any string</small>
|
|
<BR>
|
|
<%
|
|
if lazylibrarian.MAG_RELATIVE == True:
|
|
checked = 'checked="checked"'
|
|
else:
|
|
checked = ''
|
|
%>
|
|
<input type="checkbox" name="mag_relative" value=1 ${checked} /><label>Magazines inside book folder</label>
|
|
<BR>
|
|
<small>Current limitation: each magazine has to be in unique subfolder
|
|
<BR>
|
|
If inside book folder, magazine folder must start with _
|
|
</small>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<label>Calibredb import program:</label>
|
|
<input type="text" name="imp_calibredb" value="${lazylibrarian.IMP_CALIBREDB}" size="26">
|
|
<BR>
|
|
<small>Path to "calibredb" to import books into the library</small>
|
|
<label>Calibre Auto Add:</label>
|
|
<input type="text" name="imp_autoadd" value="${lazylibrarian.IMP_AUTOADD}" size="26">
|
|
<BR>
|
|
<small>Directory for a copy to be placed for auto add process</small>
|
|
<div>
|
|
<%
|
|
if lazylibrarian.FULL_SCAN == True:
|
|
checked = 'checked="checked"'
|
|
else:
|
|
checked = ''
|
|
%>
|
|
<label>Full Scan:</label><input type="checkbox" name="full_scan" id="fullscan" value=1 ${checked} />
|
|
<br>
|
|
<small>This will remove entries if ebooks are not found in the download location</small>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<label>Cover creation program:</label>
|
|
<input type="text" placeholder="cover creation program" name="imp_convert" value="${lazylibrarian.IMP_CONVERT}" size="26">
|
|
<BR>
|
|
<small>Program for creating magazine covers (example: ImageMagick "convert")
|
|
<BR>Leave blank to use PythonMagick or Wand interfaces to ImageMagick, put
|
|
None to disable cover creation</small>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<div>
|
|
<%
|
|
if lazylibrarian.IMP_SINGLEBOOK == True:
|
|
checked = 'checked="checked"'
|
|
else:
|
|
checked = ''
|
|
%>
|
|
<label>One book per directory:</label><input type="checkbox" name="imp_singlebook" value=1 ${checked} />
|
|
<br>
|
|
<small>This imports one book per directory, tick if you keep multiple formats of the same book in the same directory</small>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<div>
|
|
<%
|
|
if lazylibrarian.ADD_AUTHOR == True:
|
|
checked = 'checked="checked"'
|
|
else:
|
|
checked = ''
|
|
%>
|
|
<label>Add Authors:</label><input type="checkbox" name="add_author" value=1 ${checked} />
|
|
<br>
|
|
<small>This will auto add new authors from GoodReads</small>
|
|
</div>
|
|
<div>
|
|
<%
|
|
if lazylibrarian.IMP_AUTOSEARCH == True:
|
|
checked = 'checked="checked"'
|
|
else:
|
|
checked = ''
|
|
%>
|
|
<label>Search when Added:</label><input type="checkbox" name="imp_autosearch" value=1 ${checked} />
|
|
<br>
|
|
<small>This will auto search for books/mags as soon as you add them to the database.<br>
|
|
Leave unticked to search for them later</small>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<label>Missing Book Status:</label>
|
|
<select name="notfound_status" style="float:right;">
|
|
%for nf_status in config['status_list']:
|
|
<%
|
|
selected = ''
|
|
if nf_status == lazylibrarian.NOTFOUND_STATUS:
|
|
selected = 'selected="selected"'
|
|
%>
|
|
<option value="${nf_status}" ${selected}>${nf_status}</option>
|
|
%endfor
|
|
</select>
|
|
<br>
|
|
<small>Status for missing/deleted ebooks</small>
|
|
</td>
|
|
<td>
|
|
<label>New Book Status:</label>
|
|
<select name="newbook_status" style="float:right;">
|
|
%for nb_status in config['status_list']:
|
|
<%
|
|
selected = ''
|
|
if nb_status == lazylibrarian.NEWBOOK_STATUS:
|
|
selected = 'selected="selected"'
|
|
%>
|
|
<option value="${nb_status}" ${selected}>${nb_status}</option>
|
|
%endfor
|
|
</select>
|
|
<br>
|
|
<small>Status for new ebooks by existing authors</small>
|
|
<div>
|
|
<br>
|
|
<label>New Authors Book Status:</label>
|
|
<select name="newauthor_status" style="float:right;">
|
|
%for na_status in config['status_list']:
|
|
<%
|
|
selected = ''
|
|
if na_status == lazylibrarian.NEWAUTHOR_STATUS:
|
|
selected = 'selected="selected"'
|
|
%>
|
|
<option value="${na_status}" ${selected}>${na_status}</option>
|
|
%endfor
|
|
</select>
|
|
<br>
|
|
<small>Status for ebooks by new authors</small>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="table_wrapper" style="display:none">
|
|
<div class="tabs-6">
|
|
<table class="configtable" summary="Notifications">
|
|
<tr>
|
|
<td>
|
|
<fieldset>
|
|
<h3>Twitter</h3>
|
|
<div class="row checkbox">
|
|
<%
|
|
if lazylibrarian.USE_TWITTER == True:
|
|
checked = 'checked="checked"'
|
|
else:
|
|
checked = ''
|
|
%>
|
|
<input type="checkbox" name="use_twitter" id="twitter" value="1" ${checked} />
|
|
<label>Enable Twitter Notifications</label>
|
|
</div>
|
|
<div id="twitteroptions">
|
|
<div class="row">
|
|
<%
|
|
if lazylibrarian.TWITTER_NOTIFY_ONSNATCH == True:
|
|
checked = 'checked="checked"'
|
|
else:
|
|
checked = ''
|
|
%>
|
|
<input type="checkbox" name="twitter_notify_onsnatch" value="1" ${checked} />Notify on snatch
|
|
</div>
|
|
<div class="row">
|
|
<%
|
|
if lazylibrarian.TWITTER_NOTIFY_ONDOWNLOAD == True:
|
|
checked = 'checked="checked"'
|
|
else:
|
|
checked = ''
|
|
%>
|
|
<input type="checkbox" name="twitter_notify_ondownload" value="1" ${checked} />Notify on download
|
|
</div>
|
|
<div class="row">
|
|
<input type="button" value="Request Authorization" id="twitterStep1" />
|
|
</div>
|
|
<div class="row">
|
|
<input type="text" id="twitter_key" value="" size="26" placeholder="Input Authorization Key"/>
|
|
</div>
|
|
<div class="row">
|
|
<input type="button" value="Verify Key" id="twitterStep2" />
|
|
</div>
|
|
<div class="row">
|
|
<input type="button" value="Test Twitter" id="testTwitter" />
|
|
</div>
|
|
</div>
|
|
</fieldset>
|
|
<fieldset>
|
|
<BR>
|
|
<h3>Boxcar2</h3>
|
|
<div class="row checkbox">
|
|
<%
|
|
if lazylibrarian.USE_BOXCAR == True:
|
|
checked = 'checked="checked"'
|
|
else:
|
|
checked = ''
|
|
%>
|
|
<input type="checkbox" name="use_boxcar" id="boxcar" value="1" ${checked} />
|
|
<label>Enable boxcar Notifications</label>
|
|
</div>
|
|
<div id="boxcaroptions">
|
|
<div class="row">
|
|
<%
|
|
if lazylibrarian.BOXCAR_NOTIFY_ONSNATCH == True:
|
|
checked = 'checked="checked"'
|
|
else:
|
|
checked = ''
|
|
%>
|
|
<input type="checkbox" name="boxcar_notify_onsnatch" value="1" ${checked} />Notify on snatch
|
|
</div>
|
|
<div class="row">
|
|
<%
|
|
if lazylibrarian.BOXCAR_NOTIFY_ONDOWNLOAD == True:
|
|
checked = 'checked="checked"'
|
|
else:
|
|
checked = ''
|
|
%>
|
|
<input type="checkbox" name="boxcar_notify_ondownload" value="1" ${checked} />Notify on download
|
|
</div>
|
|
<div class="row">
|
|
<input type="text" name="boxcar_token" value="${lazylibrarian.BOXCAR_TOKEN}" size="26" placeholder="Boxcar token">
|
|
</div>
|
|
</div>
|
|
</fieldset>
|
|
<fieldset>
|
|
<BR>
|
|
<h3>Pushbullet</h3>
|
|
<div class="row checkbox">
|
|
<%
|
|
if lazylibrarian.USE_PUSHBULLET == True:
|
|
checked = 'checked="checked"'
|
|
else:
|
|
checked = ''
|
|
%>
|
|
<input type="checkbox" name="use_pushbullet" id="pushbullet" value="1" ${checked} />
|
|
<label>Enable Pushbullet Notifications</label>
|
|
</div>
|
|
<div id="pushbulletoptions">
|
|
<div class="row">
|
|
<%
|
|
if lazylibrarian.PUSHBULLET_NOTIFY_ONSNATCH == True:
|
|
checked = 'checked="checked"'
|
|
else:
|
|
checked = ''
|
|
%>
|
|
<input type="checkbox" name="pushbullet_notify_onsnatch" value="1" ${checked} />Notify on snatch
|
|
</div>
|
|
<div class="row">
|
|
<%
|
|
if lazylibrarian.PUSHBULLET_NOTIFY_ONDOWNLOAD == True:
|
|
checked = 'checked="checked"'
|
|
else:
|
|
checked = ''
|
|
%>
|
|
<input type="checkbox" name="pushbullet_notify_ondownload" value="1" ${checked} />Notify on download
|
|
</div>
|
|
<div class="row">
|
|
<input type="text" name="pushbullet_token" value="${lazylibrarian.PUSHBULLET_TOKEN}" size="26" placeholder="Pushbullet API">
|
|
</div>
|
|
<div class="row">
|
|
<input type="text" name="pushbullet_deviceid" value="${lazylibrarian.PUSHBULLET_DEVICEID}" size="26" placeholder="Pushbullet DeviceID">
|
|
</div>
|
|
<div class="row">
|
|
<input type="button" value="Test Pushbullet" id="testPushbullet">
|
|
</div>
|
|
</div>
|
|
</fieldset>
|
|
</td>
|
|
<td>
|
|
<fieldset>
|
|
<h3>Pushover</h3>
|
|
<div class="row checkbox">
|
|
<%
|
|
if lazylibrarian.USE_PUSHOVER == True:
|
|
checked = 'checked="checked"'
|
|
else:
|
|
checked = ''
|
|
%>
|
|
<input type="checkbox" name="use_pushover" id="pushover" value="1" ${checked} />
|
|
<label>Enable Pushover Notifications</label>
|
|
</div>
|
|
<div id="pushoveroptions">
|
|
<div class="row">
|
|
<%
|
|
if lazylibrarian.PUSHOVER_ONSNATCH == True:
|
|
checked = 'checked="checked"'
|
|
else:
|
|
checked = ''
|
|
%>
|
|
<input type="checkbox" name="pushover_onsnatch" value="1" ${checked} />Notify on snatch
|
|
</div>
|
|
<div class="row">
|
|
<%
|
|
if lazylibrarian.PUSHOVER_ONDOWNLOAD == True:
|
|
checked = 'checked="checked"'
|
|
else:
|
|
checked = ''
|
|
%>
|
|
<input type="checkbox" name="pushover_ondownload" value="1" ${checked} />Notify on download
|
|
</div>
|
|
<div class="row">
|
|
<input type="text" name="pushover_apitoken" value="${lazylibrarian.PUSHOVER_APITOKEN}" size="26" placeholder="Pushover API Token">
|
|
</div>
|
|
<div class="row">
|
|
<input type="text" name="pushover_keys" value="${lazylibrarian.PUSHOVER_KEYS}" size="26" placeholder="Pushover Keys">
|
|
</div>
|
|
<div class="row">
|
|
<input type="text" name="pushover_device" value="${lazylibrarian.PUSHOVER_DEVICE}" size="26" placeholder="Pushover Device">
|
|
</div>
|
|
<div class="row">
|
|
<input type="text" name="pushover_priority" value="${lazylibrarian.PUSHOVER_PRIORITY}" size="26" placeholder="Pushover Priority">
|
|
</div>
|
|
<div class="row">
|
|
<input type="button" value="Test Pushover" id="testPushover">
|
|
</div>
|
|
</div>
|
|
</fieldset>
|
|
<fieldset>
|
|
<BR>
|
|
<h3>AndroidPN</h3>
|
|
<div class="row checkbox">
|
|
<%
|
|
if lazylibrarian.USE_ANDROIDPN == True:
|
|
checked = 'checked="checked"'
|
|
else:
|
|
checked = ''
|
|
%>
|
|
<input type="checkbox" name="use_androidpn" id="androidpn" value="1" ${checked} />
|
|
<label>Enable AndroidPN Notifications</label>
|
|
</div>
|
|
<div id="androidpnoptions">
|
|
<div class="row">
|
|
<%
|
|
if lazylibrarian.ANDROIDPN_NOTIFY_ONSNATCH == True:
|
|
checked = 'checked="checked"'
|
|
else:
|
|
checked = ''
|
|
%>
|
|
<input type="checkbox" name="androidpn_notify_onsnatch" value="1" ${checked} />Notify on snatch
|
|
</div>
|
|
<div class="row">
|
|
<%
|
|
if lazylibrarian.ANDROIDPN_NOTIFY_ONDOWNLOAD == True:
|
|
checked = 'checked="checked"'
|
|
else:
|
|
checked = ''
|
|
%>
|
|
<input type="checkbox" name="androidpn_notify_ondownload" value="1" ${checked} />Notify on download
|
|
</div>
|
|
<div class="row">
|
|
<%
|
|
if lazylibrarian.ANDROIDPN_BROADCAST == True:
|
|
checked = 'checked="checked"'
|
|
else:
|
|
checked = ''
|
|
%>
|
|
<input type="checkbox" name="androidpn_broadcast" id="androidpn_broadcast" value="1" ${checked} />Broadcast notification
|
|
</div>
|
|
<div class="row">
|
|
<input type="text" name="androidpn_url" value="${lazylibrarian.ANDROIDPN_URL}" size="26" placeholder="AndroidPN notification url" />
|
|
</div>
|
|
<div class="row" id="androidpn_username">
|
|
<input type="text" name="androidpn_username" value="${lazylibrarian.ANDROIDPN_USERNAME}" size="26" placeholder="AndroidPN username" />
|
|
</div>
|
|
<div class="row">
|
|
<input type="button" value="Test AndroidPN" id="testAndroidPN">
|
|
</div>
|
|
</div>
|
|
</fieldset>
|
|
<fieldset>
|
|
<BR>
|
|
<h3>NotifyMyAndroid</h3>
|
|
<div class="checkbox row">
|
|
<%
|
|
if lazylibrarian.USE_NMA == True:
|
|
checked = 'checked="checked"'
|
|
else:
|
|
checked = ''
|
|
%>
|
|
<input type="checkbox" name="use_nma" id="nma" value="1" ${checked} /><label>Enable NotifyMyAndroid</label>
|
|
</div>
|
|
<div id="nmaoptions">
|
|
<div class="row checkbox">
|
|
<%
|
|
if lazylibrarian.NMA_ONSNATCH == True:
|
|
checked = 'checked="checked"'
|
|
else:
|
|
checked = ''
|
|
%>
|
|
<input type="checkbox" name="nma_onsnatch" value="1" ${checked} /><label>Notify on snatch?</label>
|
|
</div>
|
|
<div class="row checkbox">
|
|
<%
|
|
if lazylibrarian.NMA_ONDOWNLOAD == True:
|
|
checked = 'checked="checked"'
|
|
else:
|
|
checked = ''
|
|
%>
|
|
<input type="checkbox" name="nma_ondownload" value="1" ${checked} /><label>Notify on download?</label>
|
|
</div>
|
|
<div class="row">
|
|
<label>NotifyMyAndroid API Key</label>
|
|
<input type="text" name="nma_apikey" value="${lazylibrarian.NMA_APIKEY}" size="26">
|
|
<br><small>Separate multiple api keys with commas</small>
|
|
</div>
|
|
<div class="row">
|
|
<label>Priority</label>
|
|
<select name="nma_priority">
|
|
%for x in [-2,-1,0,1,2]:
|
|
<%
|
|
if lazylibrarian.NMA_PRIORITY == x:
|
|
nma_priority_selected = 'selected'
|
|
else:
|
|
nma_priority_selected = ''
|
|
|
|
if x == -2:
|
|
nma_priority_value = 'Very Low'
|
|
elif x == -1:
|
|
nma_priority_value = 'Moderate'
|
|
elif x == 0:
|
|
nma_priority_value = 'Normal'
|
|
elif x == 1:
|
|
nma_priority_value = 'High'
|
|
else:
|
|
nma_priority_value = 'Emergency'
|
|
%>
|
|
<option value=${x} ${nma_priority_selected}>${nma_priority_value}</option>
|
|
%endfor
|
|
</select>
|
|
</div>
|
|
<div class="row">
|
|
<input type="button" value="Test NMA" id="testNMA">
|
|
</div>
|
|
</div>
|
|
</fieldset>
|
|
<fieldset>
|
|
<BR>
|
|
<h3>Slack</h3>
|
|
<div class="row checkbox">
|
|
<%
|
|
if lazylibrarian.USE_SLACK == True:
|
|
checked = 'checked="checked"'
|
|
else:
|
|
checked = ''
|
|
%>
|
|
<input type="checkbox" name="use_slack" id="slack" value="1" ${checked} />
|
|
<label>Enable Slack Notifications</label>
|
|
</div>
|
|
<div id="slackoptions">
|
|
<div class="row">
|
|
<%
|
|
if lazylibrarian.SLACK_NOTIFY_ONSNATCH == True:
|
|
checked = 'checked="checked"'
|
|
else:
|
|
checked = ''
|
|
%>
|
|
<input type="checkbox" name="slack_notify_onsnatch" value="1" ${checked} />Notify on snatch
|
|
</div>
|
|
<div class="row">
|
|
<%
|
|
if lazylibrarian.SLACK_NOTIFY_ONDOWNLOAD == True:
|
|
checked = 'checked="checked"'
|
|
else:
|
|
checked = ''
|
|
%>
|
|
<input type="checkbox" name="slack_notify_ondownload" value="1" ${checked} />Notify on download
|
|
</div>
|
|
<div class="row">
|
|
<input type="text" name="slack_token" value="${lazylibrarian.SLACK_TOKEN}" size="26" placeholder="Slack Webhook Token(everything after https://hooks.slack.com/services/)">
|
|
</div>
|
|
<div class="row">
|
|
<input type="button" value="Test Slack" id="testSlack">
|
|
</div>
|
|
</div>
|
|
</fieldset>
|
|
<fieldset>
|
|
<BR>
|
|
<h3>Email</h3>
|
|
<div class="row checkbox">
|
|
<%
|
|
if lazylibrarian.USE_EMAIL == True:
|
|
checked = 'checked="checked"'
|
|
else:
|
|
checked = ''
|
|
%>
|
|
<input type="checkbox" name="use_email" id="email" value="1" ${checked} />
|
|
<label>Enable Email Notifications</label>
|
|
</div>
|
|
<div id="emailoptions">
|
|
<div class="row">
|
|
<%
|
|
if lazylibrarian.EMAIL_NOTIFY_ONSNATCH == True:
|
|
checked = 'checked="checked"'
|
|
else:
|
|
checked = ''
|
|
%>
|
|
<input type="checkbox" name="email_notify_onsnatch" value="1" ${checked} />Notify on snatch
|
|
</div>
|
|
<div class="row">
|
|
<%
|
|
if lazylibrarian.EMAIL_NOTIFY_ONDOWNLOAD == True:
|
|
checked = 'checked="checked"'
|
|
else:
|
|
checked = ''
|
|
%>
|
|
<input type="checkbox" name="email_notify_ondownload" value="1" ${checked} />Notify on download
|
|
</div>
|
|
<div class="row">
|
|
<input type="text" name="email_from" value="${lazylibrarian.EMAIL_FROM}" size="26" placeholder="Email From">
|
|
</div>
|
|
<div class="row">
|
|
<input type="text" name="email_to" value="${lazylibrarian.EMAIL_TO}" size="26" placeholder="Email To">
|
|
</div>
|
|
<div class="row">
|
|
<input type="text" name="email_smtp_server" value="${lazylibrarian.EMAIL_SMTP_SERVER}" size="26" placeholder="SMTP Server">
|
|
</div>
|
|
<div class="row">
|
|
<input type="text" name="email_smtp_user" value="${lazylibrarian.EMAIL_SMTP_USER}" size="26" placeholder="SMTP User">
|
|
</div>
|
|
<div class="row">
|
|
<input type="text" name="email_smtp_password" value="${lazylibrarian.EMAIL_SMTP_PASSWORD}" size="26" placeholder="SMTP Password">
|
|
</div>
|
|
<div class="row">
|
|
<input type="text" name="email_smtp_port" value="${lazylibrarian.EMAIL_SMTP_PORT}" size="26" placeholder="SMTP Port">
|
|
</div>
|
|
<div class="row">
|
|
<%
|
|
if lazylibrarian.EMAIL_SSL == True:
|
|
checked = 'checked="checked"'
|
|
else:
|
|
checked = ''
|
|
%>
|
|
<input type="checkbox" name="email_ssl" value="1" ${checked} />SSL
|
|
</div>
|
|
<div class="row">
|
|
<%
|
|
if lazylibrarian.EMAIL_TLS == True:
|
|
checked = 'checked="checked"'
|
|
else:
|
|
checked = ''
|
|
%>
|
|
<input type="checkbox" name="email_tls" value="1" ${checked} />TLS
|
|
</div>
|
|
<div class="row">
|
|
<input type="button" value="Test Email" id="testEmail">
|
|
</div>
|
|
</div>
|
|
</fieldset>
|
|
</td>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="table_wrapper" style="display:none">
|
|
<div class="tabs-7">
|
|
<table class="configtable" summary="Search Categories">
|
|
<tr>
|
|
<td>
|
|
<fieldset>
|
|
<h3>Provider Search Categories</h3>
|
|
<br>
|
|
You only need to change these settings if auto-detection fails or returns incorrect values.
|
|
If you make any alterations, tick the lock button to prevent reloading values from the provider.
|
|
%for provider in lazylibrarian.NEWZNAB_PROV:
|
|
<%
|
|
if provider['HOST'] == "":
|
|
hidden = 'hidden="hidden"'
|
|
else:
|
|
hidden = ''
|
|
%>
|
|
<%
|
|
if provider['MANUAL'] == True:
|
|
checked = 'checked="checked"'
|
|
else:
|
|
checked = ''
|
|
%>
|
|
<h3><br>${provider['HOST']}</h3>
|
|
<input type="checkbox" name="newznab[${loop.index}][manual]" value=1 ${checked} ${hidden} style="margin-bottom:4px;" />
|
|
<label ${hidden}> Tick to lock settings</label>
|
|
<input type="text" name="newznab[${loop.index}][name]" value="${provider['NAME']}" class="hidden">
|
|
<input type="text" name="newznab[${loop.index}][updated]" value="${provider['UPDATED']}" class="hidden">
|
|
<label ${hidden}><br>Extended Search</label>
|
|
<input type="text" placeholder="Enter Extended Here" name="newznab[${loop.index}][extended]" value="${provider['EXTENDED']}" size="26" ${hidden}>
|
|
<label ${hidden}><br>General Search</label>
|
|
<input type="text" placeholder="Enter General Search Here" name="newznab[${loop.index}][generalsearch]" value="${provider['GENERALSEARCH']}" size="26" ${hidden}>
|
|
<label ${hidden}><br>Book Categories</label>
|
|
<input type="text" placeholder="Enter Book Categories Here" name="newznab[${loop.index}][bookcat]" value="${provider['BOOKCAT']}" size="26" ${hidden}>
|
|
<label ${hidden}><br>Book Search</label>
|
|
<input type="text" placeholder="Enter Book Search Here" name="newznab[${loop.index}][booksearch]" value="${provider['BOOKSEARCH']}" size="26" ${hidden}>
|
|
<label ${hidden}><br>Magazine Categories</label>
|
|
<input type="text" placeholder="Enter Mag Categories Here" name="newznab[${loop.index}][magcat]" value="${provider['MAGCAT']}" size="26" ${hidden}>
|
|
<label ${hidden}><br>Magazine Search</label>
|
|
<input type="text" placeholder="Enter Mag Search Here" name="newznab[${loop.index}][magsearch]" value="${provider['MAGSEARCH']}" size="26" ${hidden}>
|
|
%endfor
|
|
%for provider in lazylibrarian.TORZNAB_PROV:
|
|
<%
|
|
if provider['HOST'] == "":
|
|
hidden = 'hidden="hidden"'
|
|
else:
|
|
hidden = ''
|
|
%>
|
|
<%
|
|
if provider['MANUAL'] == True:
|
|
checked = 'checked="checked"'
|
|
else:
|
|
checked = ''
|
|
%>
|
|
<h3><br>${provider['HOST']}</h3>
|
|
<input type="checkbox" name="torznab[${loop.index}][manual]" value=1 ${checked} ${hidden} style="margin-bottom:4px;" />
|
|
<label ${hidden}> Tick to lock settings</label>
|
|
<input type="text" name="torznab[${loop.index}][name]" value="${provider['NAME']}" class="hidden">
|
|
<input type="text" name="torznab[${loop.index}][updated]" value="${provider['UPDATED']}" class="hidden">
|
|
<label ${hidden}><br>Extended Search</label>
|
|
<input type="text" placeholder="Enter Extended Here" name="torznab[${loop.index}][extended]" value="${provider['EXTENDED']}" size="26" ${hidden}>
|
|
<label ${hidden}><br>General Search</label>
|
|
<input type="text" placeholder="Enter General Search Here" name="torznab[${loop.index}][generalsearch]" value="${provider['GENERALSEARCH']}" size="26" ${hidden}>
|
|
<label ${hidden}><br>Book Categories</label>
|
|
<input type="text" placeholder="Enter Book Categories Here" name="torznab[${loop.index}][bookcat]" value="${provider['BOOKCAT']}" size="26" ${hidden}>
|
|
<label ${hidden}><br>Book Search</label>
|
|
<input type="text" placeholder="Enter Book Search Here" name="torznab[${loop.index}][booksearch]" value="${provider['BOOKSEARCH']}" size="26" ${hidden}>
|
|
<label ${hidden}><br>Magazine Categories</label>
|
|
<input type="text" placeholder="Enter Mag Categories Here" name="torznab[${loop.index}][magcat]" value="${provider['MAGCAT']}" size="26" ${hidden}>
|
|
<label ${hidden}><br>Magazine Search</label>
|
|
<input type="text" placeholder="Enter Mag Search Here" name="torznab[${loop.index}][magsearch]" value="${provider['MAGSEARCH']}" size="26" ${hidden}>
|
|
%endfor
|
|
</fieldset>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="table_wrapper" style="display:none">
|
|
<div class="tabs-8">
|
|
<table class="configtable" summary="Word Filters">
|
|
<tr>
|
|
<td>
|
|
<fieldset>
|
|
<h3>Book Reject List</h3>Default: audiobook, mp3
|
|
<br>
|
|
<input type="text" name="reject_words" placeholder="Reject Word List" value="${lazylibrarian.REJECT_WORDS}" size="20">
|
|
<br>
|
|
<small>Comma separated list of words to reject:<br>
|
|
Search results with any of these words in the title will be ignored
|
|
<BR></small>
|
|
<BR><BR>
|
|
</fieldset>
|
|
<fieldset>
|
|
<h3>Book Size Limit</h3>Default: 0
|
|
<br>
|
|
<input type="text" name="reject_maxsize" placeholder="Reject Size Limit" value="${lazylibrarian.REJECT_MAXSIZE}" size="20">
|
|
<br>
|
|
<small>Book size limit (Mb):<br>
|
|
Search results larger than this will be rejected, set to 0 to disable
|
|
<BR></small>
|
|
<BR><BR>
|
|
</fieldset>
|
|
<fieldset>
|
|
<h3>Magazine Size Limit</h3>Default: 0
|
|
<br>
|
|
<input type="text" name="reject_magsize" placeholder="Reject Size Limit" value="${lazylibrarian.REJECT_MAGSIZE}" size="20">
|
|
<br>
|
|
<small>Magazine size limit (Mb):<br>
|
|
Search results larger than this will be rejected, set to 0 to disable
|
|
<BR></small>
|
|
<BR><BR>
|
|
</fieldset>
|
|
</td>
|
|
<td>
|
|
<fieldset>
|
|
<h3>Magazine Reject Lists</h3>Default: None
|
|
<br>
|
|
%for mag in config['magazines_list']:
|
|
<label>${mag['Title']}</label>
|
|
<input type="text" placeholder="Reject Word List" name="reject_list[${mag['Title']}]" value="${mag['Reject']}" size="20">
|
|
<br>
|
|
<input type="text" placeholder="Search expression" name="regex[${mag['Title']}]" value="${mag['Regex']}" size="20">
|
|
<br>
|
|
%endfor
|
|
<BR><BR>
|
|
</fieldset>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="table_wrapper_button">
|
|
<p><input type="submit" value="Save changes" id="add"></p>
|
|
</div>
|
|
|
|
<p> </p>
|
|
<p style="text-align:center;color:grey">Repo: https://github.com/${lazylibrarian.GIT_USER}/${lazylibrarian.GIT_REPO} : Branch: ${lazylibrarian.GIT_BRANCH}<br>Current Version: ${lazylibrarian.CURRENT_VERSION} : Latest Version: ${lazylibrarian.LATEST_VERSION}</p>
|
|
</div>
|
|
</form>
|
|
</%def>
|
|
|
|
<%def name="javascriptIncludes()">
|
|
<script>
|
|
function initThisPage()
|
|
{
|
|
if ($("#https_enabled").is(":checked"))
|
|
{
|
|
$("#https_options").show();
|
|
}
|
|
else
|
|
{
|
|
$("#https_options").hide();
|
|
}
|
|
|
|
$("#https_enabled").click(function(){
|
|
if ($("#https_enabled").is(":checked"))
|
|
{
|
|
$("#https_options").slideDown();
|
|
}
|
|
else
|
|
{
|
|
$("#https_options").slideUp();
|
|
}
|
|
});
|
|
|
|
if ($("#api_enabled").is(":checked"))
|
|
{
|
|
$("#api_options").show();
|
|
}
|
|
else
|
|
{
|
|
$("#api_options").hide();
|
|
}
|
|
|
|
$("#api_enabled").click(function(){
|
|
if ($("#api_enabled").is(":checked"))
|
|
{
|
|
$("#api_options").slideDown();
|
|
}
|
|
else
|
|
{
|
|
$("#api_options").slideUp();
|
|
}
|
|
});
|
|
|
|
if ($("#tor_downloader_blackhole").is(":checked"))
|
|
{
|
|
$("#tor_blackhole_options").show();
|
|
}
|
|
else
|
|
{
|
|
$("#tor_blackhole_options").hide();
|
|
}
|
|
|
|
$("#tor_downloader_blackhole").click(function(){
|
|
if ($("#tor_downloader_blackhole").is(":checked"))
|
|
{
|
|
$("#tor_blackhole_options").slideDown();
|
|
}
|
|
else
|
|
{
|
|
$("#tor_blackhole_options").slideUp();
|
|
}
|
|
});
|
|
|
|
if ($("#tor_downloader_deluge").is(":checked"))
|
|
{
|
|
$("#deluge_options").show();
|
|
}
|
|
else
|
|
{
|
|
$("#deluge_options").hide();
|
|
}
|
|
$("#tor_downloader_deluge").click(function(){
|
|
if ($("#tor_downloader_deluge").is(":checked"))
|
|
{
|
|
$("#deluge_options").slideDown();
|
|
}
|
|
else
|
|
{
|
|
$("#deluge_options").slideUp();
|
|
}
|
|
});
|
|
|
|
if ($("#tor_downloader_transmission").is(":checked"))
|
|
{
|
|
$("#transmission_options").show();
|
|
}
|
|
else
|
|
{
|
|
$("#transmission_options").hide();
|
|
}
|
|
$("#tor_downloader_transmission").click(function(){
|
|
if ($("#tor_downloader_transmission").is(":checked"))
|
|
{
|
|
$("#transmission_options").slideDown();
|
|
}
|
|
else
|
|
{
|
|
$("#transmission_options").slideUp();
|
|
}
|
|
});
|
|
|
|
if ($("#tor_downloader_rtorrent").is(":checked"))
|
|
{
|
|
$("#rtorrent_options").show();
|
|
}
|
|
else
|
|
{
|
|
$("#rtorrent_options").hide();
|
|
}
|
|
|
|
$("#tor_downloader_rtorrent").click(function(){
|
|
if ($("#tor_downloader_rtorrent").is(":checked"))
|
|
{
|
|
$("#rtorrent_options").slideDown();
|
|
}
|
|
else
|
|
{
|
|
$("#rtorrent_options").slideUp();
|
|
}
|
|
});
|
|
|
|
if ($("#tor_downloader_utorrent").is(":checked"))
|
|
{
|
|
$("#utorrent_options").show();
|
|
}
|
|
else
|
|
{
|
|
$("#utorrent_options").hide();
|
|
}
|
|
|
|
$("#tor_downloader_utorrent").click(function(){
|
|
if ($("#tor_downloader_utorrent").is(":checked"))
|
|
{
|
|
$("#utorrent_options").slideDown();
|
|
}
|
|
else
|
|
{
|
|
$("#utorrent_options").slideUp();
|
|
}
|
|
});
|
|
|
|
if ($("#tor_downloader_qbittorrent").is(":checked"))
|
|
{
|
|
$("#qbittorrent_options").show();
|
|
}
|
|
else
|
|
{
|
|
$("#qbittorrent_options").hide();
|
|
}
|
|
|
|
$("#tor_downloader_qbittorrent").click(function(){
|
|
if ($("#tor_downloader_qbittorrent").is(":checked"))
|
|
{
|
|
$("#qbittorrent_options").slideDown();
|
|
}
|
|
else
|
|
{
|
|
$("#qbittorrent_options").slideUp();
|
|
}
|
|
});
|
|
|
|
if ($("#nzb_downloader_blackhole").is(":checked"))
|
|
{
|
|
$("#nzb_blackhole_options").show();
|
|
}
|
|
else
|
|
{
|
|
$("#nzb_blackhole_options").hide();
|
|
}
|
|
|
|
$("#nzb_downloader_blackhole").click(function(){
|
|
if ($("#nzb_downloader_blackhole").is(":checked"))
|
|
{
|
|
$("#nzb_blackhole_options").slideDown();
|
|
}
|
|
else
|
|
{
|
|
$("#nzb_blackhole_options").slideUp();
|
|
}
|
|
});
|
|
|
|
if ($("#nzb_downloader_sabnzbd").is(":checked"))
|
|
{
|
|
$("#sabnzbd_options").show();
|
|
}
|
|
else
|
|
{
|
|
$("#sabnzbd_options").hide();
|
|
}
|
|
$("#nzb_downloader_sabnzbd").click(function(){
|
|
if ($("#nzb_downloader_sabnzbd").is(":checked"))
|
|
{
|
|
$("#sabnzbd_options").slideDown();
|
|
}
|
|
else
|
|
{
|
|
$("#sabnzbd_options").slideUp();
|
|
}
|
|
});
|
|
|
|
if ($("#nzb_downloader_nzbget").is(":checked"))
|
|
{
|
|
$("#nzbget_options").show();
|
|
}
|
|
else
|
|
{
|
|
$("#nzbget_options").hide();
|
|
}
|
|
$("#nzb_downloader_nzbget").click(function(){
|
|
if ($("#nzb_downloader_nzbget").is(":checked"))
|
|
{
|
|
$("#nzbget_options").slideDown();
|
|
}
|
|
else
|
|
{
|
|
$("#nzbget_options").slideUp();
|
|
}
|
|
});
|
|
|
|
if ($("#use_synology").is(":checked"))
|
|
{
|
|
$("#synology_options").show();
|
|
}
|
|
else
|
|
{
|
|
$("#synology_options").hide();
|
|
}
|
|
$("#use_synology").click(function(){
|
|
if ($("#use_synology").is(":checked"))
|
|
{
|
|
$("#synology_options").slideDown();
|
|
}
|
|
else
|
|
{
|
|
$("#synology_options").slideUp();
|
|
}
|
|
});
|
|
|
|
if ($("#twitter").is(":checked"))
|
|
{
|
|
$("#twitteroptions").show();
|
|
}
|
|
else
|
|
{
|
|
$("#twitteroptions").hide();
|
|
}
|
|
|
|
$("#twitter").click(function(){
|
|
if ($("#twitter").is(":checked"))
|
|
{
|
|
$("#twitteroptions").slideDown();
|
|
}
|
|
else
|
|
{
|
|
$("#twitteroptions").slideUp();
|
|
}
|
|
});
|
|
|
|
if ($("#boxcar").is(":checked"))
|
|
{
|
|
$("#boxcaroptions").show();
|
|
}
|
|
else
|
|
{
|
|
$("#boxcaroptions").hide();
|
|
}
|
|
|
|
$("#boxcar").click(function(){
|
|
if ($("#boxcar").is(":checked"))
|
|
{
|
|
$("#boxcaroptions").slideDown();
|
|
}
|
|
else
|
|
{
|
|
$("#boxcaroptions").slideUp();
|
|
}
|
|
});
|
|
|
|
if ($("#fullscan").is(":checked"))
|
|
{
|
|
$("#fullscanoptions").show();
|
|
}
|
|
else
|
|
{
|
|
$("#fullscanoptions").hide();
|
|
}
|
|
|
|
$("#fullscan").click(function(){
|
|
if ($("#fullscan").is(":checked"))
|
|
{
|
|
$("#fullscanoptions").slideDown();
|
|
}
|
|
else
|
|
{
|
|
$("#fullscanoptions").slideUp();
|
|
}
|
|
});
|
|
|
|
if ($("#pushbullet").is(":checked"))
|
|
{
|
|
$("#pushbulletoptions").show();
|
|
}
|
|
else
|
|
{
|
|
$("#pushbulletoptions").hide();
|
|
}
|
|
|
|
$("#pushbullet").click(function(){
|
|
if ($("#pushbullet").is(":checked"))
|
|
{
|
|
$("#pushbulletoptions").slideDown();
|
|
}
|
|
else
|
|
{
|
|
$("#pushbulletoptions").slideUp();
|
|
}
|
|
});
|
|
|
|
if ($("#slack").is(":checked"))
|
|
{
|
|
$("#slackoptions").show();
|
|
}
|
|
else
|
|
{
|
|
$("#slackoptions").hide();
|
|
}
|
|
|
|
$("#slack").click(function(){
|
|
if ($("#slack").is(":checked"))
|
|
{
|
|
$("#slackoptions").slideDown();
|
|
}
|
|
else
|
|
{
|
|
$("#slackoptions").slideUp();
|
|
}
|
|
});
|
|
|
|
if ($("#email").is(":checked"))
|
|
{
|
|
$("#emailoptions").show();
|
|
}
|
|
else
|
|
{
|
|
$("#emailoptions").hide();
|
|
}
|
|
|
|
$("#email").click(function(){
|
|
if ($("#email").is(":checked"))
|
|
{
|
|
$("#emailoptions").slideDown();
|
|
}
|
|
else
|
|
{
|
|
$("#emailoptions").slideUp();
|
|
}
|
|
});
|
|
|
|
if ($("#pushover").is(":checked"))
|
|
{
|
|
$("#pushoveroptions").show();
|
|
}
|
|
else
|
|
{
|
|
$("#pushoveroptions").hide();
|
|
}
|
|
$("#pushover").click(function(){
|
|
if ($("#pushover").is(":checked"))
|
|
{
|
|
$("#pushoveroptions").slideDown();
|
|
}
|
|
else
|
|
{
|
|
$("#pushoveroptions").slideUp();
|
|
}
|
|
});
|
|
|
|
if ($("#androidpn").is(":checked"))
|
|
{
|
|
$("#androidpnoptions").show();
|
|
}
|
|
else
|
|
{
|
|
$("#androidpnoptions").hide();
|
|
}
|
|
$("#androidpn").click(function(){
|
|
if ($("#androidpn").is(":checked"))
|
|
{
|
|
$("#androidpnoptions").slideDown();
|
|
}
|
|
else
|
|
{
|
|
$("#androidpnoptions").slideUp();
|
|
}
|
|
});
|
|
|
|
if ($("#androidpn_broadcast").is(":checked"))
|
|
{
|
|
$("#androidpn_username").hide();
|
|
}
|
|
else
|
|
{
|
|
$("#androidpn_username").show();
|
|
}
|
|
$("#androidpn_broadcast").click(function(){
|
|
if ($("#androidpn_broadcast").is(":checked"))
|
|
{
|
|
$("#androidpn_username").slideUp();
|
|
}
|
|
else
|
|
{
|
|
$("#androidpn_username").slideDown();
|
|
}
|
|
});
|
|
|
|
if ($("#nma").is(":checked"))
|
|
{
|
|
$("#nmaoptions").show();
|
|
}
|
|
else
|
|
{
|
|
$("#nmaoptions").hide();
|
|
}
|
|
|
|
$("#nma").click(function(){
|
|
if ($("#nma").is(":checked"))
|
|
{
|
|
$("#nmaoptions").slideDown();
|
|
}
|
|
else
|
|
{
|
|
$("#nmaoptions").slideUp();
|
|
}
|
|
});
|
|
|
|
$('#generateAPI').click(function () {
|
|
$.get("generateAPI",
|
|
function (data) { });
|
|
|
|
});
|
|
|
|
$('#show_Jobs').click(function () {
|
|
$.get("show_Jobs",
|
|
function (data) { alert(data); });
|
|
|
|
});
|
|
|
|
$('#restart_Jobs').click(function () {
|
|
$.get("restart_Jobs",
|
|
function (data) { alert(data); });
|
|
|
|
});
|
|
|
|
$('#testSABnzbd').click(function () {
|
|
$.get("testSABnzbd",
|
|
function (data) { alert(data); });
|
|
|
|
});
|
|
|
|
$('#testNZBget').click(function () {
|
|
$.get("testNZBget",
|
|
function (data) { alert(data); });
|
|
|
|
});
|
|
|
|
$('#testSynology').click(function () {
|
|
$.get("testSynology",
|
|
function (data) { alert(data); });
|
|
|
|
});
|
|
|
|
$('#testDeluge').click(function () {
|
|
$.get("testDeluge",
|
|
function (data) { alert(data); });
|
|
|
|
});
|
|
|
|
$('#testTransmission').click(function () {
|
|
$.get("testTransmission",
|
|
function (data) { alert(data); });
|
|
|
|
});
|
|
|
|
$('#testqBittorrent').click(function () {
|
|
$.get("testqBittorrent",
|
|
function (data) { alert(data); });
|
|
|
|
});
|
|
|
|
$('#testuTorrent').click(function () {
|
|
$.get("testuTorrent",
|
|
function (data) { alert(data); });
|
|
|
|
});
|
|
|
|
$('#testrTorrent').click(function () {
|
|
$.get("testrTorrent",
|
|
function (data) { alert(data); });
|
|
|
|
});
|
|
|
|
$('#twitterStep1').click(function () {
|
|
$('#testTwitter-result').html('');
|
|
$.get("twitterStep1", function (data) {window.open(data); })
|
|
.done(function () { $('#testTwitter-result').html('<b>Step1:</b> Confirm Authorization'); });
|
|
});
|
|
|
|
$('#twitterStep2').click(function () {
|
|
$('#testTwitter-result').html('');
|
|
var twitter_key = $("#twitter_key").val();
|
|
$.get("twitterStep2", {'key': twitter_key},
|
|
function (data) { $('#testTwitter-result').html(data); });
|
|
});
|
|
|
|
$('#testTwitter').click(function () {
|
|
$.get("testTwitter",
|
|
function (data) { $('#testTwitter-result').html(data); });
|
|
});
|
|
|
|
$('#testPushbullet').click(function () {
|
|
$.get("testPushbullet",
|
|
function (data) { alert(data); });
|
|
});
|
|
|
|
$('#testSlack').click(function () {
|
|
$.get("testSlack",
|
|
function (data) { alert(data); });
|
|
});
|
|
|
|
$('#testEmail').click(function () {
|
|
$.get("testEmail",
|
|
function (data) { alert(data); });
|
|
});
|
|
|
|
$('#testPushover').click(function () {
|
|
$.get("testPushover",
|
|
function (data) { alert(data); });
|
|
});
|
|
|
|
$('#testNMA').click(function () {
|
|
$.get("testNMA",
|
|
function (data) { alert(data); });
|
|
});
|
|
|
|
$("#testAndroidPN").click(function () {
|
|
var androidpn_url = $.trim($("#androidpn_url").val());
|
|
var androidpn_username = $.trim($("#androidpn_username").val());
|
|
var androidpn_broadcast = ($("#androidpn_broadcast").prop('checked') == true) ? 'Y' : 'N';
|
|
$.get("/testAndroidPN", {'url': androidpn_url, 'username': androidpn_username, 'broadcast': androidpn_broadcast})
|
|
.done(function (data) {
|
|
$("#testAndroidPN-result").html(data);
|
|
});
|
|
});
|
|
|
|
// when the page first loads, hide all tab headers and panels
|
|
$('#tabs ul li').removeClass('active');
|
|
$('.table_wrapper').hide();
|
|
// then show the one we want
|
|
var tabnum = $("#current_tab").val()
|
|
var tabid = $(".tabs-" + tabnum);
|
|
$(tabid).parent().show();
|
|
var tabid = $("#" + tabnum);
|
|
tabid.addClass('active');
|
|
|
|
// when a tab is clicked
|
|
$("li[role='presentation']").click(function(){
|
|
// store current tab for python
|
|
var tabnum = $(this).attr('id');
|
|
$("#current_tab").val(tabnum);
|
|
// hide all tab headers and panels
|
|
$('#tabs ul li').removeClass('active');
|
|
$('.table_wrapper').hide();
|
|
// then show the one we want
|
|
var tabid = $(".tabs-" + tabnum);
|
|
tabid.parent().show();
|
|
var tabid = $("#" + tabnum);
|
|
tabid.addClass('active');
|
|
})
|
|
|
|
}
|
|
|
|
$(document).ready(function() {
|
|
initThisPage();
|
|
});
|
|
</script>
|
|
</%def>
|