def albums(query=None):
"""List/search all artists."""
albums = OrderedDict()
if query:
out = mpc('search',
['album', query],
('-f', '%album%')).strip()
else:
out = mpc('list', ['album']).strip()
if not out:
return []
results = out.split('\n')
log.debug('results=%r', results)
for name in results:
albums[name] = True
return albums.keys()
评论列表
文章目录