[gnome-music/wip/mschraal/gapless-v3: 8/14] grilo: Add idle_add to writeback
- From: Marinus Schraal <mschraal src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/mschraal/gapless-v3: 8/14] grilo: Add idle_add to writeback
- Date: Sun, 21 Oct 2018 22:31:45 +0000 (UTC)
commit edd1a59dc445ad56264939016d4c0ed8cb8efbef
Author: Marinus Schraal <mschraal gnome org>
Date: Wed Aug 29 23:11:10 2018 +0200
grilo: Add idle_add to writeback
Without idle_add it messes up the gst clock.
gnomemusic/grilo.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/gnomemusic/grilo.py b/gnomemusic/grilo.py
index 65d0373f..7b1e43c3 100644
--- a/gnomemusic/grilo.py
+++ b/gnomemusic/grilo.py
@@ -355,7 +355,7 @@ class Grilo(GObject.GObject):
# FIXME: We assume this is the tracker plugin.
# FIXME: Doing this async crashes
try:
- self.tracker.store_metadata_sync(
+ GLib.idle_add(self.tracker.store_metadata_sync,
song_item, [Grl.METADATA_KEY_FAVOURITE], Grl.WriteFlags.NORMAL)
except GLib.Error as error:
logger.warning("Error {}: {}".format(error.domain, error.message))
@@ -447,7 +447,7 @@ class Grilo(GObject.GObject):
# FIXME: We assume this is the tracker plugin.
# FIXME: Doing this async crashes
try:
- self.tracker.store_metadata_sync(
+ GLib.idle_add(self.tracker.store_metadata_sync,
media, [Grl.METADATA_KEY_PLAY_COUNT], Grl.WriteFlags.NORMAL)
except GLib.Error as error:
logger.warning("Error {}: {}".format(error.domain, error.message))
@@ -463,7 +463,7 @@ class Grilo(GObject.GObject):
# FIXME: We assume this is the tracker plugin.
# FIXME: Doing this async crashes
try:
- self.tracker.store_metadata_sync(
+ GLib.idle_add(self.tracker.store_metadata_sync,
media, [Grl.METADATA_KEY_LAST_PLAYED], Grl.WriteFlags.NORMAL)
except GLib.Error as error:
logger.warning("Error {}: {}".format(error.domain, error.message))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]