[rygel] mpris: Force refetching of Position property
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rygel] mpris: Force refetching of Position property
- Date: Sat, 27 Sep 2014 14:21:12 +0000 (UTC)
commit 77c5c69385c629c194946c48dcb2db8665f35ef6
Author: Jens Georg <mail jensge org>
Date: Sat Sep 27 14:38:00 2014 +0200
mpris: Force refetching of Position property
Position is not supposed to be notified, so for some clients
GDBus does not update the cache although it changes.
We invalidate the cache here so that it will always be re-fetched
from the peer.
Signed-off-by: Jens Georg <mail jensge org>
src/plugins/mpris/rygel-mpris-player.vala | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/plugins/mpris/rygel-mpris-player.vala b/src/plugins/mpris/rygel-mpris-player.vala
index 93a602d..d4fc242 100644
--- a/src/plugins/mpris/rygel-mpris-player.vala
+++ b/src/plugins/mpris/rygel-mpris-player.vala
@@ -167,6 +167,10 @@ public class Rygel.MPRIS.Player : GLib.Object, Rygel.MediaPlayer {
public int64 position {
get {
+ // Remove cached value. Position is not supposed to be notified
+ // so the cache might be outdated.
+ this.actual_player.set_cached_property ("Position", null);
+
return this.actual_player.position;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]