1
0
mirror of https://github.com/krateng/maloja.git synced 2023-08-10 21:12:55 +03:00

Minor fixes

This commit is contained in:
Krateng 2018-11-28 18:44:33 +01:00
parent 54bffc5642
commit ce5e342212
2 changed files with 6 additions and 4 deletions

View File

@ -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):

View File

@ -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]