[gnome-music/wip/mschraal/core: 14/70] coresong: Add album_disc_number



commit 3025024bd320ed6fc80387c69b4150ce5b4d4174
Author: Marinus Schraal <mschraal gnome org>
Date:   Wed May 8 19:57:34 2019 +0200

    coresong: Add album_disc_number

 gnomemusic/coregrilo.py | 1 +
 gnomemusic/coresong.py  | 1 +
 2 files changed, 2 insertions(+)
---
diff --git a/gnomemusic/coregrilo.py b/gnomemusic/coregrilo.py
index 5360a2b7..38aada99 100644
--- a/gnomemusic/coregrilo.py
+++ b/gnomemusic/coregrilo.py
@@ -73,6 +73,7 @@ class CoreGrilo(GObject.GObject):
                 nfo:duration(?song) AS ?duration
                 nie:usageCounter(?song) AS ?play_count
                 nmm:trackNumber(?song) AS ?track_number
+                nmm:setNumber(nmm:musicAlbumDisc(?song)) AS ?album_disc_number
             WHERE {
                 ?song a nmm:MusicPiece .
                 OPTIONAL {
diff --git a/gnomemusic/coresong.py b/gnomemusic/coresong.py
index a85716f6..b0c5000b 100644
--- a/gnomemusic/coresong.py
+++ b/gnomemusic/coresong.py
@@ -27,6 +27,7 @@ class CoreSong(GObject.GObject):
         self._media = media
 
         self.props.album = utils.get_album_title(media)
+        self.album_disc_number = self._media.get_album_disc_number()
         self.props.artist = utils.get_artist_name(media)
         self.props.favorite = self._media.get_favourite()
         self.props.play_count = self._media.get_play_count()


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]