Merge pull request #499 from P-Storm/feature/mpd-tags
supported more tags
This commit is contained in:
commit
1238914fd9
1 changed files with 21 additions and 1 deletions
|
@ -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: '')
|
||||||
|
|
Loading…
Reference in a new issue