[rygel/rygel-0-24] mpris: Force refetching of Position property
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rygel/rygel-0-24] mpris: Force refetching of Position property
- Date: Mon, 13 Oct 2014 20:13:30 +0000 (UTC)
commit 86be1b60162b3c5fce346c30a5847a4102d1fc32
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]