don't fail when abnshee don't return every info. Fixes #4492

This commit is contained in:
Yann Leboulanger 2008-11-18 08:52:16 +00:00
parent 866abdbcb8
commit 6af52eef21
1 changed files with 4 additions and 4 deletions

View File

@ -164,10 +164,10 @@ class MusicTrackListener(gobject.GObject):
def _banshee_properties_extract(self, props):
info = MusicTrackInfo()
info.title = props['name']
info.album = props['album']
info.artist = props['artist']
info.duration = int(props['length'])
info.title = props.get('name', None)
info.album = props.get('album', None)
info.artist = props.get('artist', None)
info.duration = int(props.get('length', 0))
return info
def get_playing_track(self):