Added trackinfo in toolbar

This commit is contained in:
coderkun 2012-07-23 13:36:53 +02:00
commit 0d270d3fab
2 changed files with 21 additions and 6 deletions

7
mcg.py
View file

@ -208,7 +208,6 @@ class MCGClient:
album.add_track(track)
except KeyError:
pass
# TODO Alben sortieren
self._callback(self.SIGNAL_UPDATE, self._albums)
@ -221,9 +220,11 @@ class MCGClient:
state = status['state']
song = self._client.currentsong()
album = None
pos = None
if song:
album = MCGAlbum(song['artist'], song['album'], song['date'], os.path.dirname(song['file']))
self._callback(self.SIGNAL_STATUS, state, album)
album = self._albums[MCGAlbum(song['artist'], song['album'], song['date'], os.path.dirname(song['file'])).get_hash()]
pos = int(song['pos'])
self._callback(self.SIGNAL_STATUS, state, album, pos)
def _play(self, album):