Merge branch 'develop'

This commit is contained in:
rembo10
2012-10-09 17:44:26 +01:00
7 changed files with 13 additions and 8 deletions

View File

@@ -51,7 +51,7 @@
<div class="table_wrapper">
<div id="albumheader" class="clearfix">
<div id="albumImg">
<img height="200" alt="" class="albumArt" src="/artwork/album/${album['AlbumID']}">
<img height="200" alt="" class="albumArt" src="artwork/album/${album['AlbumID']}">
</div>
<h1><a href="http://musicbrainz.org/release-group/${album['AlbumID']}">${album['AlbumTitle']}</a></h1>

View File

@@ -122,7 +122,7 @@
%>
<tr class="grade${grade}">
<td id="select"><input type="checkbox" name="${album['AlbumID']}" class="checkbox" /></td>
<td id="albumart"><img class="albumArt" id="${album['AlbumID']}" src="/artwork/thumbs/album/${album['AlbumID']}" height="64" width="64"></td>
<td id="albumart"><img class="albumArt" id="${album['AlbumID']}" src="artwork/thumbs/album/${album['AlbumID']}" height="64" width="64"></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>

View File

@@ -35,7 +35,7 @@
"aTargets": [ 0 ],
"mData":"ArtistID",
"mRender": function ( data, type, full ) {
return '<div id="artistImg"><img class="albumArt" alt="" id="'+ data + '" src="/artwork/thumbs/artist/' + data + '"/></div>';
return '<div id="artistImg"><img class="albumArt" alt="" id="'+ data + '" src="artwork/thumbs/artist/' + data + '"/></div>';
}
},
{

View File

@@ -45,6 +45,8 @@ $(document).ready(function() {
"bServerSide": true,
"sAjaxSource": 'getLog',
"sPaginationType": "full_numbers",
"aaSorting": [[0, 'desc']],
"iDisplayLength": 25,
"bStateSave": true,
"oLanguage": {
"sSearch":"",
@@ -93,4 +95,4 @@ $(document).ready(function() {
}
}
</script>
</%def>
</%def>

View File

@@ -66,7 +66,7 @@
%>
<tr class="grade${grade}">
<td id="select"><input type="checkbox" name="${artist['ArtistID']}" class="checkbox" /></td>
<td id="albumart"><div id="artistImg"><img class="albumArt" id="${artist['ArtistID']}" src="/artwork/thumbs/artist/${artist['ArtistID']}" height="50" width="50"></div></td>
<td id="albumart"><div id="artistImg"><img class="albumArt" id="${artist['ArtistID']}" src="artwork/thumbs/artist/${artist['ArtistID']}" height="50" width="50"></div></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>

View File

@@ -40,7 +40,7 @@
%for album in wanted:
<tr class="gradeZ">
<td id="select"><input type="checkbox" name="${album['AlbumID']}" class="checkbox" /></th>
<td id="albumart"><img title="${album['AlbumID']}" height="64" width="64" src="/artwork/thumbs/album/${album['AlbumID']}"></td>
<td id="albumart"><img title="${album['AlbumID']}" height="64" width="64" src="artwork/thumbs/album/${album['AlbumID']}"></td>
<td id="artistname"><a href="artistPage?ArtistID=${album['ArtistID']}">${album['ArtistName']}</a></td>
<td id="albumname"><a href="albumPage?AlbumID=${album['AlbumID']}">${album['AlbumTitle']}</a></td>
<td id="reldate">${album['ReleaseDate']}</td>
@@ -70,7 +70,7 @@
<tbody>
%for album in upcoming:
<tr class="gradeZ">
<td id="albumart"><img title="${album['AlbumID']}" height="64" width="64" src="/artwork/thumbs/album/${album['AlbumID']}"></td>
<td id="albumart"><img title="${album['AlbumID']}" height="64" width="64" src="artwork/thumbs/album/${album['AlbumID']}"></td>
<td id="artistname"><a href="artistPage?ArtistID=${album['ArtistID']}">${album['ArtistName']}</a></td>
<td id="albumname"><a href="albumPage?AlbumID=${album['AlbumID']}">${album['AlbumTitle']}</a></td>
<td id="reldate">${album['ReleaseDate']}</td>

View File

@@ -33,6 +33,9 @@ db_lock = threading.Lock()
def dbFilename(filename="headphones.db"):
return os.path.join(headphones.DATA_DIR, filename)
def getCacheSize():
return int(headphones.CACHE_SIZEMB)
class DBConnection:
@@ -45,7 +48,7 @@ class DBConnection:
#journal disabled since we never do rollbacks
self.connection.execute("PRAGMA journal_mode = OFF")
#64mb of cache memory,probably need to make it user configurable
self.connection.execute("PRAGMA cache_size=-%s" % (headphones.CACHE_SIZEMB*1024))
self.connection.execute("PRAGMA cache_size=-%s" % (getCacheSize()*1024))
self.connection.row_factory = sqlite3.Row
def action(self, query, args=None):