mirror of
https://github.com/rembo10/headphones.git
synced 2026-04-17 02:19:26 +01:00
Added config, extras, manage, upcoming
This commit is contained in:
82
data/interfaces/default/album.html
Normal file
82
data/interfaces/default/album.html
Normal file
@@ -0,0 +1,82 @@
|
||||
<%inherit file="base.html" />
|
||||
<%!
|
||||
from headphones import db, helpers
|
||||
myDB = db.DBConnection()
|
||||
%>
|
||||
|
||||
<%def name="headerIncludes()">
|
||||
<div id="subhead_container">
|
||||
<ul id="subhead_menu">
|
||||
<li><a href="refreshArtist?ArtistID=${album['ArtistID']}">Mark Album as Wanted</a></li>
|
||||
<li><a href="deleteArtist?ArtistID=${album['ArtistID']}">Delete Artist</a></li>
|
||||
%if album['Status'] == 'Paused':
|
||||
<li><a href="resumeArtist?ArtistID=${album['ArtistID']}">Resume Artist</a></li>
|
||||
%else:
|
||||
<li><a href="pauseArtist?ArtistID=${album['ArtistID']}">Pause Artist</a></li>
|
||||
%endif
|
||||
<li><a href="getExtras?ArtistID=${album['ArtistID']}">Get Extras</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</%def>
|
||||
|
||||
<%def name="body()">
|
||||
<div class="table_wrapper">
|
||||
<div id="albumheader">
|
||||
<img src="http://ec1.images-amazon.com/images/P/${album['AlbumASIN']}.01.LZZZZZZZ.jpg" height="200" width="200" alt="albumart" class="albumArt">
|
||||
<h1>${album['AlbumTitle']}</h1>
|
||||
<h2>${album['ArtistName']}</h2>
|
||||
<br>
|
||||
<h3>Description: </h3>
|
||||
</div>
|
||||
<div id="track_wrapper">
|
||||
<table class="display" id="track_table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th id="number">#</th>
|
||||
<th id="name">Track Title</th>
|
||||
<th id="duration">Duration</th>
|
||||
<th id="have">Have</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
%for track in tracks:
|
||||
<%
|
||||
trackmatch = 'asd'
|
||||
if len(trackmatch):
|
||||
grade = 'A'
|
||||
check = '<img src="images/checkmark.png" alt="checkmark">'
|
||||
else:
|
||||
grade = 'Z'
|
||||
check = ''
|
||||
%>
|
||||
<tr class="grade${grade}">
|
||||
<td id="number">#</td>
|
||||
<td id="name">${track['TrackTitle']}</td>
|
||||
<td id="duration">${track['TrackDuration']}</td>
|
||||
<td id="have">${check}</td>
|
||||
</tr>
|
||||
%endfor
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</%def>
|
||||
|
||||
<%def name="headIncludes()">
|
||||
<link rel="stylesheet" href="css/data_table.css">
|
||||
</%def>
|
||||
|
||||
<%def name="javascriptIncludes()">
|
||||
<script src="js/libs/jquery.dataTables.min.js"></script>
|
||||
<script>
|
||||
$(document).ready(function()
|
||||
{
|
||||
$('#track_table').dataTable(
|
||||
{
|
||||
"bFilter": false,
|
||||
"bInfo": false,
|
||||
"bPaginate": false
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</%def>
|
||||
@@ -27,9 +27,17 @@
|
||||
<body>
|
||||
<div id="container">
|
||||
<header>
|
||||
|
||||
% if not headphones.CURRENT_VERSION:
|
||||
<div id="updatebar">
|
||||
You're running an unknown version of Headphones. <a class="blue" href="update">Click here to update</a>
|
||||
</div>
|
||||
% elif headphones.CURRENT_VERSION != headphones.LATEST_VERSION and headphones.INSTALL_TYPE != 'win':
|
||||
<div id="updatebar">
|
||||
A <a class="blue" href="http://github.com/rembo10/headphones/compare/${headphones.CURRENT_VERSION}...${headphones.LATEST_VERSION}"> newer version</a> is available. You're ${headphones.COMMITS_BEHIND} commits behind. <a class="blue" href="update">Click here to update</a>
|
||||
</div>
|
||||
% endif
|
||||
<div id="logo">
|
||||
<img src="images/headphoneslogo.png" alt="headphones">
|
||||
<a href="home"><img src="images/headphoneslogo.png" alt="headphones"></a>
|
||||
</div>
|
||||
<ul id="nav">
|
||||
<li><a href="home">home</a></li>
|
||||
|
||||
224
data/interfaces/default/config.html
Normal file
224
data/interfaces/default/config.html
Normal file
@@ -0,0 +1,224 @@
|
||||
<%inherit file="base.html"/>
|
||||
<form action="configUpdate" method="post">
|
||||
<div class="table_wrapper">
|
||||
|
||||
<table class="configtable" summary="Web Interface">
|
||||
<tr>
|
||||
<td>
|
||||
<p> HTTP Host: <br />
|
||||
<input type="text" name="http_host" value="${config['http_host']}" size="30" maxlength="40"><br />
|
||||
<i class="smalltext">e.g. localhost or 0.0.0.0</i>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>HTTP Username: <br />
|
||||
<input type="text" name="http_username" value="${config['http_user']}" size="30" maxlength="40">
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>HTTP Port: <br />
|
||||
<input type="text" name="http_port" value="${config['http_port']}" size="20" maxlength="40">
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>HTTP Password: <br />
|
||||
<input type="password" name="http_password" value="${config['http_pass']}" size="30" maxlength="40">
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>Launch Browser on Startup:<input type="checkbox" name="launch_browser" value="1" ${config['launch_browser']} /></p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="table_wrapper">
|
||||
<a name="download">
|
||||
<h1>
|
||||
<u>Download Settings</u>
|
||||
</h1>
|
||||
</a>
|
||||
<table class="configtable" summary="Download Settings">
|
||||
<tr>
|
||||
<td>
|
||||
<p>SABnzbd Host:</p>
|
||||
<input type="text" name="sab_host" value="${config['sab_host']}" size="30" maxlength="40"><br />
|
||||
<i class="smalltext">e.g. localhost:8080</i>
|
||||
</td>
|
||||
<td>
|
||||
<p>SABnzbd Username:</p>
|
||||
<input type="text" name="sab_username" value="${config['sab_user']}" size="20" maxlength="40">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>SABnzbd API:</p>
|
||||
<input type="text" name="sab_apikey" value="${config['sab_api']}" size="46" maxlength="40">
|
||||
</td>
|
||||
<td>
|
||||
<p>SABnzbd Password:</p>
|
||||
<input type="password" name="sab_password" value="${config['sab_pass']}" size="20" maxlength="40">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>SABnzbd Category:</p>
|
||||
<input type="text" name="sab_category" value="${config['sab_cat']}" size="20" maxlength="40"></td>
|
||||
<td>
|
||||
<p>Music Download Directory:</p>
|
||||
<input type="text" name="download_dir" value="${config['download_dir']}" size="60"><br />
|
||||
<i class="smalltext">Full path to the directory where SAB downloads your music<br />
|
||||
e.g. Downloads/music or /Users/name/Downloads/music</i>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>Use Black Hole:</p>
|
||||
<input type="checkbox" name="blackhole" value=1 ${config['use_blackhole']} />
|
||||
</td>
|
||||
<td>
|
||||
<p>Black Hole Directory:</p>
|
||||
<input type="text" name="blackhole_dir" value="${config['blackhole_dir']}" size="60"><br />
|
||||
<i class="smalltext">Folder your Download program watches for NZBs</i>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>Usenet Retention:</p>
|
||||
<input type="text" name="usenet_retention" value="${config['usenet_retention']}" size="20" maxlength="40">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="table_wrapper">
|
||||
<a name="providers">
|
||||
<h1>
|
||||
<u>Search Providers</u>
|
||||
</h1>
|
||||
</a>
|
||||
<table class="configtable" summary="Search Providers">
|
||||
<tr>
|
||||
<td>
|
||||
<p>NZBMatrix: <input type="checkbox" name="nzbmatrix" value="1" ${config['use_nzbmatrix']} /></p>
|
||||
</td>
|
||||
<td>
|
||||
<p>NZBMatrix Username: <br> <input type="text" name="nzbmatrix_username" value="${config['nzbmatrix_user']}" size="30" maxlength="40"></p>
|
||||
</td>
|
||||
<td>
|
||||
<p>NZBMatrix API: <br> <input type="text" name="nzbmatrix_apikey" value="${config['nzbmatrix_api']}" size="46" maxlength="40"></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>Newznab: <input type="checkbox" name="newznab" value="1" ${config['use_newznab']} /></p>
|
||||
</td>
|
||||
<td>
|
||||
<p>Newznab Host:<br> <input type="text" name="newznab_host" value="${config['newznab_host']}" size="30" maxlength="40"><br />
|
||||
<i class="smalltext">i.e. http://nzb.su</i></p>
|
||||
</td>
|
||||
<td>
|
||||
<p>Newznab API:<br> <input type="text" name="newznab_apikey" value="${config['newznab_api']}" size="46" maxlength="40"></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>NZBs.org:<input type="checkbox" name="nzbsorg" value="1" ${config['use_nzbsorg']} /></p>
|
||||
</td>
|
||||
<td>
|
||||
<p>NZBs.org UID:<br> <input type="text" name="nzbsorg_uid" value="${config['nzbsorg_uid']}" size="30" maxlength="40"></p>
|
||||
</td>
|
||||
<td>
|
||||
<p>NZBs.org Hash:<br> <input type="text" name="nzbsorg_hash" value="${config['nzbsorg_hash']}" size="46" maxlength="40"></p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="table_wrapper">
|
||||
<a name="post_processing">
|
||||
<h1>
|
||||
<u>Quality & Post Processing</u>
|
||||
</h1>
|
||||
</a>
|
||||
<table class="configtable" summary="Quality & Post Processing">
|
||||
<tr>
|
||||
<td>
|
||||
<b>Album Quality:</b>
|
||||
<p>
|
||||
<input type="radio" name="preferred_quality" value="0" ${config['pref_qual_0']} />Highest Quality excluding Lossless<br />
|
||||
<input type="radio" name="preferred_quality" value="1" ${config['pref_qual_1']} />Highest Quality including Lossless<br />
|
||||
<input type="radio" name="preferred_quality" value="3" ${config['pref_qual_2']} />Lossless Only<br />
|
||||
<input type="radio" name="preferred_quality" value="2" ${config['pref_qual_3']} />Preferred Bitrate: <input type="text" name="preferred_bitrate" value="${config['pref_bitrate']}" size="5" maxlength="5" />kbps <br />
|
||||
<i class="smalltext2"><input type="checkbox" name="detect_bitrate" value="1" ${config['detect_bitrate']} />Auto-Detect Preferred Bitrate </i>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<b>Post-Processing:</b>
|
||||
<p>
|
||||
<input type="checkbox" name="move_files" value="1" ${config['move_files']} />Move downloads to Music Folder<br />
|
||||
<input type="checkbox" name="rename_files" value="1" ${config['rename_files']} />Rename & add metadata<br />
|
||||
<input type="checkbox" name="correct_metadata" value="1" ${config['correct_metadata']} />Correct metadata<br/>
|
||||
<input type="checkbox" name="cleanup_files" value="1" ${config['cleanup_files']} />Delete leftover files<br />
|
||||
<input type="checkbox" name="add_album_art" value="1" ${config['add_album_art']} />Add album art<br />
|
||||
<input type="checkbox" name="embed_album_art" value="1" ${config['embed_album_art']} />Embed album art in each file<br />
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<b>Path to Music folder</b>:<br />
|
||||
<input type="text" name="destination_dir" value="${config['dest_dir']}" size="60" maxlength="200"> <br />
|
||||
<i class="smalltext">e.g. /Users/name/Music/iTunes or /Volumes/share/music</i>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="table_wrapper">
|
||||
<a name="advanced_settings">
|
||||
<h1>
|
||||
<u>Advanced Settings</u>
|
||||
</h1>
|
||||
</a>
|
||||
<table class="configtable" summary="Advanced Settings">
|
||||
<tr>
|
||||
<td>
|
||||
<b>Renaming Options:</b>
|
||||
<p>
|
||||
<b>Folder Format</b>:<br />
|
||||
<input type="text" name="folder_format" value="${config['folder_format']}" size="60">
|
||||
<br />
|
||||
<i class="smalltext">Use: artist, album and year, '/' for directories. <br />E.g.: artist/album [year]</i>
|
||||
</p>
|
||||
<p>
|
||||
<b>File Format</b>:<br />
|
||||
<input type="text" name="file_format" value="${config['file_format']}" size="60">
|
||||
<br>
|
||||
<i class="smalltext">Use: tracknumber, title, artist, album and year</i>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<b>Miscellaneous:</b>
|
||||
<p>
|
||||
<input type="checkbox" name="include_extras" value="1" ${config['include_extras']} />Automatically Include Extras When Adding an Artist<br />
|
||||
<i class="smalltext">Extras includes: EPs, Compilations, Live Albums, Remix Albums and Singles</i>
|
||||
</p>
|
||||
<b>Log Directory</b>:
|
||||
<p>
|
||||
<input type="text" name="log_dir" value="${config['log_dir']}" size="40" />
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<p class="center">
|
||||
<input type="submit" value="Save Changes"><br />
|
||||
(Web Interface changes require a restart to take effect)
|
||||
</p>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<%inherit file="base.html" />
|
||||
13
data/interfaces/default/extras.html
Normal file
13
data/interfaces/default/extras.html
Normal file
@@ -0,0 +1,13 @@
|
||||
<%inherit file="base.html" />
|
||||
<%def name="body()">
|
||||
<div class="table_wrapper">
|
||||
<h1>Artists You Might Like</h1>
|
||||
<div class="cloudtag">
|
||||
<ul id="cloud">
|
||||
%for artist in cloudlist:
|
||||
<li><a href="addArtist?artistid=${artist['ArtistID']}" class="tag${artist['Count']}">${artist['ArtistName']}</a></li>
|
||||
%endfor
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</%def>
|
||||
@@ -4,9 +4,9 @@
|
||||
<div id="subhead_container">
|
||||
<ul id="subhead_menu">
|
||||
<li><a href="clearhistory?type=all">Clear All History</a></li>
|
||||
<li><a href="clearhistory?type=processed">Clear Processed</a></li>
|
||||
<li><a href="clearhistory?type=unprocessed">Clear Unprocessed</a></li>
|
||||
<li><a href="clearhistory?type=snatched">Clear Snatched</a></li>
|
||||
<li><a href="clearhistory?type=Processed">Clear Processed</a></li>
|
||||
<li><a href="clearhistory?type=Unprocessed">Clear Unprocessed</a></li>
|
||||
<li><a href="clearhistory?type=Snatched">Clear Snatched</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</%def>
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
if artist['ReleaseDate'] and artist['LatestAlbum']:
|
||||
releasedate = artist['ReleaseDate']
|
||||
albumdisplay = '%s (%s)' % (artist['LatestAlbum'], artist['ReleaseDate'])
|
||||
albumdisplay = '<i>%s</i> (%s)' % (artist['LatestAlbum'], artist['ReleaseDate'])
|
||||
if releasedate > helpers.today():
|
||||
grade = 'A'
|
||||
else:
|
||||
@@ -38,21 +38,21 @@
|
||||
elif artist['LatestAlbum']:
|
||||
releasedate = ''
|
||||
grade = 'Z'
|
||||
albumdisplay = artist['LatestAlbum']
|
||||
albumdisplay = '<i>%s</i>' % artist['LatestAlbum']
|
||||
else:
|
||||
releasedate = ''
|
||||
grade = 'Z'
|
||||
albumdisplay = 'None'
|
||||
albumdisplay = '<i>None</i>'
|
||||
|
||||
if artist['Status'] == 'Paused':
|
||||
grade = 'X'
|
||||
|
||||
%>
|
||||
<tr class="grade${grade}">
|
||||
<td id="name"><span title="${artist['ArtistSortName']}"><span><a href="artistPage?ArtistID=${artist['ArtistID']}">${artist['ArtistName']}</a></td>
|
||||
<td id="name"><span title="${artist['ArtistSortName']}"></span><a href="artistPage?ArtistID=${artist['ArtistID']}">${artist['ArtistName']}</a></td>
|
||||
<td id="status">${artist['Status']}</td>
|
||||
<td id="album"><span title="${releasedate}"><span><a href="albumPage?AlbumID=${artist['AlbumID']}">${albumdisplay}</a></td>
|
||||
<td id="have"><span title="${percent}"><span><div class="progress-container"><div style="width:${percent}%"><div class="havetracks">${havetracks}/${totaltracks}</div></div></div></td>
|
||||
<td id="album"><span title="${releasedate}"></span><a href="albumPage?AlbumID=${artist['AlbumID']}">${albumdisplay}</a></td>
|
||||
<td id="have"><span title="${percent}"></span><div class="progress-container"><div style="width:${percent}%"><div class="havetracks">${havetracks}/${totaltracks}</div></div></div></td>
|
||||
</tr>
|
||||
%endfor
|
||||
</tbody>
|
||||
|
||||
33
data/interfaces/default/manage.html
Normal file
33
data/interfaces/default/manage.html
Normal file
@@ -0,0 +1,33 @@
|
||||
<%inherit file="base.html" />
|
||||
<%def name="body()">
|
||||
<div class="table_wrapper">
|
||||
<h1>Scan Music Library</h1><br />
|
||||
Where do you keep your music?<br /><br />
|
||||
You can put in any directory, and it will scan for audio files in that folder
|
||||
(including all subdirectories)<br /><br /> For example: '/Users/name/Music'
|
||||
<br /> <br />
|
||||
It may take a while depending on how many files you have. You can navigate away from the page<br />
|
||||
as soon as you click 'Submit'
|
||||
<br /><br />
|
||||
<form action="musicScan" method="GET" align="center">
|
||||
<input type="submit" /></form>
|
||||
</div>
|
||||
<div class="table_wrapper">
|
||||
<h1>Import Last.FM Artists</h1><br />
|
||||
Enter the username whose artists you want to import:<br /><br />
|
||||
<form action="importLastFM" method="GET" align="center">
|
||||
<input type="text" value="%s" onfocus="if
|
||||
(this.value==this.defaultValue) this.value='';" name="username" size="18" />
|
||||
<input type="submit" /></form><br /><br /></div></div>
|
||||
<div class="tableright"><div class="config"><h1>Placeholder :-)</h1><br />
|
||||
<br /><br />
|
||||
<form action="" method="GET" align="center">
|
||||
<input type="text" value="" onfocus="if
|
||||
(this.value==this.defaultValue) this.value='';" name="" size="18" />
|
||||
<input type="submit" /></form><br /><br /></div></div><br />
|
||||
<div class="table"><div class="config"><h1>Force Search</h1><br />
|
||||
<a href="forceSearch">Force Check for Wanted Albums</a><br /><br />
|
||||
<a href="forceUpdate">Force Update Active Artists</a><br /><br />
|
||||
<a href="forcePostProcess">Force Post-Process Albums in Download Folder</a><br /><br /><br />
|
||||
<a href="checkGithub">Check for Headphones Updates</a><br /><br /><br /></div></div>''' % (music_dir_input, lastfm_user_text))
|
||||
</%def>
|
||||
14
data/interfaces/default/upcoming.html
Normal file
14
data/interfaces/default/upcoming.html
Normal file
@@ -0,0 +1,14 @@
|
||||
<%inherit file="base.html" />
|
||||
<%def name="body()">
|
||||
<div class="table_wrapper">
|
||||
<h1>Upcoming Albums</h1>
|
||||
%for album in wanted:
|
||||
|
||||
%endfor
|
||||
|
||||
</div>
|
||||
<div class="table_wrapper">
|
||||
<h1>Wanted Albums</h1>
|
||||
|
||||
</div>
|
||||
</%def>
|
||||
Reference in New Issue
Block a user