[Xfce4-commits] <parole:master> Merge branch 'master' of github.com:aquaherd/parole-mpris2
Hakan Erduman
noreply at xfce.org
Thu Dec 12 00:18:07 CET 2013
Updating branch refs/heads/master
to b8273a4cd22d36d972800a3fe2dc09b6bc83e7bf (commit)
from a28bdac35e71fb6dd0c776a3bc455a884cfd2cfc (commit)
commit b8273a4cd22d36d972800a3fe2dc09b6bc83e7bf
Merge: a28bdac 232b540
Author: Hakan Erduman <smultimeter at gmail.com>
Date: Tue Nov 5 23:47:55 2013 +0100
Merge branch 'master' of github.com:aquaherd/parole-mpris2
commit 232b540632a960fc753575a603604f3ef0bfbf3d
Author: matiasdelellis <mati86dl at hotmail.com>
Date: Tue Nov 5 14:58:25 2013 -0300
Emit metadata only when chage playback state to playing.
src/plugins/mpris2/mpris2-provider.c | 23 +++++++++++++----------
1 file changed, 13 insertions(+), 10 deletions(-)
diff --git a/src/plugins/mpris2/mpris2-provider.c b/src/plugins/mpris2/mpris2-provider.c
index 1845c53..925a304 100644
--- a/src/plugins/mpris2/mpris2-provider.c
+++ b/src/plugins/mpris2/mpris2-provider.c
@@ -596,17 +596,20 @@ static void parole_mpris_update_any (Mpris2Provider *provider)
provider->volume = curr_vol;
g_variant_builder_add (&b, "{sv}", "Volume", mpris_Player_get_Volume (NULL, provider));
}
- if(g_strcmp0(provider->saved_title, stream_uri))
+ if (parole_provider_player_get_state (player) == PAROLE_STATE_PLAYING)
{
- change_detected = TRUE;
- if(provider->saved_title)
- g_free(provider->saved_title);
- if (stream_uri && (stream_uri)[0])
- provider->saved_title = stream_uri;
- else
- provider->saved_title = NULL;
-
- g_variant_builder_add (&b, "{sv}", "Metadata", mpris_Player_get_Metadata (NULL, provider));
+ if(g_strcmp0(provider->saved_title, stream_uri))
+ {
+ change_detected = TRUE;
+ if(provider->saved_title)
+ g_free(provider->saved_title);
+ if (stream_uri && (stream_uri)[0])
+ provider->saved_title = stream_uri;
+ else
+ provider->saved_title = NULL;
+
+ g_variant_builder_add (&b, "{sv}", "Metadata", mpris_Player_get_Metadata (NULL, provider));
+ }
}
if(change_detected)
{
More information about the Xfce4-commits
mailing list