[gnome-music/wip/mschraal/file-exists-async: 5/8] lower priorities
- From: Marinus Schraal <mschraal src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/mschraal/file-exists-async: 5/8] lower priorities
- Date: Tue, 17 Aug 2021 10:25:00 +0000 (UTC)
commit 99af0adc2101092cc89bc95536785e45ac3b3ddc
Author: Marinus Schraal <mschraal gnome org>
Date: Tue Aug 17 00:39:53 2021 +0200
lower priorities
gnomemusic/artcache.py | 4 ++--
gnomemusic/embeddedart.py | 2 +-
gnomemusic/fileexistsasync.py | 2 +-
gnomemusic/storeart.py | 8 ++++----
4 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/gnomemusic/artcache.py b/gnomemusic/artcache.py
index 62e364090..138580c8c 100644
--- a/gnomemusic/artcache.py
+++ b/gnomemusic/artcache.py
@@ -83,7 +83,7 @@ class ArtCache(GObject.GObject):
thumb_file = Gio.File.new_for_uri(thumbnail_uri)
if thumb_file:
thumb_file.read_async(
- GLib.PRIORITY_DEFAULT, None, self._open_stream, None)
+ GLib.PRIORITY_LOW, None, self._open_stream, None)
return
self.emit("finished", self._default_icon)
@@ -110,7 +110,7 @@ class ArtCache(GObject.GObject):
return
stream.close_async(
- GLib.PRIORITY_DEFAULT, None, self._close_stream, None)
+ GLib.PRIORITY_LOW, None, self._close_stream, None)
surface = Gdk.cairo_surface_create_from_pixbuf(
pixbuf, self._scale, None)
diff --git a/gnomemusic/embeddedart.py b/gnomemusic/embeddedart.py
index 1d2c4afc0..7ef4f93d4 100644
--- a/gnomemusic/embeddedart.py
+++ b/gnomemusic/embeddedart.py
@@ -160,7 +160,7 @@ class EmbeddedArt(GObject.GObject):
self._media_art.uri_async(
MediaArt.Type.ALBUM, MediaArt.ProcessFlags.NONE,
self._coreobject.props.url, self._artist, self._album,
- GLib.PRIORITY_DEFAULT, None, self._uri_async_cb, None)
+ GLib.PRIORITY_LOW, None, self._uri_async_cb, None)
def _uri_async_cb(self, src, result, data):
try:
diff --git a/gnomemusic/fileexistsasync.py b/gnomemusic/fileexistsasync.py
index 67d913873..8a0267fdd 100644
--- a/gnomemusic/fileexistsasync.py
+++ b/gnomemusic/fileexistsasync.py
@@ -39,7 +39,7 @@ class FileExistsAsync(GObject.GObject):
def start(self, thumb_file: Gio.File) -> None:
thumb_file.query_info_async(
Gio.FILE_ATTRIBUTE_STANDARD_TYPE, Gio.FileQueryInfoFlags.NONE,
- GLib.PRIORITY_DEFAULT, None, self._on_query_info_finished)
+ GLib.PRIORITY_LOW, None, self._on_query_info_finished)
def _on_query_info_finished(
self, thumb_file: Gio.File, res: Gio.AsyncResult) -> None:
diff --git a/gnomemusic/storeart.py b/gnomemusic/storeart.py
index 1ae2e4c04..89f13c0ec 100644
--- a/gnomemusic/storeart.py
+++ b/gnomemusic/storeart.py
@@ -67,7 +67,7 @@ class StoreArt(GObject.Object):
cache_dir_file = Gio.File.new_for_path(cache_dir)
cache_dir_file.query_info_async(
Gio.FILE_ATTRIBUTE_ACCESS_CAN_READ, Gio.FileQueryInfoFlags.NONE,
- GLib.PRIORITY_DEFAULT, None, self._cache_dir_info_read, uri)
+ GLib.PRIORITY_LOW, None, self._cache_dir_info_read, uri)
def _cache_dir_info_read(self, cache_dir_file, res, uri):
try:
@@ -109,7 +109,7 @@ class StoreArt(GObject.Object):
# closed. PyGI specific issue?
ostream.splice_async(
istream, Gio.OutputStreamSpliceFlags.CLOSE_SOURCE
- | Gio.OutputStreamSpliceFlags.CLOSE_TARGET, GLib.PRIORITY_DEFAULT,
+ | Gio.OutputStreamSpliceFlags.CLOSE_TARGET, GLib.PRIORITY_LOW,
None, self._splice_callback, [tmp_file, iostream])
def _delete_callback(self, src, result, data):
@@ -123,7 +123,7 @@ class StoreArt(GObject.Object):
tmp_file, iostream = data
iostream.close_async(
- GLib.PRIORITY_DEFAULT, None, self._close_iostream_callback, None)
+ GLib.PRIORITY_LOW, None, self._close_iostream_callback, None)
try:
src.splice_finish(result)
@@ -169,7 +169,7 @@ class StoreArt(GObject.Object):
self.emit("finished")
tmp_file.delete_async(
- GLib.PRIORITY_DEFAULT, None, self._delete_callback, None)
+ GLib.PRIORITY_LOW, None, self._delete_callback, None)
def _close_iostream_callback(self, src, result, data):
try:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]