summaryrefslogtreecommitdiff
path: root/nephilim
diff options
context:
space:
mode:
authorAnton Khirnov <wyskas@gmail.com>2009-02-23 18:28:34 +0100
committerAnton Khirnov <wyskas@gmail.com>2009-02-23 18:28:34 +0100
commitcd290e58fa5c45f2d2d68f457f18284a526ac59c (patch)
tree98b74bc78fe9fd6ac5698f9d3818aa8cdc4b6e29 /nephilim
parent834a3b45ef38aec8656e9306d43068dfa6777e91 (diff)
clSong: remove some unused functions.
Diffstat (limited to 'nephilim')
-rw-r--r--nephilim/clSong.py13
1 files changed, 3 insertions, 10 deletions
diff --git a/nephilim/clSong.py b/nephilim/clSong.py
index c041b91..05b9f96 100644
--- a/nephilim/clSong.py
+++ b/nephilim/clSong.py
@@ -8,9 +8,9 @@ class Song:
_data = None
def __init__(self, data):
- self._data=data
+ self._data = data
if 'id' in self._data:
- self._data['id']=int(self._data['id'])
+ self._data['id'] = int(self._data['id'])
if 'track' in self._data:
# make sure the track is a valid number!
t=self._data['track']
@@ -26,7 +26,7 @@ class Song:
# ensure all string-values are utf-8 encoded
for tag in self._data.keys():
if isinstance(self._data[tag], str):
- self._data[tag]=unicode(self._data[tag], "utf-8")
+ self._data[tag] = self._data[tag].decode('utf-8')
if 'time' in self._data:
self._data['time'] = int(self._data['time'])
self._data['timems'] = '%i:%i'%(self._data['time'] / 60, self._data['time'] % 60)
@@ -56,13 +56,6 @@ class Song:
"""Get the filepath."""
return self._data['file']
- def match(self, str):
- """Checks if the string str matches this song. Assumes str is lowercase."""
- return str.__str__() in self.__str__().lower()
-
- def __str__(self):
- return "%s - %s [%s]" % (self.getTag('artist'), self.getTag('title'), self.getTag('album'))
-
def getTag(self, tag, default=''):
"""Get a tag. If it doesn't exist, return $default."""
if tag in self._data: