mirror of
https://github.com/rembo10/headphones.git
synced 2026-07-22 08:53:59 +01:00
Clean merge/commit.
This commit is contained in:
@@ -24,14 +24,16 @@
|
||||
|
||||
<%def name="body()">
|
||||
<div id="paddingheader">
|
||||
<h1>
|
||||
${artist['ArtistName']}
|
||||
</h1>
|
||||
<h1>${artist['ArtistName']}</h1>
|
||||
%if artist['Status'] == 'Loading':
|
||||
<span class="pageDialog">Album information for this artist is currently being loaded</span>
|
||||
%endif
|
||||
<h3><span>W</span>Album information for this artist is currently being loaded</h3>
|
||||
%endif
|
||||
<ul id="switchViews">
|
||||
<li class="active"><span class="web-symbol">¹</span></li>
|
||||
</ul>
|
||||
</div>
|
||||
<form action="markAlbums" method="get"><input type="hidden" name="ArtistID" value=${artist['ArtistID']}>
|
||||
<form class="ajax" action="markAlbums" method="get">
|
||||
<input type="hidden" name="ArtistID" value=${artist['ArtistID']}>
|
||||
<p class="indented">Mark selected albums as
|
||||
<select class="styled" name="action">
|
||||
<option value="Wanted">Wanted</option>
|
||||
@@ -41,15 +43,41 @@
|
||||
</select>
|
||||
<input type="submit" value="GO">
|
||||
</p>
|
||||
<div id="gridView">
|
||||
%for album in albums:
|
||||
<%
|
||||
%>
|
||||
<div class="album-container">
|
||||
<div class="album-image-container">
|
||||
<input class="album-select" type="checkbox" name="${album['AlbumID']}" />
|
||||
<img class="album-image" />
|
||||
</div>
|
||||
<div class="album-actions">
|
||||
%if album['Status'] == 'Skipped':
|
||||
<a class="web-symbol" href="queueAlbum?AlbumID=${album['AlbumID']}&ArtistID=${album['ArtistID']}" title="Mark Wanted"><span>O</span></a>
|
||||
%elif album['Status'] == 'Wanted':
|
||||
<a class="web-symbol" href="unqueueAlbum?AlbumID=${album['AlbumID']}&ArtistID=${album['ArtistID']}" title="Unmark Wanted"><span>N</span></a>
|
||||
%else:
|
||||
<a class="web-symbol" href="queueAlbum?AlbumID=${album['AlbumID']}&ArtistID=${album['ArtistID']}" title="Retry"><span>*</span></a>
|
||||
<a class="web-symbol" href="queueAlbum?AlbumID=${album['AlbumID']}&ArtistID=${album['ArtistID']}&new=True" title="Try new"><span>J</span></a>
|
||||
%endif
|
||||
</div>
|
||||
<div class="album-info">
|
||||
<b>${artist['ArtistName']}</b> <br />
|
||||
<span>${album['AlbumTitle']}</span>
|
||||
</div>
|
||||
</div>
|
||||
%endfor
|
||||
</div>
|
||||
<div id="listView">
|
||||
<table class="display" id="album_table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th id="select"><input id="mainCheckbox" class="styled" name="head" type="checkbox" onClick="toggle(this);headToggle();" /></th>
|
||||
<th id="select"><input id="mainCheckbox" name="head" type="checkbox" onClick="toggle(this);headToggle();" /></th>
|
||||
<th id="albumart"></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>
|
||||
@@ -66,7 +94,7 @@
|
||||
else:
|
||||
grade = 'A'
|
||||
|
||||
myDB = db.DBConnection()
|
||||
myDB = db.DBConnection()
|
||||
totaltracks = len(myDB.select('SELECT TrackTitle from tracks WHERE AlbumID=?', [album['AlbumID']]))
|
||||
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']]))
|
||||
|
||||
@@ -86,31 +114,30 @@
|
||||
|
||||
%>
|
||||
<tr class="grade${grade}">
|
||||
<td id="select"><input class="styled" type="checkbox" name="${album['AlbumID']}" class="checkbox" /></td>
|
||||
<td id="select"></td>
|
||||
<td id="albumart">
|
||||
<div class="album-art-small">
|
||||
<a href="albumPage?AlbumID=${album['AlbumID']}">
|
||||
<img src="http://ec1.images-amazon.com/images/P/${album['AlbumASIN']}.01.MZZZZZZZ.jpg" title="${artist['ArtistName']} - ${album['AlbumTitle']}">
|
||||
<a href="albumPage?AlbumID=${album['AlbumID']}" title="${album['AlbumID']}">
|
||||
<div class="status">
|
||||
%if album['Status'] == 'Skipped':
|
||||
<a class="web-symbol" href="queueAlbum?AlbumID=${album['AlbumID']}&ArtistID=${album['ArtistID']}" title="Mark Wanted"><span>O</span></a>
|
||||
%elif album['Status'] == 'Wanted':
|
||||
<a class="web-symbol" href="unqueueAlbum?AlbumID=${album['AlbumID']}&ArtistID=${album['ArtistID']}" title="Unmark Wanted"><span>N</span></a>
|
||||
%else:
|
||||
<a class="web-symbol" href="queueAlbum?AlbumID=${album['AlbumID']}&ArtistID=${album['ArtistID']}" title="Retry"><span>*</span></a>
|
||||
<a class="web-symbol" href="queueAlbum?AlbumID=${album['AlbumID']}&ArtistID=${album['ArtistID']}&new=True" title="Try new"><span>J</span></a>
|
||||
%endif
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</td>
|
||||
<td id="albumname"><a href="albumPage?AlbumID=${album['AlbumID']}">${album['AlbumTitle']}</a></td>
|
||||
<td id="reldate">${album['ReleaseDate']}</td>
|
||||
<td id="type">${album['Type']}</td>
|
||||
<td id="status"><span class="btn${album['Status']} btnStatus" title="${album['Status']}">${album['Status']}</span>
|
||||
%if album['Status'] == 'Skipped':
|
||||
<a class="btnGet btnStatus" href="queueAlbum?AlbumID=${album['AlbumID']}&ArtistID=${album['ArtistID']}" title="Get this album">Get</a>
|
||||
%elif album['Status'] == 'Wanted':
|
||||
<a class="btnAbort btnStatus" href="unqueueAlbum?AlbumID=${album['AlbumID']}&ArtistID=${album['ArtistID']}" title="Abort current status, and set to skipped">Abort</a>
|
||||
%else:
|
||||
<a class="btnRetry btnStatus" href="queueAlbum?AlbumID=${album['AlbumID']}&ArtistID=${album['ArtistID']}" title="Retry the same nbz">Retry</a>
|
||||
<a class="btnNew btnStatus" href="queueAlbum?AlbumID=${album['AlbumID']}&ArtistID=${album['ArtistID']}&new=True" title="Try a new download, skipping all previously tried nzbs">New</a>
|
||||
%endif
|
||||
</td>
|
||||
<td id="have"><span title="${percent}"><span>
|
||||
<td id="have">
|
||||
<div class="progress-container" title="You have ${havetracks} of a total ${totaltracks}">
|
||||
<span title="${percent}">${percent}</span>
|
||||
<div style="width:${percent}%">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
@@ -119,6 +146,7 @@
|
||||
%endfor
|
||||
</tbody>
|
||||
</table>
|
||||
</div><!--end listView-->
|
||||
</form>
|
||||
</%def>
|
||||
|
||||
@@ -130,31 +158,50 @@
|
||||
</%def>
|
||||
|
||||
<%def name="javascriptIncludes()">
|
||||
<script src="interfaces/brink/JS/libs/jquery.dataTables.min.js"></script>
|
||||
<script>
|
||||
$(document).ready(function()
|
||||
{
|
||||
$('#album_table').dataTable(
|
||||
{
|
||||
"aoColumns": [
|
||||
{ "bSortable": false},
|
||||
{ "bSortable": false},
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
{ "sType": "title-numeric"},
|
||||
null
|
||||
],
|
||||
"oLanguage": {
|
||||
"sLengthMenu":"Show _MENU_ artist per page",
|
||||
"sEmptyTable": "No artist information available",
|
||||
"sInfo":"Showing _TOTAL_ artist",
|
||||
"sInfoEmpty":"No artist found",
|
||||
"sInfoFiltered":"(Filtered from _MAX_ total artist)"},
|
||||
"bPaginate": false,
|
||||
"aaSorting": [[4, 'asc'],[3,'desc']]
|
||||
function getAlbumInfoGrid() {
|
||||
$(".album-container").each(function() {
|
||||
$(this).fadeIn("slow", function(){
|
||||
var element = $(this).find("img.album-image");
|
||||
var artistname = $(this).find(".album-info b").text();
|
||||
var albumname = $(this).find(".album-info span").text();
|
||||
getAlbumInfo(artistname,albumname,element,2);
|
||||
});
|
||||
});
|
||||
}
|
||||
$(document).ready(function(){
|
||||
//ListView
|
||||
getAlbumInfoGrid();
|
||||
//GridView
|
||||
$("#gridView").show();
|
||||
$("#listView").hide();
|
||||
enit();
|
||||
$("#switchViews li").click(function(){
|
||||
$("#gridView").toggle();
|
||||
$("#listView").toggle();
|
||||
var text = $(this).children("span").text() == '¹' ? '²' : '¹';
|
||||
enit();
|
||||
});
|
||||
|
||||
$('#album_table').dataTable({
|
||||
"aoColumns": [
|
||||
{ "bSortable": false},
|
||||
{ "bSortable": false},
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null
|
||||
],
|
||||
"oLanguage": {
|
||||
"sLengthMenu":"Show _MENU_ artist per page",
|
||||
"sEmptyTable": "No artist information available",
|
||||
"sInfo":"Showing _TOTAL_ artist",
|
||||
"sInfoEmpty":"No artist found",
|
||||
"sInfoFiltered":"(Filtered from _MAX_ total artist)"},
|
||||
"bPaginate": false,
|
||||
"aaSorting": [[4, 'asc'],[3,'desc']]
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</%def>
|
||||
|
||||
Reference in New Issue
Block a user