mirror of
https://github.com/spl0k/supysonic.git
synced 2024-11-15 06:32:16 +00:00
parent
a4c989c36a
commit
a629910046
@ -104,7 +104,7 @@ def list_artists():
|
||||
# According to the API page, there are no parameters?
|
||||
indexes = {}
|
||||
for artist in Artist.query.all():
|
||||
index = artist.name[0].upper()
|
||||
index = artist.name[0].upper() if artist.name else '?'
|
||||
if index in map(str, xrange(10)):
|
||||
index = '#'
|
||||
elif index not in string.letters:
|
||||
|
@ -80,7 +80,7 @@ class Scanner:
|
||||
|
||||
tr.disc = self.__try_read_tag(tag, 'discnumber', 1, lambda x: int(x[0].split('/')[0]))
|
||||
tr.number = self.__try_read_tag(tag, 'tracknumber', 1, lambda x: int(x[0].split('/')[0]))
|
||||
tr.title = self.__try_read_tag(tag, 'title')
|
||||
tr.title = self.__try_read_tag(tag, 'title', '')
|
||||
tr.year = self.__try_read_tag(tag, 'date', None, lambda x: int(x[0].split('-')[0]))
|
||||
tr.genre = self.__try_read_tag(tag, 'genre')
|
||||
tr.duration = int(tag.info.length)
|
||||
|
Loading…
Reference in New Issue
Block a user