mcg: Hash-Algorithmus korrigiert (gibt nun Strings zur?ck satt Bytes), Methode play() hinzugef?gt

This commit is contained in:
coderkun 2012-06-20 03:14:28 +02:00
parent 72ea078a1f
commit 7252a63e98

10
mcg.py
View file

@ -103,6 +103,11 @@ class MCGClient:
self._callback(self.SIGNAL_UPDATE, self._albums)
def play(self, album):
# TODO play()
print("play: ", self._albums[album].get_title())
def _idle(self, modules):
if not modules:
return
@ -246,10 +251,7 @@ class MCGAlbum:
def hash(self, artist, title):
h = md5()
h.update(artist.encode('utf-8'))
h.update(title.encode('utf-8'))
return h.digest()
return md5(artist.encode('utf-8')+title.encode('utf-8')).hexdigest()
def _set_hash(self):