[gnome-music/wip/mschraal/glib-logging: 12/65] grltrackerplaylists: Use new logging
- From: Marinus Schraal <mschraal src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/mschraal/glib-logging: 12/65] grltrackerplaylists: Use new logging
- Date: Sat, 1 Feb 2020 15:17:27 +0000 (UTC)
commit ad196f0d250c04a246d9111a8e62623dca35b22a
Author: Marinus Schraal <mschraal gnome org>
Date: Mon Jan 27 19:50:39 2020 +0100
grltrackerplaylists: Use new logging
gnomemusic/grilowrappers/grltrackerplaylists.py | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/gnomemusic/grilowrappers/grltrackerplaylists.py b/gnomemusic/grilowrappers/grltrackerplaylists.py
index 5b147aa8..a45ef924 100644
--- a/gnomemusic/grilowrappers/grltrackerplaylists.py
+++ b/gnomemusic/grilowrappers/grltrackerplaylists.py
@@ -79,6 +79,7 @@ class GrlTrackerPlaylists(GObject.GObject):
self._coremodel = coremodel
self._coreselection = application.props.coreselection
self._grilo = grilo
+ self._log = application.props.log
self._source = source
self._model = self._coremodel.props.playlists
self._model_filter = self._coremodel.props.playlists_filter
@@ -144,7 +145,7 @@ class GrlTrackerPlaylists(GObject.GObject):
def _add_user_playlist(
self, source, op_id, media, remaining, data=None, error=None):
if error:
- print("ERROR", error)
+ self._log.warning("Error: {}".format(error))
self._window.notifications_popup.pop_loading()
return
if not media:
@@ -330,6 +331,7 @@ class Playlist(GObject.GObject):
self._coremodel = coremodel
self._coreselection = application.props.coreselection
self._grilo = grilo
+ self._log = application.props.log
self._tracker = tracker
self._window = application.props.window
@@ -716,7 +718,7 @@ class SmartPlaylist(Playlist):
def _add_to_model(source, op_id, media, remaining, error):
if error:
- print("ERROR", error)
+ self._log.warning("Error: {}".format(error))
self._window.notifications_popup.pop_loading()
self.emit("playlist-loaded")
return
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]