diff --git a/cleanup.py b/cleanup.py index fceffe3..c467191 100644 --- a/cleanup.py +++ b/cleanup.py @@ -28,9 +28,9 @@ class CleanerAgent: return s.replace("\t","").replace("␟","").replace("\n","") - delimiters_feat = ["ft.","ft","feat.","feat","featuring"] #Delimiters used for extra artists, even when in the title field - delimiters = ["vs.","vs","&"] #Delimiters in informal titles, spaces expected around them - delimiters_formal = ["; ",";"] #Delimiters used specifically to tag multiple artists when only one tag field is available, no spaces used + delimiters_feat = ["ft.","ft","feat.","feat","featuring","Ft.","Ft","Feat.","Feat","Featuring"] #Delimiters used for extra artists, even when in the title field + delimiters = ["vs.","vs","&"] #Delimiters in informal artist strings, spaces expected around them + delimiters_formal = ["; ",";"] #Delimiters used specifically to tag multiple artists when only one tag field is available, no spaces used def parseArtists(self,a): diff --git a/database.py b/database.py index abe8e3b..e7f8434 100644 --- a/database.py +++ b/database.py @@ -88,8 +88,10 @@ def get_scrobbles(): def get_tracks(): artist = request.query.get("artist") + artistid = ARTISTS.index(artist) + # Option 1 - ls = [getTrackObject(t) for t in TRACKS if (artist in t[0]) or (artist==None)] + ls = [getTrackObject(t) for t in TRACKS if (artistid in t[0]) or (artistid==None)] # Option 2 is a bit more elegant but much slower #tracklist = [getTrackObject(t) for t in TRACKS]