Fixed index page not displaying after adding an artist on python 2.7.1 for windows

This commit is contained in:
Remy
2011-05-25 11:21:19 -07:00
parent 58f849ef3c
commit 1d41f30e3d

View File

@@ -27,7 +27,6 @@ class Headphones:
c=conn.cursor()
c.execute('SELECT ArtistName, ArtistID, Status from artists order by ArtistSortName collate nocase')
results = c.fetchall()
c.close()
i = 0
page.append('''<div class="table"><table border="0" cellpadding="3">
<tr>
@@ -39,6 +38,7 @@ class Headphones:
while i < len(results):
c.execute('''SELECT AlbumTitle, ReleaseDate, DateAdded, AlbumID from albums WHERE ArtistName="%s" order by ReleaseDate DESC''' % results[i][0])
latestalbum = c.fetchall()
c.close()
today = datetime.date.today()
if latestalbum[0][1] > datetime.date.isoformat(today):
newalbumName = '<font color="#5DFC0A" size="3px"><a href="albumPage?AlbumID=%s"><i>%s</i>' % (latestalbum[0][3], latestalbum[0][0])