=?utf-8?q?=5Btotem/gnome-3-6=5D_Bug_686515_=E2=80=94_dbusservice_plugin_h?= =?utf-8?q?as_UnicodeDecodeErrror_per_song?=
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem/gnome-3-6] Bug 686515 â dbusservice plugin has UnicodeDecodeErrror per song
- Date: Sun, 21 Oct 2012 14:19:42 +0000 (UTC)
commit 3d899641c8ca1185554a884c99899ac19700f4b8
Author: Philip Withnall <philip tecnocode co uk>
Date: Sun Oct 21 15:17:31 2012 +0100
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
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 83b96d1..faa68fc 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]