diff --git a/data/interfaces/default/album.html b/data/interfaces/default/album.html
index 13223743..327d824e 100644
--- a/data/interfaces/default/album.html
+++ b/data/interfaces/default/album.html
@@ -324,7 +324,7 @@
if (++x === 10) {
clearInterval(refreshInterval);
}
- var sts = $("#artistname").text();
+ var sts = $("#artistname").text().trim();
if (wasLoading == true || sts == "Loading"){
location.reload();
$('#albumnamespinner').remove()
diff --git a/headphones/__init__.py b/headphones/__init__.py
index 2d622766..373bbb4b 100644
--- a/headphones/__init__.py
+++ b/headphones/__init__.py
@@ -420,6 +420,13 @@ def dbcheck():
c.execute(
'CREATE INDEX IF NOT EXISTS tracks_artistid ON tracks(ArtistID ASC)')
+ # Speed up album page
+ c.execute('CREATE INDEX IF NOT EXISTS have_matched ON have(Matched ASC)')
+ c.execute('CREATE INDEX IF NOT EXISTS allalbums_albumid ON allalbums(AlbumID ASC)')
+ c.execute('CREATE INDEX IF NOT EXISTS alltracks_albumid ON alltracks(AlbumID ASC)')
+ c.execute('CREATE INDEX IF NOT EXISTS releases_albumid ON releases(ReleaseGroupID ASC)')
+ c.execute('CREATE INDEX IF NOT EXISTS descriptions_albumid ON descriptions(ReleaseGroupID ASC)')
+
try:
c.execute('SELECT IncludeExtras from artists')
except sqlite3.OperationalError: