diff options
author | Philip Withnall <philip@tecnocode.co.uk> | 2012-10-21 15:17:31 +0100 |
---|---|---|
committer | Philip Withnall <philip@tecnocode.co.uk> | 2012-10-21 15:17:31 +0100 |
commit | 1dd2b0e4c216b88b86f38759d370004f9dcd3cf6 (patch) | |
tree | 2a8b22a895b29a1431e7ce2fcd2ebaedf72cb7f1 /src | |
parent | 35d4b93753ca50ad95f672bf64c51b35eeb085bf (diff) | |
download | totem-1dd2b0e4c216b88b86f38759d370004f9dcd3cf6.tar.gz |
Bug 686515 — dbusservice plugin has UnicodeDecodeErrror per song
Fix dbusservice plugin to correctly use Python Unicode objects to represent
song metadata, rather than UTF-8 encoded strings which it would then treat
as ASCII.
Closes: https://bugzilla.gnome.org/show_bug.cgi?id=686515
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/dbusservice/dbusservice.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/plugins/dbusservice/dbusservice.py b/src/plugins/dbusservice/dbusservice.py index 83b96d1e3..faa68fc16 100644 --- a/src/plugins/dbusservice/dbusservice.py +++ b/src/plugins/dbusservice/dbusservice.py @@ -57,9 +57,9 @@ class Root (dbus.service.Object): # pylint: disable-msg=R0923,R0904 self.totem = totem self.null_metadata = { - 'year' : '', 'tracknumber' : '', 'location' : '', - 'title' : '', 'album' : '', 'time' : '', 'genre' : '', - 'artist' : '' + 'year' : u'', 'tracknumber' : '', 'location' : '', + 'title' : u'', 'album' : u'', 'time' : u'', 'genre' : u'', + 'artist' : u'' } self.current_metadata = self.null_metadata.copy () self.current_position = 0 @@ -120,11 +120,11 @@ class Root (dbus.service.Object): # pylint: disable-msg=R0923,R0904 title, album, num): self.current_metadata = self.null_metadata.copy () if title: - self.current_metadata['title'] = title + self.current_metadata['title'] = unicode (title, 'utf-8') if artist: - self.current_metadata['artist'] = artist + self.current_metadata['artist'] = unicode (artist, 'utf-8') if album: - self.current_metadata['album'] = album + self.current_metadata['album'] = unicode (album, 'utf-8') if num: self.current_metadata['tracknumber'] = num |