1
0
Fork 0
mirror of https://github.com/evilhero/mylar synced 2024-12-26 17:46:52 +00:00
mylar/data/interfaces/default/config.html
evilhero cdc3e8a7a0 IMP: Cleaned up interface for StoryArcs / Story Arc Details, IMP: Cleaned up interface for Reading list Management, IMP: Added better reading list management - new status (added, downloaded, read), IMP: Added sync option for use with another device for reading list transfer (ie. tablet) Android only, IMP: Autopopulate new weekly pull releases to reading list, IMP: 'Watch' option in weekly pull list now fully functional. Will watch CV for series' that do not have any series data yet as they are new starting series. Will auto-add once available, IMP: Auto-watch check is run after every refresh/recreate of the weeklypull list, IMP: Improved the Add a Series option where it will now look for issues that are 'new' or 'wanted' during add sequence, IMP: Main page interface now has coloured have/total bars to denote series completion, IMP: New scheduler / threading locks in place in an attempt to avoid database locks, FIX: Removed some erroneous locking that was going on when importing a directory was being run, IMP: Stat counter now present when post-processing multiple issues in sequence, FIX: for issue number error when post-processing and issue number was a non-alphanumeric, FIX: for metatagging: when original file was .cbz, would try to convert and fail, FIX: for issues that were negative and were preceeded by a # in the filename (filechecker), FIX: for publisher having non-alphanumeric character in name when attempting to determine publisher, FIX: if annuals enabled, would incorrectly show as being 'already in library' when viewing search results if results constained annuals, FIX:(#944) for incorrect nzbname being used when post-processing was being performed from an nzb client (experimental mainly), IMP: Turned off logging for ComicVine API counter, FIX: Added retry attempts when connecting to ComicVine in order to avoid errors when adding a series, IMP:(#963) Added ability to add snatched to filter when viewing Wanted issues on Wanted tab, FIX: When importing and then selecting a series to import via the select screen, will now flip back to the importresults and add the selected series in the background, IMP:(#952) Main page is now sorted in ascending order by Continuing/Ended status (and subbed by whether is Active/Paused).Custom sorting is still available, FIX: Dupecheck will now automatically assume existing 0-byte files are to be overwritten when performing post-processing, FIX: If publication date for series contained a '?' (usually with brand new series) will force to 'Present' to allow for pull-list comparisons to take place, FIX: Mylar will now disallow search results which have 'covers only' or 'variant' in the filename, IMP: Better nzbname generation/retrieval (will check inside nzb for possible names) to be used when post-processing, IMP: DB Update will now perform update to all active comics in descending order by Latest Date (instead of random order), FIX: Enforce the 5hr limit rule when running DB update (will only update series that haven't been updated in >5 hours), FIX: Annuals will now have/retain the proper status upon doing DB Update, FIX: Have totals will now be updated when doing a recheck files (sometimes wouldn't get updated depending on various states of status'), FIX:(#966) Added urllib2.URLError exeception trap when attempting to check Git for updates, IMP: Removed the individual sqlite calls for weeklypull, and brought them into line with using the db module (which will minimize concurrent access, which seemed to be causing db locks), IMP: Cleaned up some code and shuffled some functions so they are in more appropriate locations
2015-03-27 13:27:59 -04:00

1261 lines
76 KiB
HTML
Executable file

<%inherit file="base.html"/>
<%!
import mylar
%>
<%def name="headerIncludes()">
<div id="subhead_container">
<div id="subhead_menu">
<a id="menu_link_shutdown" href="shutdown">Shut Down</a>
<a id="menu_link_shutdown" href="restart">Restart</a>
</div>
</div>
</%def>
<%def name="body()">
<%
mylar.DONATEBUTTON = False
%>
<div id="paddingheader">
<h1 class="clearfix"><img src="interfaces/default/images/icon_gear.png" alt="settings"/>Settings</h1>
</div>
<form action="configUpdate" method="post" class="form" id="configUpdate">
<div id="tabs">
<ul>
<li><a href="#tabs-1">Information</a></li>
<li><a href="#tabs-2">Web Interface</a></li>
<li><a href="#tabs-3">Download settings</a></li>
<li><a href="#tabs-4">Search providers</a></li>
<li><a href="#tabs-5">Quality &amp; Post Processing</a></li>
<li><a href="#tabs-6">Advanced Settings</a></li>
</ul>
<div id="tabs-1">
<table class="configtable" summary="Information">
<tr>
<td>
<fieldset>
<legend>Configuration Options</legend>
<div>
<label><strong>Mylar Version: </strong> ${config['branch']}</br> -- ${config['br_type']} build ${config['br_version']}.</label></br>
<label><strong>Python Version :</strong> ${config['py_version']}</label></br></br>
<legend>MYLAR PROGRAM OPTIONS</legend>
<label><strong>Mylar Data Directory :</strong> ${config['data_dir']}</label></br>
<label><strong>Mylar Program Directory :</strong> ${config['prog_dir']}</label></br>
<label><strong>Mylar Cache Directory :</strong> ${config['cache_dir']}</label></br>
<label><strong>Mylar Config File :</strong>${config['config_file']}</label></br>
</div>
</fieldset>
<fieldset>
<legend>DONATIONS</legend>
<a name="donate"></a>
<div align="center">
<label><strong>Mylar is free to use,</br>
but you can contribute and support the development</br>
by buying me a coffee (or several)</strong></label></br></br>
</div>
<div style="width: 60%; margin: 0px auto;">
<a id="navDonate" href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&amp;hosted_button_id=EWQADB5AMVRFU" rel="noreferrer" onclick="window.open('http://dereferer.org/?' + this.href); return false;"><img src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_SM.gif" alt="[donate]" /></a>
<a href="https://flattr.com/submit/auto?user_id=evilhero&url=https://github.com/evilhero/mylar&title=Mylar%20Donation%description=Supporting&20the%development%20of%20Mylar&language=en_CA&hidden=1&category=software" target="_blank">
<img src="//api.flattr.com/button/flattr-badge-large.png" alt="Flattr this" title="Flattr this" border="0" align="center">
</a>
<a href="#" onclick="javascript:window.prompt('Please copy/paste my Bitcoin address into your Bitcoin client.', '18eCE9wZxnNiZgE4Cc5pwJMnMjEfhdmH4U');"><img src="interfaces/default/images/bitcoin.png" alt="Bitcoin" height="20" align="center"></a></div>
</div>
</fieldset>
</td>
<td>
<fieldset>
<legend>Bragging Rights</legend>
<div>
<label><strong># of Series you're watching: </strong> ${comicinfo['COUNT_COMICS']}</br></label>
<label><strong># of Issues you're watching: </strong> ${comicinfo['COUNT_ISSUES']}</br></label>
<label><strong># of Issues you actually have: </strong> ${comicinfo['COUNT_HAVES']}</br></label>
<label><strong> ... total HD-space being used: </strong> ${comicinfo['COUNT_SIZE']}</br></label>
</div>
</fieldset>
<fieldset>
<legend>Useful Information</legend>
<div class="row">
<label><strong>Homepage</strong></label>
<div>Coming Soon...</div>
</div>
<div class="row">
<label><strong>Forums</strong></label>
<div><a href="http://forum.mylarcomics.com/" target="_blank">http://forum.mylarcomics.com</a></div>
</div>
<div class="row">
<label><strong>Source</strong></label>
<div><a href="https://github.com/evilhero/mylar/" target="_blank">https://github.com/evilhero/mylar/</a></div>
</div>
<div class="row">
<label><strong>Issues</strong></label>
<div><a href="https://github.com/evilhero/mylar/issues" target="_blank">https://github.com/evilhero/mylar/issues/</a></div>
</div>
<div class="row">
<label><strong>Internet Relay Chat</strong></label>
<div><a href="irc://irc.freenode.net/#mylar" target="_blank">#mylar on irc.freenode.net</a></div>
</div>
</fieldset>
<fieldset>
<legend>Branch history</legend>
<label>This would be a nice place to see revision history...</label>
<!--
<div>${config['branch_history']}</div>
-->
</fieldset>
</td>
</tr>
</table>
</div>
<div id="tabs-2">
<table class="configtable" summary="Web Interface">
<tr>
<td>
<fieldset>
<legend>Basic</legend>
<div class="row">
<label>HTTP Host</label>
<input type="text" name="http_host" value="${config['http_host']}" size="30">
<small>e.g. localhost or 0.0.0.0</small>
</div>
<div class="row">
<label>HTTP Port</label>
<input type="text" name="http_port" value="${config['http_port']}" size="10">
<div>
<div class="row">
<div class="row checkbox">
<input type="checkbox" name="enable_https" id="enable_https" value="1" ${config['enable_https']} />
<label title="Enable HTTPS for web server for encrypted communication">
Enable HTTPS
</label>
</div>
<div id="https_options">
<div class="row">
<label>HTTPS Cert</label>
<input type="text" title="the FULL path to the certificate" name="https_cert" value="${config['https_cert']}" size="30">
</div>
<div class="row">
<label>HTTPS Key</label>
<input type="text" title="the FULL path to the key" name="https_key" value="${config['https_key']}" size="30">
</div>
</div>
</div>
<div class="row">
<label>HTTP Username</label>
<input type="text" name="http_username" value="${config['http_user']}" size="30">
</div>
<div class="row">
<label>HTTP Password</label>
<input type="password" name="http_password" value="${config['http_pass']}" size="30">
</div>
<div class="row checkbox">
<input type="checkbox" name="launch_browser" value="1" ${config['launch_browser']} /> <label>Launch Browser on Startup</label>
</div>
<!--
<div class="row checkbox">
<input type="checkbox" name="logverbose" value="2" ${config['logverbose']} /> <label>Verbose Logging</label>
<br/><small>*Use this only when experiencing problems*</small>
</div>
-->
<div class="row checkbox">
<input type="checkbox" name="syno_fix" value="1" ${config['syno_fix']} /> <label>Synology Fix</label>
<br/><small>*Use this if experiencing parsing problems*</small>
</div>
<div class="row checkbox">
<input type="checkbox" name="cvapifix" value="1" ${config['cvapifix']} /> <label>Comicvine URL Fix</label>
<br/><small>*Use this if CV's URL has changed*</small>
</div>
<!--
<div class="row checkbox">
<input type="checkbox" name="auto_update" value="1" ${config['auto_update']} /> <label>Automatic Updates</label>
<br/><small>Install new updates with no intervention</small>
</div>
-->
</fieldset>
<fieldset>
<legend>Annual Handling</legend>
<div>
<small class="heading"><span style="float: left; margin-right: .3em; margin-top: 4px;" class="ui-icon ui-icon-info"></span>Series need to be Refreshed for annuals to appear</small>
</div>
<div class="row checkbox">
<input type="checkbox" name="annuals_on" value="1" ${config['annuals_on']} /><label>Enable Series-Annual Integration</label>
</div>
</br><small>Enabled: Annuals are tracked as part of the series it belongs to</small></br>
<small>Disabled: Annuals are tracked independently and will appear on your watchlist as a series</small>
</fieldset>
</td>
<td>
<fieldset>
<legend>API</legend>
<div class="row">
<label>ComicVine API Key</label>
<input type="text" name="comicvine_api" value="${config['comicvine_api']}" title="get one for free @ http://api.comicvine.com" size="40">
<small>specify your own CV API key here </small>
</div>
<div class="row checkbox">
<input id="api_enabled" type="checkbox" onclick="initConfigCheckbox($(this));" name="api_enabled" value="1" ${config['api_enabled']} /><label>Enable API</label>
</div>
<div class="apioptions">
<div class="row">
<label>Mylar API key</label>
<input type="text" name="api_key" id="api_key" value="${config['api_key']}" size="20">
<input type="button" value="Generate" id="generate_api">
<small>Current API key: <strong>${config['api_key']}</strong></small>
</div>
</div>
</fieldset>
<fieldset>
<legend>Interval</legend>
<div class="row">
<label>NZB Search Interval</label>
<input type="text" name="nzb_search_interval" value="${config['nzb_search_interval']}" size="4">mins
<div class="row checkbox">
<input type="checkbox" name="nzb_startup_search" value="1" ${config['nzb_startup_search']} /><label>NZB Search on startup</label>
</div>
<div class="row">
<label>Search delay</label>
<input type="text" name="search_delay" value="${config['search_delay']}" size="4" />mins
</div>
</div>
<div class="row">
<label>Library Scan Interval</label>
<input type="text" name="libraryscan_interval" value="${config['libraryscan_interval']}" size="4">mins
</div>
<legend>Comic Location</legend>
<div>
<small class="heading"><span style="float: left; margin-right: .3em; margin-top: 4px;" class="ui-icon ui-icon-info"></span>Automatic folder creation happens BENEATH this path</small>
</div>
<div class="row">
<label>Comic Location Path</label>
<input type="text" name="destination_dir" value="${config['destination_dir']}" size="50">
<small>Where do you store your comics?<br/> (or where do you want me to store them)</small>
<small>e.g. /Users/name/Comics or /Volumes/share/comics</small>
</div>
<div class="row">
<label>Directory CHMOD</label>
<input type="text" name="chmod_dir" value="${config['chmod_dir']}" size="50">
<small>Permissions on created/moved directories</small>
</div>
<div class="row">
<label>File CHMOD</label>
<input type="text" name="chmod_file" value="${config['chmod_file']}" size="50">
<small>Permissions on created/moved directories</small>
</div>
</fieldset>
</td>
</tr>
</table>
</div>
<div id="tabs-3">
<table class="configtable" summary="Download Settings">
<tr>
<td>
<fieldset>
<legend>Usenet</legend>
<input type="radio" name="nzb_downloader" id="nzb_downloader_sabnzbd" value="0" ${config['nzb_downloader_sabnzbd']}>Sabnzbd <input type="radio" name="nzb_downloader" id="nzb_downloader_nzbget" value="1" ${config['nzb_downloader_nzbget']}> NZBget <input type="radio" name="nzb_downloader" id="nzb_downloader_blackhole" value="2" ${config['nzb_downloader_blackhole']}>Black Hole
</fieldset>
<fieldset id="sabnzbd_options">
<div class="row">
<label>SABnzbd Host:</label>
<input type="text" name="sab_host" value="${config['sab_host']}" size="30">
<small>usually http://localhost:8080</small>
</div>
<div class="row">
<label>SABnzbd Username</label>
<input type="text" name="sab_username" value="${config['sab_user']}" size="20">
</div>
<div class="row">
<label>SABnzbd Password:</label>
<input type="password" name="sab_password" value="${config['sab_pass']}" size="20">
</div>
<div Class="row">
<div class="populatesab">
<label>SABnzbd API:</label>
<input type="text" name="sab_apikey" id="sab_apikey" value="${config['sab_api']}" size="28">
<!--
<input style="float:right" type="button"><image src="interfaces/default/images/submit.png" height="20" width="20" title="Attempt to auto-populate SABnzbd API" id="find_sabapi">
-->
<a href="#" style="float:right" type="button" id="find_sabapi" data-success="Sucessfully retrieved SABnzbd API" data-error="Error auto-populating SABnzbd API"><span class="ui-icon ui-icon-extlink"></span>Get API</a>
</div>
</div>
<div class="row">
<label>SABnzbd Download Directory</label>
<input type="text" name="sab_directory" value="${config['sab_directory']}" size="36" />
<small>Where your SAB downloads go... (optional)</small>
</div>
<div class="row">
<label>SABnzbd Category:</label>
<input type="text" name="sab_category" value="${config['sab_cat']}" size="20">
</div>
<div class="row">
<label>SAB Priority</label>
<select name="sab_priority">
%for prio in ['Default', 'Low', 'Normal', 'High', 'Paused']:
<%
if config['sab_priority'] == prio:
outputselect = 'selected'
else:
outputselect = ''
%>
<option value=${prio} ${outputselect}>${prio}</option>
%endfor
</select>
</div>
<!--
<div class="row">
<a href="#" style="float:right" type="button" onclick="doAjaxCall('addAction();SABtest',$(this))" data-success="Sucessfully tested SABnzbd connection" data-error="Error testing SABnzbd connection"><span class="ui-icon ui-icon-extlink"></span>Test SABnzbd</a>
</div>
-->
</fieldset>
<fieldset id="nzbget_options">
<div class="row">
<label>NZBGet Host:</label>
<input type="text" name="nzbget_host" value="${config['nzbget_host']}" size="30">
<small>usually http://localhost</small>
</div>
<div class="row">
<label>NZBGet Port:</label>
<input type="text" name="nzbget_port" value="${config['nzbget_port']}" size="36">
</div>
<div class="row">
<label>NZBGet Username:</label>
<input type="text" name="nzbget_username" value="${config['nzbget_user']}" size="20">
</div>
<div class="row">
<label>NZBGet Password:</label>
<input type="password" name="nzbget_password" value="${config['nzbget_pass']}" size="20">
</div>
<div class="row">
<label>NZBGet Download Directory</label>
<input type="text" name="nzbget_directory" value="${config['nzbget_directory']}" size="36" />
<small>Where your NZBGet downloads go... (optional)</small>
</div>
<div class="row">
<label>NZBGet Category:</label>
<input type="text" name="nzbget_category" value="${config['nzbget_cat']}" size="20">
</div>
<div class="row">
<label>NZBGet Priority</label>
<select name="nzbget_priority">
%for prio in ['Default', 'Low', 'Normal', 'High', 'Paused']:
<%
if config['nzbget_priority'] == prio:
outputselect = 'selected'
else:
outputselect = ''
%>
<option value=${prio} ${outputselect}>${prio}</option>
%endfor
</select>
</div>
</fieldset>
<fieldset id="blackhole_options">
<div class="row">
<label>Black Hole Directory</label>
<input type="text" name="blackhole_dir" value="${config['blackhole_dir']}" size="30">
<small>Folder your Download program watches for NZBs</small>
</div>
</fieldset>
<fieldset id="general_nzb_options">
<div class="checkbox row">
<label>Usenet Retention (in days)</label>
<input type="text" name="usenet_retention" value="${config['usenet_retention']}" size="10">
</div>
</fieldset>
</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="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>
</div>
</fieldset>
</td>
</tr>
</table>
</div>
<div id="tabs-4">
<table class="configtable" summary="Search Providers">
<tr>
<td>
<fieldset>
<div class="row checkbox left clearfix">
<input id="enable_rss" type="checkbox" onclick="initConfigCheckbox($(this));" name="enable_rss" value=1 ${config['enable_rss']} /><label>Enable RSS Feed Searches (nzbs & torrents)</label>
</div>
<div class="config">
<label>RSS Inteval Feed Check</label>
<input type="text" name="rss_checkinterval" value="${config['rss_checkinterval']}" size="6" /><small>(Mins)</small>
<a href="#" style="float:right" type="button" onclick="doAjaxCall('force_rss',$(this))" data-success="RSS Force now running" data-error="Error trying to retrieve RSS Feeds"><span class="ui-icon ui-icon-extlink"></span>Force RSS</a>
</br><small><% rss_last=mylar.RSS_LASTRUN %>last run: ${rss_last}</small>
</div>
</fieldset>
<fieldset>
<div class="row checkbox left clearfix">
<input id="usenzbsu" type="checkbox" onclick="initConfigCheckbox($(this));" name="nzbsu" value="1" ${config['use_nzbsu']} /><legend>NZB.SU</legend>
</div>
<div class="config">
<div class="row">
<label>NZB.SU UID</label>
<input type="text" name="nzbsu_uid" value="${config['nzbsu_uid']}" size="15" >
<small>( only needed for RSS feed )</small>
</div>
<div class="row">
<label>NZB.SU API</label>
<input type="text" name="nzbsu_apikey" value="${config['nzbsu_api']}" size="36">
</div>
</div>
</fieldset>
<fieldset>
<div class="row checkbox left clearfix">
<input id="usedognzb" type="checkbox" onclick="initConfigCheckbox($(this));" name="dognzb" value="1" ${config['use_dognzb']} /><legend>DOGNZB</legend>
</div>
<div class="config">
<div class="row">
<label>DOGNZB UID</label>
<input type="text" name="dognzb_uid" value="${config['dognzb_uid']}" size="15">
<small>( only needed for RSS feed )</small>
</div>
<div class="row">
<label>DOGNZB API</label>
<input type="text" name="dognzb_apikey" value="${config['dognzb_api']}" size="36">
</div>
</div>
</fieldset>
<fieldset>
<div class="row checkbox left clearfix">
<input id="useexperimental" type="checkbox" onclick="initConfigCheckbox($(this));" name="experimental" value="1" ${config['use_experimental']} /><legend>Use Experimental Search</legend>
</div>
<div>
<small class="heading"><span style="float: left; margin-right: .3em; margin-top: 4px;" class="ui-icon ui-icon-info"></span>Note: this is an experimental search - results may be better/worse.</small>
</div>
</fieldset>
<fieldset>
<div class="row checkbox left clearfix">
<input id="enable_torrent_search" type="checkbox" onclick="initConfigCheckbox($(this));" name="enable_torrent_search" value=1 ${config['enable_torrent_search']} /><legend>Torrents</legned>
</div>
<div class="config">
<div class="row checkbox left clearfix">
<input id="enable_kat" type="checkbox" name="enable_kat" value=1 ${config['enable_kat']} /><label>Enable KAT</label>
</div>
<div class="row checkbox left clearfix">
<input id="enable_cbt" type="checkbox" onclick="initConfigCheckbox($(this));" name="enable_cbt" value=1 ${config['enable_cbt']} /><label>Enable CBT</label>
</div>
<div class="config">
<label>&nbspPasskey</label>
<input type="text" name="cbt_passkey" value="${config['cbt_passkey']}" size="36">
</div>
</div>
</div>
</fieldset>
</td>
<td>
<fieldset>
<legend>Newznab</legend>
<div class="row checkbox">
<input id="usenewznab" type="checkbox" name="newznab" onclick="initConfigCheckbox($(this));" value="1" ${config['use_newznab']} /><label>Use Newznab</label>
</div>
<div id="newznab_providers">
<%
newznab_number = 1
%>
%for newznab in config['extra_newznabs']:
<%
if newznab[4] == '1' or newznab[4] == 1:
newznab_enabled = "checked"
else:
newznab_enabled = ""
%>
<div class="config" id="newznab${newznab_number}">
<div class="row">
<label>Newznab Name</label>
<input type="text" name="newznab_name${newznab_number}" value="${newznab[0]}" size="30">
</div>
<div class="row">
<label>Newznab Host</label>
<input type="text" name="newznab_host${newznab_number}" value="${newznab[1]}" size="30">
</div>
<div class="row">
<label>Newznab API</label>
<input type="text" name="newznab_api${newznab_number}" value="${newznab[2]}" size="36">
</div>
<div class="row">
<label>Newznab UID</label>
<input type="text" name="newznab_uid${newznab_number}" value="${newznab[3]}" size="15">
<small>( only needed for RSS feed )</small>
</div>
<div class="row checkbox">
<input id="newznab_enabled" type="checkbox" name="newznab_enabled${newznab_number}" value="1" ${newznab_enabled} /><label>Enabled</label>
</div>
<div class="row">
<input type="button" class="remove" id="newznab${newznab_number}" value="Remove ${newznab[0]}">
</div>
</div>
<%
newznab_number += 1
%>
%endfor
<input type="button" value="Add Newznab" class="add_newznab" id="add_newznab" />
</div>
</fieldset>
<!--
<fieldset>
<div id="newznab providers">
<%
order_number = 1
%>
%for p_order in config['provider_order']:
<div class="config" id="p_order${order_number}">
<div class="row">
<label>${p_order[0]}</label>
<label>${p_order[1]}</label>
</div>
<div>
<%
order_number += 1
%>
%endfor
</div>
</fieldset>
-->
</td>
</tr>
</table>
</div>
<div id="tabs-5">
<table class="configtable" summary="Post Processing">
<tr>
<td>
<fieldset>
<legend>Quality</legend>
<div class="row radio left clearfix">
<input type="radio" style="vertical-align: middle; margin: 3px; margin-top: -1px;" name="preferred_quality" value="1" ${config['pref_qual_1']} /><label>cbr</label>
<input type="radio" style="vertical-align: middle; margin: 3px; margin-top: -1px;" name="preferred_quality" value="2" ${config['pref_qual_2']} /><label>cbz</label>
<input type="radio" style="vertical-align: middle; margin: 3px; margin-top: -1px;" name="preferred_quality" value="0" ${config['pref_qual_0']} /><label>Whichever - just get it</label>
</div>
</fieldset>
<fieldset>
<legend>File-Size Search Restrictions</legend>
<div class="row checkbox left">
<input id="use_minsize" type="checkbox" style="vertical-align: middle; margin: 3px; margin-top: -1px;" onclick="initConfigCheckbox($(this));" name="use_minsize" value="1" ${config['use_minsize']} /><label>Minimum File size<small>(MB)</small></label>
</div>
<div class="config">
<div class="row">
<input type="text" name="minsize" value="${config['minsize']}" size="6">
</div>
</div>
</div>
</fieldset>
<fieldset>
<div class="row checkbox left">
<input id="use_maxsize" type="checkbox" style="vertical-align: middle; margin: 3px; margin-top: -1px;" onclick="initConfigCheckbox($(this));" name="use_maxsize" value="1" ${config['use_maxsize']} /><label>Maximum File size<small>(MB)</small></label>
</div>
<div class="config">
<div class="row">
<input type="text" name="maxsize" value="${config['maxsize']}" size="6">
</div>
</div>
</fieldset>
<fieldset>
<legend>Duplicate Handling</legend>
<div class="row">
<label>Retain based on</label>
<select name="dupeconstraint">
%for x in ['filesize', 'filetype-cbr', 'filetype-cbz']:
<%
if config['dupeconstraint'] == x:
outputselect = 'selected'
else:
outputselect = ''
%>
<option value=${x} ${outputselect}>${x}</option>
%endfor
</select>
</div>
</fieldset>
<fieldset>
<legend>Failed Download Handling</legend>
<div class="row checkbox left clearfix">
<input type="checkbox" id="enable_failed" onclick="initConfigCheckbox($this));" name="failed_download_handling" value="1" ${config['failed_download_handling']} /><label>Enable Failed Download Handling</label>
</div>
<div class="config">
<div class="row checkbox left clearfix">
<input type="checkbox" name="failed_auto" value="1" ${config['failed_auto']} /><label>Enable Automatic-Retry for Failed Downloads</label>
</div>
</fieldset>
</td>
<td>
<fieldset>
<legend>Post-Processing</legend>
<div class="row checkbox left clearfix">
<input type="checkbox" id="post_processing" onclick="initConfigCheckbox($this));" name="post_processing" value="1" ${config['post_processing']} /><label>Enable Post-Processing<small> (not checked = NO post-processing/post-management)</small></label>
</div>
<div class="config">
<div class="row checkbox left clearfix">
<input type="checkbox" id="enable_check_folder" onclick="initConfigCheckbox($this));" name="enable_check_folder" value="1" ${config['enable_check_folder']} /><label>Enable Folder Monitoring<small></label>
</div>
<div class="config">
<div class="row">
<label>Folder location to monitor</label>
<input type="text" name="check_folder" value="${config['check_folder']}" size="30">
<small>enter in the absolute path to monitor for new issues</small>
</div>
<div class="row">
<label>Folder Monitor Scan Interval</label>
<input type="text" name="download_scan_interval" value="${config['download_scan_interval']}" size="4">mins
<small>enter in the time delay scanning the folder</small>
</div>
</div>
</div>
<div class="row checkbox left clearfix">
<input type="checkbox" id="enable_pre_scripts" onclick="initConfigCheckbox($this));" name="enable_pre_scripts" value="1" ${config['enable_pre_scripts']} /><label>Use Extra Script BEFORE Post-Processing</label>
</div>
<div class="config">
<div class="row">
<label>Pre - Script Location</label>
<input type="text" name="pre_scripts" value="${config['pre_scripts']}" size="30">
<small>enter in the absolute path to the script</small>
</div>
</div>
<div class="row checkbox left clearfix">
<input type="checkbox" id="enable_extra_scripts" onclick="initConfigCheckbox($this));" name="enable_extra_scripts" value="1" ${config['enable_extra_scripts']} /><label>Use Extra Script AFTER Post-Processing</label>
</div>
<div class="config">
<div class="row">
<label>Extra Script Location</label>
<input type="text" name="extra_scripts" value="${config['extra_scripts']}" size="30">
<small>enter in the absolute path to the script</small>
</div>
</div>
</fieldset>
<fieldset>
<legend>Metadata Tagging</legend><small class="heading"><span style="float: left; margin-right: .3em; margin-top: 4px;" class="ui-icon ui-icon-info"></span>ComicTagger and configparser are required</small>
<div class="row checkbox left clearfix">
<input id="enable_meta" type="checkbox" onclick="initConfigCheckbox($this));" name="enable_meta" value="1" ${config['enable_meta']} /><label>Enable Metadata Tagging</label>
</div>
<div class="config">
<div class="row">
<label>ComicTagger Path</label>
<input type="text" name="cmtagger_path" value="${config['cmtagger_path']}" size="30" />
<small>If left blank, will assume it's in root of mylar</small>
</div>
<div class="row checkbox left clearfix">
<input type="checkbox" name="ct_tag_cr" value="1" ${config['ct_tag_cr']} /><label>Write ComicRack (cr) tags (ComicInfo.xml)</label>
</div>
<div class="row checkbox left clearfix">
<input type="checkbox" name="ct_tag_cbl" value="1" ${config['ct_tag_cbl']} /><label>Write ComicBookLover (Cbl) tags (zip comment)</label>
</div>
<div class="row checkbox left clearfix">
<input type="checkbox" name="ct_cbz_overwrite" value="1" ${config['ct_cbz_overwrite']} /><label>Overwrite existing cbz tags (if they exist)</label>
</div>
<div>
<small><center>If ComicVine API Key specified, will use with ComicTagger</center></small>
<small><center>Writing each type of metadata will increase API count respectively</center></small>
</div>
</div>
</fieldset>
</td>
</tr>
</table>
</div>
<div id="tabs-6">
<table class="configtable" summary="Advanced Settings">
<tr>
<td>
<fieldset>
<legend>Renaming options</legend>
<div class="row checkbox left clearfix">
<input type="checkbox" name="rename_files" value="1" ${config['rename_files']} /><label>Rename files </label>
</div>
<div>
<label>*Folder Format is used only when adding new comics*</label>
</div>
<div class="row">
<label>Folder Format</label>
<input type="text" title="$Publisher, $Series, $Year" name="folder_format" value="${config['folder_format']}" size="43">
<small>Use: $Publisher, $Series, $Year<br />
E.g.: $Publisher/$Series ($Year) = DC Comics/Action Comics (2011)</small>
</div>
<div class="row">
<label> File Format</label>
<input type="text" name="file_format" value="${config['file_format']}" size="43">
<%
file_options = "$Series = SeriesName\n$Year = SeriesYear\n$Annual = Annual (word)\n$Issue = IssueNumber\n$VolumeY = V{SeriesYear}\n$VolumeN = V{Volume#}\n$month = publication month number\n$monthname = publication month name"
%>
<a href="#" title="${file_options}"><img src="interfaces/default/images/info32.png" height="16" alt="" /></a>
<small>Use: $Series, $Year, $Issue<br />
E.g.: $Series $Issue ($Year) = Animal Man 0 (2012) </small>
<small>if tag isn't available, won't create it</small>
</div>
</fieldset>
<fieldset>
<legend>Advanced Options</legend>
<div class="row checkbox">
<input id="replace_spaces" type="checkbox" onclick="initConfigCheckbox($(this));" name="replace_spaces" value="1" ${config['replace_spaces']} /><label>Replace Spaces</label>
</div>
<div class="row">
<label>Format</label>
<select name="replace_char">
%for x in ['.', '_']:
<%
if config['replace_char'] == x:
outputselect = 'selected'
else:
outputselect = ''
%>
<option value=${x} ${outputselect}>${x}</option>
%endfor
</select>
</div>
<div class="row checkbox">
<input id="zero_level" type="checkbox" onclick="initConfigCheckbox($(this));" name="zero_level" value="1" ${config['zero_level']} /><label>Issue Number Padding</label>
</div>
<div class="row">
<label>Format</label>
<select name="zero_level_n">
%for zeros in ['none', '0x', '00x']:
<%
if config['zero_level_n'] == zeros:
outputselect = 'selected'
else:
outputselect = ''
%>
<option value=${zeros} ${outputselect}>${zeros}</option>
%endfor
</select>
</div>
<div class="row checkboxclearfix">
<input type="checkbox" name="lowercase_filenames" value="1" ${config['lowercase_filenames']} /><label>Lowercase the entire filename</label><br/>
<small>(will work regardless if Rename Files is enabled)</small>
</div>
</fieldset>
</td>
<td>
<fieldset>
<legend>Miscellaneous</legend>
<div class="row checkbox left clearfix">
<input type="checkbox" style="vertical-align: middle; margin: 3px; margin-top: -1px;" name="autowant_upcoming" value="1" ${config['autowant_upcoming']} /><label>Automatically Mark Upcoming Issues as Wanted</label>
<input type="checkbox" style="vertical-align: middle; margin: 3px; margin-top: -1px;" name="autowant_all" value="1" ${config['autowant_all']} /><label>Automatically Mark All Issues as Wanted</label>
<input type="checkbox" style="vertical-align: middle; margin: 3px; margin-top: -1px;" name="comic_cover_local" value="1" ${config['comic_cover_local']} /><label>Place cover.jpg into Comic Directory for each comic</label>
<input type="checkbox" style="vertical-align: middle; margin: 3px; margin-top: -1px;" name="cvinfo" value="1" ${config['cvinfo']} /><label>Write cvinfo into each comic directory</label>
%if mylar.ENABLE_TORRENTS:
<input type="checkbox" style="vertical-align: middle; margin: 3px; margin-top: -1px;" name="snatchedtorrent_notify" value="1" ${config['snatchedtorrent_notify']} /><label>Manual Post-Processing - Notify on Completed Torrents</label>
%endif
</div>
</fieldset>
<fieldset>
<legend>Interface</legend>
<div class="row">
<label>Interface</label>
<select name="interface"><h3>
%for interface in config['interface_list']:
<%
if interface == mylar.INTERFACE:
selected = 'selected="selected"'
else:
selected = ''
%>
<option value="${interface}" ${selected}>${interface}</option>
%endfor
</select>
</div>
<div class="row">
<label>Log Directory:</label>
<input type="text" name="log_dir" value="${config['log_dir']}" size="50">
</div>
<div class="row">
<label>Maximum Log Size (bytes):</label>
<input type="text" name="max_logsize" value="${config['max_logsize']}" size="20">
</div>
</fieldset>
<h2>Notifications</h2>
<fieldset>
<h3><img src="interfaces/default/images/prowl_logo.png" style="vertical-align: middle; margin: 3px; margin-top: -1px;" height="30" width="30"/>Prowl</h3>
<div class="row checkbox">
<input type="checkbox" name="prowl_enabled" id="prowl" value="1" ${config['prowl_enabled']} /><label>Enable Prowl Notifications</label>
</div>
<div id="prowloptions">
<div class="row">
<label>API key</label><input type="text" name="prowl_keys" value="${config['prowl_keys']}" size="50">
</div>
<div class="row checkbox">
<input type="checkbox" name="prowl_onsnatch" value="1" ${config['prowl_onsnatch']} /><label>Notify on snatch?</label>
</div>
<div class="row">
<label>Priority (-2,-1,0,1 or 2):</label>
<input type="text" name="prowl_priority" value="${config['prowl_priority']}" size="2">
</div>
</div>
</fieldset>
<fieldset>
<h3><img src="interfaces/default/images/nma_logo.png" style="vertical-align: middle; margin: 3px; margin-top: -1px;" height="30" width="30"/>NotifyMyAndroid</h3>
<div class="checkbox row">
<input type="checkbox" name="nma_enabled" id="nma" value="1" ${config['nma_enabled']} /><label>Enable NotifyMyAndroid</label>
</div>
<div id="nmaoptions">
<div class="row">
<div class="row checkbox">
<input type="checkbox" name="nma_onsnatch" value="1" ${config['nma_onsnatch']} /><label>Notify on snatch?</label>
</div>
<label>NotifyMyAndroid API Key</label>
<input type="text" name="nma_apikey" value="${config['nma_apikey']}" size="30">
<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 config['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>
</fieldset>
<fieldset>
<h3><img src="interfaces/default/images/pushover_logo.png" style="vertical-align: middle; margin: 3px; margin-top: -1px;" height="30" width="30"/>Pushover</h3>
<div class="row checkbox">
<input type="checkbox" name="pushover_enabled" id="pushover" value="1" ${config['pushover_enabled']} /><label>Enable Pushover Notifications</label>
</div>
<div id="pushoveroptions">
<div class="row">
<label>API key</label><input type="text" title="Leave blank if you don't have your own API (recommended to get your own)" name="pushover_apikey" value="${config['pushover_apikey']}" size="50">
</div>
<div class="row">
<label>User key</label><input type="text" name="pushover_userkey" value="${config['pushover_userkey']}" size="50">
</div>
<div class="row checkbox">
<input type="checkbox" name="pushover_onsnatch" value="1" ${config['pushover_onsnatch']} /><label>Notify on snatch?</label>
</div>
<div class="row">
<label>Priority (-2,-1,0,1 or 2):</label>
<input type="text" name="pushover_priority" value="${config['pushover_priority']}" size="2">
</div>
</div>
</fieldset>
<fieldset>
<h3><img src="interfaces/default/images/boxcar_logo.png" style="vertical-align: middle; margin: 3px; margin-top: -1px;" height="30" width="30"/>Boxcar.IO</h3>
<div class="checkbox row">
<input type="checkbox" name="boxcar_enabled" id="boxcar" value="1" ${config['boxcar_enabled']} /><label>Enable Boxcar.IO Notifications</label>
</div>
<div id="boxcaroptions">
<div class="row">
<div class="row checkbox">
<input type="checkbox" name="boxcar_onsnatch" value="1" ${config['boxcar_onsnatch']} /><label>Notify on snatch?</label>
</div>
<label>Boxcar Token</label>
<input type="text" name="boxcar_token" value="${config['boxcar_token']}" size="30">
</div>
</div>
</fieldset>
<fieldset>
<h3><img src="interfaces/default/images/pushbullet_logo.png" style="vertical-align: middle; margin: 3px; margin-top: -1px;" height="30" width="30"/>Pushbullet</h3>
<div class="row checkbox">
<input type="checkbox" name="pushbullet_enabled" id="pushbullet" value="1" ${config['pushbullet_enabled']} /><label>Enable PushBullet Notifications</label>
</div>
<div id="pushbulletoptions">
<div class="row checkbox">
<input type="checkbox" name="pushbullet_onsnatch" value="1" ${config['pushbullet_onsnatch']} /><label>Notify on snatch?</label>
</div>
<div class="row">
<label>API Key</label><input type="text" name="pushbullet_apikey" value="${config['pushbullet_apikey']}" size="50">
<small>Warning: Will send to ALL your pushbullet devices</small>
</div>
<div class="row">
<!-- <label>Device ID</label><input type="text" name="pushbullet_deviceid" value="${config['pushbullet_deviceid']}" size="50">
<label>Pushbullet device list</label>
<select name="pushbullet_device_list" id="pushbullet_device_list"></select>
<input type="hidden" id="pushbullet_deviceid" value="${config['pushbullet_deviceid']}" />
<input type="button" class="btn" value="Update device list" id="getPushbulletDevices" />
-->
</div>
</div>
</fieldset>
</td>
</tr>
</table>
</div>
<input type="button" value="Save Changes" onclick="doAjaxCall('configUpdate',$(this),'tabs',true);return false;" data-success="Changes saved successfully">
<div class="message">
<p><span class="ui-icon ui-icon-info" style="float: left; margin-right: .3em;"></span>Web Interface changes require a restart to take effect</p>
</div>
</form>
</div>
</%def>
<%def name="javascriptIncludes()">
<script>
hideServerDivs = function () {
$("#customoptions").slideUp();
$("#hpserveroptions").slideUp();
};
handleNewSelection = function () {
hideServerDivs();
switch ($(this).val()) {
case 'custom':
$("#customoptions").slideDown();
break;
case 'mylar':
$("#hpserveroptions").slideDown();
break;
}
};
function initThisPage()
{
if ($("#api_enabled").is(":checked"))
{
$("#apioptions").show();
}
else
{
$("#apioptions").hide();
}
$("#api_enabled").click(function(){
if ($("#api_enabled").is(":checked"))
{
$("#apioptions").slideDown();
}
else
{
$("#apioptions").slideUp();
}
});
if ($("#prowl").is(":checked"))
{
$("#prowloptions").show();
}
else
{
$("#prowloptions").hide();
}
$("#prowl").click(function(){
if ($("#prowl").is(":checked"))
{
$("#prowloptions").slideDown();
}
else
{
$("#prowloptions").slideUp();
}
});
if ($("#nma").is(":checked"))
{
$("#nmaoptions").show();
}
else
{
$("#nmaoptions").hide();
}
$("#nma").click(function(){
if ($("#nma").is(":checked"))
{
$("#nmaoptions").slideDown();
}
else
{
$("#nmaoptions").slideUp();
}
});
if ($("#pushover").is(":checked"))
{
$("#pushoveroptions").show();
}
else
{
$("#pushoveroptions").hide();
}
$("#pushover").click(function(){
if ($("#pushover").is(":checked"))
{
$("#pushoveroptions").slideDown();
}
else
{
$("#pushoveroptions").slideUp();
}
});
if ($("#boxcar").is(":checked"))
{
$("#boxcaroptions").show();
}
else
{
$("#boxcaroptions").hide();
}
$("#boxcar").click(function(){
if ($("#boxcar").is(":checked"))
{
$("#boxcaroptions").slideDown();
}
else
{
$("#boxcaroptions").slideUp();
}
});
if ($("#pushbullet").is(":checked"))
{
$("#pushbulletoptions").show();
}
else
{
$("#pushbulletoptions").hide();
}
$("#pushbullet").click(function(){
if ($("#pushbullet").is(":checked"))
{
$("#pushbulletoptions").slideDown();
}
else
{
$("#pushbulletoptions").slideUp();
}
if ($("#nzb_downloader_sabnzbd").is(":checked"))
{
$("#nzbget_options,#blackhole_options").hide();
$("#sabnzbd_options").show();
}
if ($("#nzb_downloader_nzbget").is(":checked"))
{
$("#sabnzbd_options,#blackhole_options").hide();
$("#nzbget_options").show();
}
if ($("#nzb_downloader_blackhole").is(":checked"))
{
$("#sabnzbd_options,#nzbget_options").hide();
$("#blackhole_options").show();
}
});
$('input[type=radio]').change(function(){
if ($("#nzb_downloader_sabnzbd").is(":checked"))
{
$("#nzbget_options,#blackhole_options").fadeOut("fast", function() { $("#sabnzbd_options").fadeIn() });
}
if ($("#nzb_downloader_nzbget").is(":checked"))
{
$("#sabnzbd_options,#blackhole_options").fadeOut("fast", function() { $("#nzbget_options").fadeIn() });
}
if ($("#nzb_downloader_blackhole").is(":checked"))
{
$("#sabnzbd_options,#nzbget_options").fadeOut("fast", function() { $("#blackhole_options").fadeIn() });
}
});
var deletedNewznabs = 0;
$(".remove").click(function() {
$(this).parent().parent().remove();
deletedNewznabs = deletedNewznabs + 1;
});
$('#api_key').click(function(){ $('#api_key').select() });
$("#generate_api").click(function(){
$.get('generateAPI',
function(data){
if (data.error != undefined) {
alert(data.error);
return;
}
$('#api_key').val(data);
});
});
if ($("#enable_https").is(":checked"))
{
$("#https_options").show();
}
else
{
$("#https_options").hide();
}
$("#enable_https").click(function(){
if ($("#enable_https").is(":checked"))
{
$("#https_options").slideDown();
}
else
{
$("#https_options").slideUp();
}
});
$('#sab_apikey').click(function(){ $('#sab_apikey').select() });
$("#find_sabapi").click(function(){
$.get('findsabAPI',
function(data){
if (data.error != undefined) {
alert(data.error);
return;
}
$('#sab_apikey').val(data);
});
});
$("#add_newznab").click(function() {
var intId = $("#newznab_providers > div").size() + deletedNewznabs + 1;
var formfields = $("<div class=\"config\" id=\"newznab" + intId + "\"><div class=\"row\"><label>Newznab Name</label><input type=\"text\" name=\"newznab_name" + intId + "\" size=\"36\"></div><div class=\"row\"><label>Newznab Host</label><input type=\"text\" name=\"newznab_host" + intId + "\" + value=\"http://\" + size=\"30\"></div><div class=\"row\"><label>Newznab API</label><input type=\"text\" name=\"newznab_api" + intId + "\" size=\"36\"></div><div class=\"row\"><label>Newznab UID</label><input type=\"text\" name=\"newznab_uid" + intId + "\" size=\"15\"></div><div class=\"row checkbox\"><input type=\"checkbox\" name=\"newznab_enabled" + intId + "\" value=\"1\" checked /><label>Enabled</label></div>");
var removeButton = $("<div class=\"row\"><input type=\"button\" class=\"remove\" value=\"Remove\" /></div>");
removeButton.click(function() {
$(this).parent().remove();
deletedNewznabs = deletedNewznabs + 1;
});
formfields.append(removeButton);
formfields.append("</div>");
$("#add_newznab").before(formfields);
});
function addAction() {
$('#autoadd').append('<input type="hidden" name="tsab" value=1 />');
};
$(function() {
$( "#tabs" ).tabs();
});
initActions();
initConfigCheckbox("#launch_browser");
initConfigCheckbox("#enable_https");
initConfigCheckbox("#enable_api");
initConfigCheckbox("#usenewznab");
initConfigCheckbox("#usenzbsu");
initConfigCheckbox("#usedognzb");
initConfigCheckbox("#enable_torrents");
initConfigCheckbox("#torrent_local");
initConfigCheckbox("#torrent_seedbox");
initConfigCheckbox("#enable_torrent_search");
initConfigCheckbox("#enable_cbt");
initConfigCheckbox("#enable_rss");
initConfigCheckbox("#useexperimental");
initConfigCheckbox("#useraw");
initConfigCheckbox("#replace_spaces");
initConfigCheckbox("#use_minsize");
initConfigCheckbox("#use_maxsize");
initConfigCheckbox("#enable_failed");
initConfigCheckbox("#enable_meta");
initConfigCheckbox("#zero_level");
initConfigCheckbox("#post_processing");
initConfigCheckbox("#enable_check_folder");
initConfigCheckbox("#enable_pre_scripts");
initConfigCheckbox("#enable_extra_scripts");
}
$(document).ready(function() {
initThisPage();
});
</script>
</%def>