summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Khirnov <wyskas@gmail.com>2009-08-25 09:30:38 +0200
committerAnton Khirnov <wyskas@gmail.com>2009-08-25 09:30:38 +0200
commit5af7d4610a3a6f69ebcc6596dc45d9630f89ffe4 (patch)
treeb5a28425e3e59536c1dc91b0b877b7d138a5dbb5
parent83e78b12198c1388d064297097341e9e93da6e3a (diff)
song: handle QString keys.
-rw-r--r--nephilim/song.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/nephilim/song.py b/nephilim/song.py
index c9c1145..d1ea869 100644
--- a/nephilim/song.py
+++ b/nephilim/song.py
@@ -46,6 +46,8 @@ class Song(dict):
try:
return dict.__getitem__(self, key)
except KeyError:
+ if isinstance(key, QtCore.QString):
+ return self[str(key)]
if key == 'tracknum':
try:
return int(self['track'])
@@ -74,7 +76,6 @@ class Song(dict):
ret = ret.replace('$songdir', os.path.dirname(self['file']))
return ret
-
class SongRef:
"""SongRef stores only a reference to the song (uri) instead
of full metadata to conserve memory. Song's tags can be accessed