From b8b063f1232eb52e0d034caed0d3557340067626 Mon Sep 17 00:00:00 2001 From: Remy Date: Tue, 16 Aug 2011 19:27:16 -0700 Subject: [PATCH] Fixed lastfm typo, added latest album column to manage artists --- data/interfaces/default/manageartists.html | 15 ++++++++++++++- headphones/lastfm.py | 2 +- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/data/interfaces/default/manageartists.html b/data/interfaces/default/manageartists.html index d1762cb2..368d653c 100644 --- a/data/interfaces/default/manageartists.html +++ b/data/interfaces/default/manageartists.html @@ -21,6 +21,7 @@ Artist Name Status + Latest Album @@ -32,11 +33,22 @@ grade = 'C' else: grade = 'Z' + + if artist['ReleaseDate'] and artist['LatestAlbum']: + releasedate = artist['ReleaseDate'] + albumdisplay = '%s (%s)' % (artist['LatestAlbum'], artist['ReleaseDate']) + elif artist['LatestAlbum']: + releasedate = '' + albumdisplay = '%s' % artist['LatestAlbum'] + else: + releasedate = '' + albumdisplay = 'None' %> ${artist['ArtistName']} ${artist['Status']} + ${albumdisplay} %endfor @@ -58,7 +70,8 @@ "aoColumns": [ null, { "sType": "title-string"}, - null + null, + { "sType": "title-string"} ], "bStateSave": true, "bPaginate": false diff --git a/headphones/lastfm.py b/headphones/lastfm.py index f46ea2f7..f32f9963 100644 --- a/headphones/lastfm.py +++ b/headphones/lastfm.py @@ -27,7 +27,7 @@ def getSimilar(): time.sleep(1) continue - len(data) < 200: + if len(data) < 200: continue d = minidom.parseString(data)