comit with last rembo10 commit

This commit is contained in:
pabloalcantara
2011-08-17 09:30:22 -03:00
parent 607657dbf8
commit 6e1cb2b9fe
27 changed files with 729 additions and 216 deletions
+33 -12
View File
@@ -51,35 +51,55 @@
<th id="number">#</th>
<th id="name">Track Title</th>
<th id="duration">Duration</th>
<th id="have"></th>
<th id="location">Local File</th>
<th id="bitrate">Bit Rate</th>
</tr>
</thead>
<tbody>
<%
i = 0
%>
%for track in tracks:
<%
i += 1
have = myDB.select('SELECT TrackTitle from have WHERE ArtistName like ? AND AlbumTitle like ? AND TrackTitle like ?', [track['ArtistName'], track['AlbumTitle'], track['TrackTitle']])
if len(have):
if track['Location']:
grade = 'A'
check = '<img src="images/checkmark.png" alt="checkmark">'
location = track['Location']
else:
grade = 'Z'
check = ''
grade = 'X'
location = ''
if track['BitRate']:
bitrate = str(track['BitRate']/1000) + ' kbps'
else:
bitrate = ''
try:
trackduration = helpers.convert_milliseconds(track['TrackDuration'])
except:
trackduration = 'n/a'
%>
<tr class="grade${grade}">
<td id="number">${i}</td>
<td id="number">${track['TrackNumber']}</td>
<td id="name">${track['TrackTitle']}</td>
<td id="duration">${trackduration}</td>
<td id="have">${check}</td>
<td id="location">${location}</td>
<td id="bitrate">${bitrate}</td>
</tr>
%endfor
<%
unmatched = myDB.select('SELECT * from have WHERE ArtistName LIKE ? AND AlbumTitle LIKE ?', [album['ArtistName'], album['AlbumTitle']])
%>
%if unmatched:
%for track in unmatched:
<%
duration = helpers.convert_seconds(float(track['TrackLength']))
%>
<tr class="gradeC">
<td id="number">${track['TrackNumber']}</td>
<td id="name">${track['TrackTitle']}</td>
<td id="duration">${duration}</td>
<td id="location">${track['Location']}</td>
<td id="bitrate">${int(track['BitRate'])/1000} kbps</td>
</tr>
%endfor
%endif
</tbody>
</table>
</div>
@@ -97,6 +117,7 @@
{
$('#track_table').dataTable(
{
"aaSorting": [],
"bFilter": false,
"bInfo": false,
"bPaginate": false
+14 -5
View File
@@ -41,11 +41,12 @@
<tr>
<th id="select"><input type="checkbox" onClick="toggle(this)" /></th>
<th id="albumart"></th>
<th id="albumname">Album Name</th>
<th id="reldate">Release Date</th>
<th id="type">Release Type</th>
<th id="albumname">Name</th>
<th id="reldate">Date</th>
<th id="type">Type</th>
<th id="status">Status</th>
<th id="have">Have</th>
<th id="bitrate">Bitrate</th>
</tr>
</thead>
<tbody>
@@ -62,7 +63,7 @@
myDB = db.DBConnection()
totaltracks = len(myDB.select('SELECT TrackTitle from tracks WHERE AlbumID=?', [album['AlbumID']]))
havetracks = len(myDB.select('SELECT TrackTitle from have WHERE ArtistName like ? AND AlbumTitle like ?', [album['ArtistName'], album['AlbumTitle']]))
havetracks = len(myDB.select('SELECT TrackTitle from tracks WHERE AlbumID=? AND Location IS NOT NULL', [album['AlbumID']])) + len(myDB.select('SELECT TrackTitle from have WHERE ArtistName like ? AND AlbumTitle LIKE ?', [album['ArtistName'], album['AlbumTitle']]))
try:
percent = (havetracks*100.0)/totaltracks
@@ -71,6 +72,12 @@
except (ZeroDivisionError, TypeError):
percent = 0
totaltracks = '?'
avgbitrate = myDB.action("SELECT AVG(BitRate) FROM tracks WHERE AlbumID=?", [album['AlbumID']]).fetchone()[0]
if avgbitrate:
bitrate = str(int(avgbitrate)/1000) + ' kbps'
else:
bitrate = ''
%>
<tr class="grade${grade}">
@@ -89,6 +96,7 @@
%endif
</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="bitrate">${bitrate}</td>
</tr>
%endfor
</tbody>
@@ -114,7 +122,8 @@
null,
null,
null,
{ "sType": "title-numeric"}
{ "sType": "title-numeric"},
null
],
"oLanguage": {
"sLengthMenu":"Show _MENU_ albums per page",
+4
View File
@@ -1,5 +1,6 @@
<%
import headphones
from headphones import version
%>
<!doctype html>
<!--[if lt IE 7 ]> <html lang="en" class="no-js ie6"> <![endif]-->
@@ -70,6 +71,9 @@
<footer>
<div id="version">
Version: ${headphones.CURRENT_VERSION}
%if version.HEADPHONES_VERSION != 'master':
(${version.HEADPHONES_VERSION})
%endif
</div>
<div id="donate">
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
+39 -15
View File
@@ -58,7 +58,7 @@
<td>
<h3>SABnzbd Host:</h3><input type="text" name="sab_host" value="${config['sab_host']}" size="30" maxlength="40"><br>
<i class="smalltext">usually localhost:8080</i>
<i class="smalltext">usually http://localhost:8080</i>
</td>
<td>
@@ -91,7 +91,7 @@
<tr>
<td>
<h3>Use Black Hole:</h3><input type="checkbox" name="blackhole" value=1 ${config['use_blackhole']} />
<h3>Use Black Hole: <input type="checkbox" name="blackhole" value=1 ${config['use_blackhole']} /></h3>
</td>
<td>
@@ -104,7 +104,7 @@
<tr>
<td>
<h3>Usenet Retention:</h3><input type="text" name="usenet_retention" value="${config['usenet_retention']}" size="20" maxlength="40">
<h3>Usenet Retention:<input type="text" name="usenet_retention" value="${config['usenet_retention']}" size="20" maxlength="40"></h3>
</td>
</tr>
</table>
@@ -190,21 +190,21 @@
<tr>
<td>
<h2>Album Quality:</h2><br>
<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_3']} /> Lossless Only<br>
<input type="radio" name="preferred_quality" value="2" ${config['pref_qual_2']} /> Preferred Bitrate:
<input type="text" name="preferred_bitrate" value="${config['pref_bitrate']}" size="5" maxlength="5" />kbps <br>
<h4><input type="radio" name="preferred_quality" value="0" ${config['pref_qual_0']} /> Highest Quality excluding Lossless</h4>
<h4><input type="radio" name="preferred_quality" value="1" ${config['pref_qual_1']} /> Highest Quality including Lossless</h4>
<h4><input type="radio" name="preferred_quality" value="3" ${config['pref_qual_3']} /> Lossless Only</h4>
<h4><input type="radio" name="preferred_quality" value="2" ${config['pref_qual_2']} /> Preferred Bitrate:
<input type="text" name="preferred_bitrate" value="${config['pref_bitrate']}" size="3" maxlength="5" />kbps</h4>
<i class="smalltext2"><input type="checkbox" name="detect_bitrate" value="1" ${config['detect_bitrate']} />Auto-Detect Preferred Bitrate </i>
</td>
<td>
<h2>Post-Processing:</h2>
<input type="checkbox" name="move_files" value="1" ${config['move_files']} /> Move downloads to Destination Folder<br />
<input type="checkbox" name="rename_files" value="1" ${config['rename_files']} /> Rename files<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 (.m3u, .nfo, .sfv, .nzb, etc.)<br>
<input type="checkbox" name="add_album_art" value="1" ${config['add_album_art']}> Add album art as 'folder.jpg' to album folder<br>
<input type="checkbox" name="embed_album_art" value="1" ${config['embed_album_art']}> Embed album art in each file
<h4><input type="checkbox" name="move_files" value="1" ${config['move_files']} /> Move downloads to Destination Folder</h4>
<h4><input type="checkbox" name="rename_files" value="1" ${config['rename_files']} /> Rename files</h4>
<h4><input type="checkbox" name="correct_metadata" value="1" ${config['correct_metadata']} /> Correct metadata</h4>
<h4><input type="checkbox" name="cleanup_files" value="1" ${config['cleanup_files']} /> Delete leftover files (.m3u, .nfo, .sfv, .nzb, etc.)</h4>
<h4><input type="checkbox" name="add_album_art" value="1" ${config['add_album_art']}> Add album art as 'folder.jpg' to album folder</h4>
<h4><input type="checkbox" name="embed_album_art" value="1" ${config['embed_album_art']}> Embed album art in each file</h4>
</td>
</tr>
@@ -227,7 +227,7 @@
<td>
<h2>Renaming Options:</h2>
<br>
<h3>Folder Format:</h3><input type="text" name="folder_format" value="${config['folder_format']}" size="43">
<h3>Folder Format:</h3><input type="text" name="folder_format" value="${config['folder_format']}" size="43"><br>
<i class="smalltext">Use: artist, album, year and first (first letter in artist name)<br />
E.g.: first/artist/album [year] = G/Girl Talk/All Day [2010]</i>
<br><br>
@@ -256,6 +256,30 @@
<h3>Log Directory:</h3><input type="text" name="log_dir" value="${config['log_dir']}" size="50">
</td>
</tr>
<tr>
<td>
<h2>Re-Encoding Options:</h2>
<br>
<h3><input type="checkbox" name="encode" value="1" ${config['encode']}/>Convert Lossless to mp3</h3>
<i class="smalltext">Note: this option requires the lame or ffmpeg encoder</i>
<br><br>
<%
if config['encoder'] == 'lame':
lameselect = 'selected="selected"'
ffmpegselect = ''
else:
lameselect = ''
ffmpegselect = 'selected="selected"'
%>
<h3>Encoder: <select name="encoder">
<option value="lame" ${lameselect}>lame</option>
<option value="ffmpeg" ${ffmpegselect}>ffmpeg</option>
</select>
Bitrate: <input type="text" name="bitrate" value="${config['bitrate']}" size="3" maxlength="5" />kbps <br>
<br>
<h3>Path to Encoder:</h3><input type="text" name="encoderfolder" value="${config['encoderfolder']}" size="43">
</td>
</tr>
</table>
</div>
+1 -1
View File
@@ -42,7 +42,7 @@
%>
<tr class="grade${grade}">
<td id="dateadded">${item['DateAdded']}</td>
<td id="filename"><a href="${item['URL']}">${item['Title']}</a></td>
<td id="filename">${item['Title']} [<a href="${item['URL']}">nzb</a>]<a href="albumPage?AlbumID=${item['AlbumID']}">[album page]</a></td>
<td id="size">${helpers.bytes_to_mb(item['Size'])}</td>
<td id="status">${item['Status']}</td>
<td id="action">[<a href="queueAlbum?AlbumID=${item['AlbumID']}&redirect=history">retry</a>][<a href="queueAlbum?AlbumID=${item['AlbumID']}&new=True&redirect=history">new</a>]</td>
+8 -1
View File
@@ -1,11 +1,15 @@
<%inherit file="base.html" />
<%!
import headphones
from headphones.helpers import checked
%>
<%def name="headerIncludes()">
<div id="subhead_container">
<ul id="subhead_menu">
<li><a href="manageArtists">Manage Artists</a></li>
<li><a href="manageArtists">Manage Artists</a></li>
%if not headphones.ADD_ARTISTS:
<li><a href="manageNew">Manage New Artists</a></li>
%endif
</ul>
</div>
</%def>
@@ -30,6 +34,9 @@
<input type="text" value="Enter a Music Directory to scan" onfocus="if
(this.value==this.defaultValue) this.value='';" name="path" size="70" />
%endif
<br>
<h3><input type="checkbox" name="autoadd" value="1" ${checked(headphones.ADD_ARTISTS)}>Automatically add new artists</h3>
<br><br>
<input type="submit" /></form>
</div>
+14 -1
View File
@@ -21,6 +21,7 @@
<th id="select"><input type="checkbox" onClick="toggle(this)" /></th>
<th id="name">Artist Name</th>
<th id="status">Status</th>
<th id="album">Latest Album</th>
</tr>
</thead>
<tbody>
@@ -32,11 +33,22 @@
grade = 'C'
else:
grade = 'Z'
if artist['ReleaseDate'] and artist['LatestAlbum']:
releasedate = artist['ReleaseDate']
albumdisplay = '<i>%s</i> (%s)' % (artist['LatestAlbum'], artist['ReleaseDate'])
elif artist['LatestAlbum']:
releasedate = ''
albumdisplay = '<i>%s</i>' % artist['LatestAlbum']
else:
releasedate = ''
albumdisplay = '<i>None</i>'
%>
<tr class="grade${grade}">
<td id="select"><input type="checkbox" name="${artist['ArtistID']}" class="checkbox" /></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>
</tr>
%endfor
</tbody>
@@ -58,7 +70,8 @@
"aoColumns": [
null,
{ "sType": "title-string"},
null
null,
{ "sType": "title-string"}
],
"bStateSave": true,
"bPaginate": false
+52
View File
@@ -0,0 +1,52 @@
<%inherit file="base.html" />
<%!
import headphones
%>
<%def name="body()">
<div id="paddingheader">
<h1>Manage New Artists<h1>
<h3><a href="musicScan?path=${headphones.MUSIC_DIR}&redirect=manageNew">Scan Music Library</a></h3>
</div>
<form action="addArtists" method="get">
<p class="indented">
Add selected artists
<input type="submit" value="Go">
</p>
<table class="display" id="artist_table">
<thead>
<tr>
<th id="select"><input type="checkbox" onClick="toggle(this)" /></th>
<th id="name">Artist Name</th>
</tr>
</thead>
<tbody>
%for artist in headphones.NEW_ARTISTS:
<tr class="gradeZ">
<td id="select"><input type="checkbox" name="${artist}" class="checkbox" /></td>
<td id="name">${artist}</a></td>
</tr>
%endfor
</tbody>
</table>
</form>
</%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()
{
$('#artist_table').dataTable(
{
"aaSorting": [[1, 'asc']],
"bStateSave": false,
"bPaginate": false
});
});
</script>
</%def>
+33 -12
View File
@@ -51,35 +51,55 @@
<th id="number">#</th>
<th id="name">Track Title</th>
<th id="duration">Duration</th>
<th id="have"></th>
<th id="location">Local File</th>
<th id="bitrate">Bit Rate</th>
</tr>
</thead>
<tbody>
<%
i = 0
%>
%for track in tracks:
<%
i += 1
have = myDB.select('SELECT TrackTitle from have WHERE ArtistName like ? AND AlbumTitle like ? AND TrackTitle like ?', [track['ArtistName'], track['AlbumTitle'], track['TrackTitle']])
if len(have):
if track['Location']:
grade = 'A'
check = '<img src="images/checkmark.png" alt="checkmark">'
location = track['Location']
else:
grade = 'Z'
check = ''
grade = 'X'
location = ''
if track['BitRate']:
bitrate = str(track['BitRate']/1000) + ' kbps'
else:
bitrate = ''
try:
trackduration = helpers.convert_milliseconds(track['TrackDuration'])
except:
trackduration = 'n/a'
%>
<tr class="grade${grade}">
<td id="number">${i}</td>
<td id="number">${track['TrackNumber']}</td>
<td id="name">${track['TrackTitle']}</td>
<td id="duration">${trackduration}</td>
<td id="have">${check}</td>
<td id="location">${location}</td>
<td id="bitrate">${bitrate}</td>
</tr>
%endfor
<%
unmatched = myDB.select('SELECT * from have WHERE ArtistName LIKE ? AND AlbumTitle LIKE ?', [album['ArtistName'], album['AlbumTitle']])
%>
%if unmatched:
%for track in unmatched:
<%
duration = helpers.convert_seconds(float(track['TrackLength']))
%>
<tr class="gradeC">
<td id="number">${track['TrackNumber']}</td>
<td id="name">${track['TrackTitle']}</td>
<td id="duration">${duration}</td>
<td id="location">${track['Location']}</td>
<td id="bitrate">${int(track['BitRate'])/1000} kbps</td>
</tr>
%endfor
%endif
</tbody>
</table>
</div>
@@ -97,6 +117,7 @@
{
$('#track_table').dataTable(
{
"aaSorting": [],
"bFilter": false,
"bInfo": false,
"bPaginate": false
+14 -5
View File
@@ -41,11 +41,12 @@
<tr>
<th id="select"><input type="checkbox" onClick="toggle(this)" /></th>
<th id="albumart"></th>
<th id="albumname">Album Name</th>
<th id="reldate">Release Date</th>
<th id="type">Release Type</th>
<th id="albumname">Name</th>
<th id="reldate">Date</th>
<th id="type">Type</th>
<th id="status">Status</th>
<th id="have">Have</th>
<th id="bitrate">Bitrate</th>
</tr>
</thead>
<tbody>
@@ -62,7 +63,7 @@
myDB = db.DBConnection()
totaltracks = len(myDB.select('SELECT TrackTitle from tracks WHERE AlbumID=?', [album['AlbumID']]))
havetracks = len(myDB.select('SELECT TrackTitle from have WHERE ArtistName like ? AND AlbumTitle like ?', [album['ArtistName'], album['AlbumTitle']]))
havetracks = len(myDB.select('SELECT TrackTitle from tracks WHERE AlbumID=? AND Location IS NOT NULL', [album['AlbumID']])) + len(myDB.select('SELECT TrackTitle from have WHERE ArtistName like ? AND AlbumTitle LIKE ?', [album['ArtistName'], album['AlbumTitle']]))
try:
percent = (havetracks*100.0)/totaltracks
@@ -71,6 +72,12 @@
except (ZeroDivisionError, TypeError):
percent = 0
totaltracks = '?'
avgbitrate = myDB.action("SELECT AVG(BitRate) FROM tracks WHERE AlbumID=?", [album['AlbumID']]).fetchone()[0]
if avgbitrate:
bitrate = str(int(avgbitrate)/1000) + ' kbps'
else:
bitrate = ''
%>
<tr class="grade${grade}">
@@ -89,6 +96,7 @@
%endif
</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="bitrate">${bitrate}</td>
</tr>
%endfor
</tbody>
@@ -114,7 +122,8 @@
null,
null,
null,
{ "sType": "title-numeric"}
{ "sType": "title-numeric"},
null
],
"oLanguage": {
"sLengthMenu":"Show _MENU_ albums per page",
+4
View File
@@ -1,5 +1,6 @@
<%
import headphones
from headphones import version
%>
<!doctype html>
<!--[if lt IE 7 ]> <html lang="en" class="no-js ie6"> <![endif]-->
@@ -70,6 +71,9 @@
<footer>
<div id="version">
Version: ${headphones.CURRENT_VERSION}
%if version.HEADPHONES_VERSION != 'master':
(${version.HEADPHONES_VERSION})
%endif
</div>
<div id="donate">
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
+39 -15
View File
@@ -58,7 +58,7 @@
<td>
<h3>SABnzbd Host:</h3><input type="text" name="sab_host" value="${config['sab_host']}" size="30" maxlength="40"><br>
<i class="smalltext">usually localhost:8080</i>
<i class="smalltext">usually http://localhost:8080</i>
</td>
<td>
@@ -91,7 +91,7 @@
<tr>
<td>
<h3>Use Black Hole:</h3><input type="checkbox" name="blackhole" value=1 ${config['use_blackhole']} />
<h3>Use Black Hole: <input type="checkbox" name="blackhole" value=1 ${config['use_blackhole']} /></h3>
</td>
<td>
@@ -104,7 +104,7 @@
<tr>
<td>
<h3>Usenet Retention:</h3><input type="text" name="usenet_retention" value="${config['usenet_retention']}" size="20" maxlength="40">
<h3>Usenet Retention:<input type="text" name="usenet_retention" value="${config['usenet_retention']}" size="20" maxlength="40"></h3>
</td>
</tr>
</table>
@@ -190,21 +190,21 @@
<tr>
<td>
<h2>Album Quality:</h2><br>
<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_3']} /> Lossless Only<br>
<input type="radio" name="preferred_quality" value="2" ${config['pref_qual_2']} /> Preferred Bitrate:
<input type="text" name="preferred_bitrate" value="${config['pref_bitrate']}" size="5" maxlength="5" />kbps <br>
<h4><input type="radio" name="preferred_quality" value="0" ${config['pref_qual_0']} /> Highest Quality excluding Lossless</h4>
<h4><input type="radio" name="preferred_quality" value="1" ${config['pref_qual_1']} /> Highest Quality including Lossless</h4>
<h4><input type="radio" name="preferred_quality" value="3" ${config['pref_qual_3']} /> Lossless Only</h4>
<h4><input type="radio" name="preferred_quality" value="2" ${config['pref_qual_2']} /> Preferred Bitrate:
<input type="text" name="preferred_bitrate" value="${config['pref_bitrate']}" size="3" maxlength="5" />kbps</h4>
<i class="smalltext2"><input type="checkbox" name="detect_bitrate" value="1" ${config['detect_bitrate']} />Auto-Detect Preferred Bitrate </i>
</td>
<td>
<h2>Post-Processing:</h2>
<input type="checkbox" name="move_files" value="1" ${config['move_files']} /> Move downloads to Destination Folder<br />
<input type="checkbox" name="rename_files" value="1" ${config['rename_files']} /> Rename files<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 (.m3u, .nfo, .sfv, .nzb, etc.)<br>
<input type="checkbox" name="add_album_art" value="1" ${config['add_album_art']}> Add album art as 'folder.jpg' to album folder<br>
<input type="checkbox" name="embed_album_art" value="1" ${config['embed_album_art']}> Embed album art in each file
<h4><input type="checkbox" name="move_files" value="1" ${config['move_files']} /> Move downloads to Destination Folder</h4>
<h4><input type="checkbox" name="rename_files" value="1" ${config['rename_files']} /> Rename files</h4>
<h4><input type="checkbox" name="correct_metadata" value="1" ${config['correct_metadata']} /> Correct metadata</h4>
<h4><input type="checkbox" name="cleanup_files" value="1" ${config['cleanup_files']} /> Delete leftover files (.m3u, .nfo, .sfv, .nzb, etc.)</h4>
<h4><input type="checkbox" name="add_album_art" value="1" ${config['add_album_art']}> Add album art as 'folder.jpg' to album folder</h4>
<h4><input type="checkbox" name="embed_album_art" value="1" ${config['embed_album_art']}> Embed album art in each file</h4>
</td>
</tr>
@@ -227,7 +227,7 @@
<td>
<h2>Renaming Options:</h2>
<br>
<h3>Folder Format:</h3><input type="text" name="folder_format" value="${config['folder_format']}" size="43">
<h3>Folder Format:</h3><input type="text" name="folder_format" value="${config['folder_format']}" size="43"><br>
<i class="smalltext">Use: artist, album, year and first (first letter in artist name)<br />
E.g.: first/artist/album [year] = G/Girl Talk/All Day [2010]</i>
<br><br>
@@ -256,6 +256,30 @@
<h3>Log Directory:</h3><input type="text" name="log_dir" value="${config['log_dir']}" size="50">
</td>
</tr>
<tr>
<td>
<h2>Re-Encoding Options:</h2>
<br>
<h3><input type="checkbox" name="encode" value="1" ${config['encode']}/>Convert Lossless to mp3</h3>
<i class="smalltext">Note: this option requires the lame or ffdshow encoder</i>
<br><br>
<%
if config['encoder'] == 'lame':
lameselect = 'selected="selected"'
ffmpegselect = ''
else:
lameselect = ''
ffmpegselect = 'selected="selected"'
%>
<h3>Encoder: <select name="encoder">
<option value="lame" ${lameselect}>lame</option>
<option value="ffmpeg" ${ffmpegselect}>ffmpeg</option>
</select>
Bitrate: <input type="text" name="bitrate" value="${config['bitrate']}" size="3" maxlength="5" />kbps <br>
<br>
<h3>Path to Encoder:</h3><input type="text" name="encoderfolder" value="${config['encoderfolder']}" size="43">
</td>
</tr>
</table>
</div>
+1 -1
View File
@@ -42,7 +42,7 @@
%>
<tr class="grade${grade}">
<td id="dateadded">${item['DateAdded']}</td>
<td id="filename"><a href="${item['URL']}">${item['Title']}</a></td>
<td id="filename">${item['Title']} [<a href="${item['URL']}">nzb</a>]<a href="albumPage?AlbumID=${item['AlbumID']}">[album page]</a></td>
<td id="size">${helpers.bytes_to_mb(item['Size'])}</td>
<td id="status">${item['Status']}</td>
<td id="action">[<a href="queueAlbum?AlbumID=${item['AlbumID']}&redirect=history">retry</a>][<a href="queueAlbum?AlbumID=${item['AlbumID']}&new=True&redirect=history">new</a>]</td>
+8 -1
View File
@@ -1,11 +1,15 @@
<%inherit file="base.html" />
<%!
import headphones
from headphones.helpers import checked
%>
<%def name="headerIncludes()">
<div id="subhead_container">
<ul id="subhead_menu">
<li><a href="manageArtists">Manage Artists</a></li>
<li><a href="manageArtists">Manage Artists</a></li>
%if not headphones.ADD_ARTISTS:
<li><a href="manageNew">Manage New Artists</a></li>
%endif
</ul>
</div>
</%def>
@@ -30,6 +34,9 @@
<input type="text" value="Enter a Music Directory to scan" onfocus="if
(this.value==this.defaultValue) this.value='';" name="path" size="70" />
%endif
<br>
<h3><input type="checkbox" name="autoadd" value="1" ${checked(headphones.ADD_ARTISTS)}>Automatically add new artists</h3>
<br><br>
<input type="submit" /></form>
</div>
+14 -1
View File
@@ -21,6 +21,7 @@
<th id="select"><input type="checkbox" onClick="toggle(this)" /></th>
<th id="name">Artist Name</th>
<th id="status">Status</th>
<th id="album">Latest Album</th>
</tr>
</thead>
<tbody>
@@ -32,11 +33,22 @@
grade = 'C'
else:
grade = 'Z'
if artist['ReleaseDate'] and artist['LatestAlbum']:
releasedate = artist['ReleaseDate']
albumdisplay = '<i>%s</i> (%s)' % (artist['LatestAlbum'], artist['ReleaseDate'])
elif artist['LatestAlbum']:
releasedate = ''
albumdisplay = '<i>%s</i>' % artist['LatestAlbum']
else:
releasedate = ''
albumdisplay = '<i>None</i>'
%>
<tr class="grade${grade}">
<td id="select"><input type="checkbox" name="${artist['ArtistID']}" class="checkbox" /></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>
</tr>
%endfor
</tbody>
@@ -58,7 +70,8 @@
"aoColumns": [
null,
{ "sType": "title-string"},
null
null,
{ "sType": "title-string"}
],
"bStateSave": true,
"bPaginate": false
+52
View File
@@ -0,0 +1,52 @@
<%inherit file="base.html" />
<%!
import headphones
%>
<%def name="body()">
<div id="paddingheader">
<h1>Manage New Artists<h1>
<h3><a href="musicScan?path=${headphones.MUSIC_DIR}&redirect=manageNew">Scan Music Library</a></h3>
</div>
<form action="addArtists" method="get">
<p class="indented">
Add selected artists
<input type="submit" value="Go">
</p>
<table class="display" id="artist_table">
<thead>
<tr>
<th id="select"><input type="checkbox" onClick="toggle(this)" /></th>
<th id="name">Artist Name</th>
</tr>
</thead>
<tbody>
%for artist in headphones.NEW_ARTISTS:
<tr class="gradeZ">
<td id="select"><input type="checkbox" name="${artist}" class="checkbox" /></td>
<td id="name">${artist}</a></td>
</tr>
%endfor
</tbody>
</table>
</form>
</%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()
{
$('#artist_table').dataTable(
{
"aaSorting": [[1, 'asc']],
"bStateSave": false,
"bPaginate": false
});
});
</script>
</%def>