[gnome-music/wip/mschraal/core: 27/118] coresong: Remove property setting duplication
- From: Marinus Schraal <mschraal src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/mschraal/core: 27/118] coresong: Remove property setting duplication
- Date: Wed, 26 Jun 2019 13:02:17 +0000 (UTC)
commit 959ea97b392913263e2e0b3ec2c1b41ca79f59ce
Author: Marinus Schraal <mschraal gnome org>
Date: Thu May 9 21:34:32 2019 +0200
coresong: Remove property setting duplication
gnomemusic/coresong.py | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)
---
diff --git a/gnomemusic/coresong.py b/gnomemusic/coresong.py
index 8b4b7f2b..a0ef381c 100644
--- a/gnomemusic/coresong.py
+++ b/gnomemusic/coresong.py
@@ -28,15 +28,7 @@ class CoreSong(GObject.GObject):
self._favorite = False
- self.props.media = media
- self.props.album = utils.get_album_title(media)
- self.props.album_disc_number = media.get_album_disc_number()
- self.props.artist = utils.get_artist_name(media)
- self.props.favorite = media.get_favourite()
- self.props.play_count = media.get_play_count()
- self.props.title = utils.get_media_title(media)
- self.props.track_number = media.get_track_number()
- self.props.url = media.get_url()
+ self.update(media)
if self.props.favorite:
print("favorite", self.props.title)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]