supported more tags

This commit is contained in:
p-storm 2019-12-26 13:52:07 +01:00
parent 421f1e525b
commit 241e5ec59c

View file

@ -79,7 +79,27 @@ class Module(bumblebee.engine.Module):
def _load_song(self): def _load_song(self):
info = "" info = ""
try: try:
info = bumblebee.util.execute('mpc -f "tag artist %artist%\ntag title %title%"' + self._hostcmd) tags = {'name',
'artist',
'album',
'albumartist',
'comment',
'composer',
'date',
'originaldate',
'disc',
'genre',
'performer',
'title',
'track',
'time',
'file',
'id',
'prio',
'mtime',
'mdate'}
joinedtags = "\n".join(["tag {0} %{0}%".format(tag) for tag in tags])
info = bumblebee.util.execute('mpc -f ' + '"' + joinedtags + '"' + self._hostcmd)
except RuntimeError: except RuntimeError:
pass pass
self._tags = defaultdict(lambda: '') self._tags = defaultdict(lambda: '')