[rhythmbox] mpris: if we have a streaming song title, provide the stream name too



commit 7827a0b22d4ed0c934c299de1b0864a966c3753f
Author: Jonathan Matthew <jonathan d14n org>
Date:   Sun Mar 6 22:11:14 2011 +1000

    mpris: if we have a streaming song title, provide the stream name too

 plugins/mpris/rb-mpris-plugin.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/plugins/mpris/rb-mpris-plugin.c b/plugins/mpris/rb-mpris-plugin.c
index 9f98fb7..97344b7 100644
--- a/plugins/mpris/rb-mpris-plugin.c
+++ b/plugins/mpris/rb-mpris-plugin.c
@@ -550,6 +550,15 @@ build_track_metadata (RBMprisPlugin *plugin,
 	add_string_property (builder, entry, RHYTHMDB_PROP_ALBUM_SORTNAME, "rhythmbox:albumSortname", FALSE);
 	add_string_property (builder, entry, RHYTHMDB_PROP_ALBUM_ARTIST_SORTNAME, "rhythmbox:albumArtistSortname", FALSE);
 
+	/* if we have a streaming song title, provide the stream name too */
+	md = rhythmdb_entry_request_extra_metadata (plugin->db, entry, RHYTHMDB_PROP_STREAM_SONG_TITLE);
+	if (md != NULL) {
+		add_string_property (builder, entry, RHYTHMDB_PROP_TITLE, "rhythmbox:streamTitle", FALSE);
+
+		g_value_unset (md);
+		g_free (md);
+	}
+
 	add_ulong_property (builder, entry, RHYTHMDB_PROP_BITRATE, "xesam:audioBitrate", 1024, FALSE);	/* scale to bits per second */
 
 	add_year_date_property (builder, entry, RHYTHMDB_PROP_YEAR, "xesam:contentCreated");



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