From af0e570b4411fcbda810f6ef9867d1817a18a0d3 Mon Sep 17 00:00:00 2001 From: theguardian Date: Thu, 24 Oct 2013 09:20:18 -0700 Subject: [PATCH] Fixed minor bug where track numbers were out of order on album page (due to new index) --- headphones/webserve.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/headphones/webserve.py b/headphones/webserve.py index bdc33b73..ed79a809 100644 --- a/headphones/webserve.py +++ b/headphones/webserve.py @@ -108,7 +108,7 @@ class WebInterface(object): def albumPage(self, AlbumID): myDB = db.DBConnection() album = myDB.action('SELECT * from albums WHERE AlbumID=?', [AlbumID]).fetchone() - tracks = myDB.select('SELECT * from tracks WHERE AlbumID=?', [AlbumID]) + tracks = myDB.select('SELECT * from tracks WHERE AlbumID=? ORDER BY CAST(TrackNumber AS INTEGER)', [AlbumID]) description = myDB.action('SELECT * from descriptions WHERE ReleaseGroupID=?', [AlbumID]).fetchone() title = album['ArtistName'] + ' - ' + album['AlbumTitle'] return serve_template(templatename="album.html", title=title, album=album, tracks=tracks, description=description)