mirror of
https://github.com/powerline/powerline.git
synced 2025-04-08 19:25:04 +02:00
Merge pull request #1501 from mook/1500-mpd-utf8
[Players - mpd] Use Unicode where available
This commit is contained in:
commit
78c6c730ca
@ -189,7 +189,11 @@ class MpdPlayerSegment(PlayerSegment):
|
||||
'total': now_playing[3],
|
||||
}
|
||||
else:
|
||||
client = mpd.MPDClient()
|
||||
try:
|
||||
client = mpd.MPDClient(use_unicode=True)
|
||||
except TypeError:
|
||||
# python-mpd 1.x does not support use_unicode
|
||||
client = mpd.MPDClient()
|
||||
client.connect(host, port)
|
||||
if password:
|
||||
client.password(password)
|
||||
|
Loading…
x
Reference in New Issue
Block a user