[gnome-music/wip/mschraal/core: 30/86] coresong: add track_number
- From: Marinus Schraal <mschraal src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/mschraal/core: 30/86] coresong: add track_number
- Date: Fri, 7 Jun 2019 15:29:42 +0000 (UTC)
commit fdead6d8899b3626c274f979d8fb002994dac8bb
Author: Marinus Schraal <mschraal gnome org>
Date: Wed May 8 17:56:49 2019 +0200
coresong: add track_number
gnomemusic/coregrilo.py | 1 +
gnomemusic/coresong.py | 2 ++
2 files changed, 3 insertions(+)
---
diff --git a/gnomemusic/coregrilo.py b/gnomemusic/coregrilo.py
index e520bcb0..5360a2b7 100644
--- a/gnomemusic/coregrilo.py
+++ b/gnomemusic/coregrilo.py
@@ -72,6 +72,7 @@ class CoreGrilo(GObject.GObject):
nie:title(nmm:musicAlbum(?song)) AS ?album
nfo:duration(?song) AS ?duration
nie:usageCounter(?song) AS ?play_count
+ nmm:trackNumber(?song) AS ?track_number
WHERE {
?song a nmm:MusicPiece .
OPTIONAL {
diff --git a/gnomemusic/coresong.py b/gnomemusic/coresong.py
index d05f532f..a85716f6 100644
--- a/gnomemusic/coresong.py
+++ b/gnomemusic/coresong.py
@@ -17,6 +17,7 @@ class CoreSong(GObject.GObject):
favorite = GObject.Property(type=int)
play_count = GObject.Property(type=int)
title = GObject.Property(type=str)
+ track_number = GObject.Property(type=int)
url = GObject.Property(type=str)
@log
@@ -30,5 +31,6 @@ class CoreSong(GObject.GObject):
self.props.favorite = self._media.get_favourite()
self.props.play_count = self._media.get_play_count()
self.props.title = utils.get_media_title(self._media)
+ self.props.track_number = self._media.get_track_number()
self.props.url = self._media.get_url()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]