mirror of
https://github.com/rembo10/headphones.git
synced 2026-05-08 20:59:25 +01:00
Allow for albums with no AlbumTitle or ArtistName
If an album is in the db with incomplete information allow the page to be accessible so it can be deleted.
This commit is contained in:
@@ -110,7 +110,14 @@ class WebInterface(object):
|
||||
album = myDB.action('SELECT * from albums WHERE AlbumID=?', [AlbumID]).fetchone()
|
||||
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']
|
||||
if not album['ArtistName']:
|
||||
title = ' - '
|
||||
else:
|
||||
title = album['ArtistName'] + ' - '
|
||||
if not album['AlbumTitle']:
|
||||
title = title + ""
|
||||
else:
|
||||
title = title + album['AlbumTitle']
|
||||
return serve_template(templatename="album.html", title=title, album=album, tracks=tracks, description=description)
|
||||
albumPage.exposed = True
|
||||
|
||||
|
||||
Reference in New Issue
Block a user