Hello community,

here is the log from the commit of package gnome-music for openSUSE:Factory 
checked in at 2019-11-29 15:57:31
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/gnome-music (Old)
 and      /work/SRC/openSUSE:Factory/.gnome-music.new.26869 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "gnome-music"

Fri Nov 29 15:57:31 2019 rev:47 rq:750952 version:3.34.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/gnome-music/gnome-music.changes  2019-10-30 
14:40:12.097696097 +0100
+++ /work/SRC/openSUSE:Factory/.gnome-music.new.26869/gnome-music.changes       
2019-11-29 16:01:41.380835632 +0100
@@ -1,0 +2,15 @@
+Sun Nov 24 19:37:15 UTC 2019 - Bjørn Lie <[email protected]>
+
+- Update to version 3.34.2:
+  + Load Album Covers on demand.
+  + Restore support for "Album Artist" tag.
+  + Disable online search by default.
+  + CoreModel misc cleanups and fixes.
+  + MPRIS misc cleanups and fixes.
+  + Bugs fixed: glgo#GNOME/gnome-music#328,
+    glgo#GNOME/gnome-music#332, glgo#GNOME/gnome-music#335,
+    glgo#GNOME/gnome-music#337, glgo#GNOME/gnome-music#312,
+    glgo#GNOME/gnome-music#338, glgo#GNOME/gnome-music#331,
+    glgo#GNOME/gnome-music#317.
+
+-------------------------------------------------------------------

Old:
----
  gnome-music-3.34.1.tar.xz

New:
----
  gnome-music-3.34.2.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ gnome-music.spec ++++++
--- /var/tmp/diff_new_pack.4Jj4zh/_old  2019-11-29 16:01:41.928835407 +0100
+++ /var/tmp/diff_new_pack.4Jj4zh/_new  2019-11-29 16:01:41.932835406 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package gnome-music
 #
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
 
 
 Name:           gnome-music
-Version:        3.34.1
+Version:        3.34.2
 Release:        0
 Summary:        Music Player for GNOME
 License:        SUSE-GPL-2.0-with-plugin-exception AND LGPL-2.1-or-later

++++++ gnome-music-3.34.1.tar.xz -> gnome-music-3.34.2.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gnome-music-3.34.1/NEWS new/gnome-music-3.34.2/NEWS
--- old/gnome-music-3.34.1/NEWS 2019-10-25 17:59:21.000000000 +0200
+++ new/gnome-music-3.34.2/NEWS 2019-11-24 20:27:19.000000000 +0100
@@ -1,3 +1,26 @@
+Overview of changes in 3.34.2
+=============================
+
+* Load Album Covers on demand
+* Restore support for "Album Artist" tag
+* Disable online search by default
+* CoreModel misc cleanups and fixes
+* MPRIS misc cleanups and fixes
+
+Bugs fixed:
+ Fix a crash in Last.fm support (#328)
+ GNOME shell MPRIS controls are not visible (#332)
+ PlayerToolbar can become invisible (#335)
+ Issues when resizing window below apparent minimum width (#337)
+ GNOME music crashes after creating a huge amount of threads (#312)
+ GNOME Music crashes if xdg_music_dir is not set (#338)
+ group artists with a feat or an original artist under the same artist (#331)
+ Songs Not in ~/Music Show Up In Search (#317)
+
+Thanks to our contributors this release:
+ Jean Felder
+ Marinus Schraal
+
 Overview of changes in 3.34.1
 =============================
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gnome-music-3.34.1/data/ui/AlbumsView.ui 
new/gnome-music-3.34.2/data/ui/AlbumsView.ui
--- old/gnome-music-3.34.1/data/ui/AlbumsView.ui        2019-10-25 
17:59:21.000000000 +0200
+++ new/gnome-music-3.34.2/data/ui/AlbumsView.ui        2019-11-24 
20:27:19.000000000 +0100
@@ -3,7 +3,7 @@
   <requires lib="gtk+" version="3.18"/>
   <template class="AlbumsView" parent="GtkStack">
     <child>
-      <object class="GtkScrolledWindow" id="_all_albums">
+      <object class="GtkScrolledWindow" id="_scrolled_window">
         <property name="visible">True</property>
         <child>
           <object class="GtkFlowBox" id="_flowbox">
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gnome-music-3.34.1/data/ui/Window.ui 
new/gnome-music-3.34.2/data/ui/Window.ui
--- old/gnome-music-3.34.1/data/ui/Window.ui    2019-10-25 17:59:21.000000000 
+0200
+++ new/gnome-music-3.34.2/data/ui/Window.ui    2019-11-24 20:27:19.000000000 
+0100
@@ -11,7 +11,7 @@
           <object class="GtkOverlay" id="_overlay">
             <property name="vexpand">True</property>
             <property name="visible">True</property>
-            <child type="overlay">
+            <child>
               <object class="GtkStack" id="_stack">
                 <property name="can-focus">False</property>
                 <property name="homogeneous">False</property>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gnome-music-3.34.1/gnomemusic/coregrilo.py 
new/gnome-music-3.34.2/gnomemusic/coregrilo.py
--- old/gnome-music-3.34.1/gnomemusic/coregrilo.py      2019-10-25 
17:59:21.000000000 +0200
+++ new/gnome-music-3.34.2/gnomemusic/coregrilo.py      2019-11-24 
20:27:19.000000000 +0100
@@ -126,6 +126,7 @@
         new_state = self._tracker_wrapper.props.tracker_available
         if (source.props.source_id == "grl-tracker-source"
                 and source.props.source_id not in self._wrappers.keys()
+                and TrackerWrapper.location_filter() is not None
                 and new_state == TrackerState.AVAILABLE):
             new_wrapper = GrlTrackerWrapper(
                 source, self._coremodel, self._application, self,
@@ -139,7 +140,8 @@
         elif (source.props.source_id not in self._search_wrappers.keys()
                 and source.props.source_id not in self._wrappers.keys()
                 and source.get_supported_media() & Grl.MediaType.AUDIO
-                and source.supported_operations() & Grl.SupportedOps.SEARCH):
+                and source.supported_operations() & Grl.SupportedOps.SEARCH
+                and "net:internet" not in source.props.source_tags):
             self._search_wrappers[source.props.source_id] = GrlSearchWrapper(
                 source, self._coremodel, self._coreselection, self)
             print("search source", source)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gnome-music-3.34.1/gnomemusic/coremodel.py 
new/gnome-music-3.34.2/gnomemusic/coremodel.py
--- old/gnome-music-3.34.1/gnomemusic/coremodel.py      2019-10-25 
17:59:21.000000000 +0200
+++ new/gnome-music-3.34.2/gnomemusic/coremodel.py      2019-11-24 
20:27:19.000000000 +0100
@@ -224,6 +224,15 @@
         return albums_model_sort
 
     def set_player_model(self, playlist_type, model):
+        """Set the model for PlayerPlaylist to use
+
+        This fills playlist model based on the playlist type and model
+        given. This builds a separate model to stay alive and play
+        while the user navigates other views.
+
+        :param PlaylistType playlist_type: The type of the playlist
+        :param Gio.ListStore model: The base model for the player model
+        """
         if model is self._previous_playlist_model:
             for song in self._playlist_model:
                 if song.props.state == SongWidget.State.PLAYING:
@@ -254,116 +263,114 @@
                         GObject.BindingFlags.BIDIRECTIONAL
                         | GObject.BindingFlags.SYNC_CREATE)
 
-        with model.freeze_notify():
-            played_states = [SongWidget.State.PLAYING, SongWidget.State.PLAYED]
-            for song in self._playlist_model:
-                if song.props.state in played_states:
-                    song.props.state = SongWidget.State.UNPLAYED
-
-            if self._player_signal_id is not None:
-                self._current_playlist_model.disconnect(self._player_signal_id)
-                self._player_signal_id = None
-                self._current_playlist_model = None
-
-            if (playlist_type != PlayerPlaylist.Type.PLAYLIST
-                    and self.props.active_playlist is not None):
-                self.props.active_playlist = None
-
-            self._playlist_model.remove_all()
+        played_states = [SongWidget.State.PLAYING, SongWidget.State.PLAYED]
+        for song in self._playlist_model:
+            if song.props.state in played_states:
+                song.props.state = SongWidget.State.UNPLAYED
+
+        if self._player_signal_id is not None:
+            self._current_playlist_model.disconnect(self._player_signal_id)
+            self._player_signal_id = None
+            self._current_playlist_model = None
+
+        if (playlist_type != PlayerPlaylist.Type.PLAYLIST
+                and self.props.active_playlist is not None):
+            self.props.active_playlist = None
+
+        songs_added = []
+
+        if playlist_type == PlayerPlaylist.Type.ALBUM:
+            proxy_model = Gio.ListStore.new(Gio.ListModel)
+
+            for disc in model:
+                proxy_model.append(disc.props.model)
+
+            self._flatten_model = Gfm.FlattenListModel.new(
+                CoreSong, proxy_model)
+            self._current_playlist_model = self._flatten_model
+
+            for model_song in self._flatten_model:
+                song = CoreSong(
+                    model_song.props.media, self._coreselection,
+                    self.props.grilo)
+
+                songs_added.append(song)
+                song.bind_property(
+                    "state", model_song, "state",
+                    GObject.BindingFlags.SYNC_CREATE)
+                model_song.bind_property(
+                    "validation", song, "validation",
+                    GObject.BindingFlags.BIDIRECTIONAL
+                    | GObject.BindingFlags.SYNC_CREATE)
 
-            if playlist_type == PlayerPlaylist.Type.ALBUM:
-                proxy_model = Gio.ListStore.new(Gio.ListModel)
+        elif playlist_type == PlayerPlaylist.Type.ARTIST:
+            proxy_model = Gio.ListStore.new(Gio.ListModel)
 
-                for disc in model:
+            for artist_album in model:
+                for disc in artist_album.model:
                     proxy_model.append(disc.props.model)
 
-                self._flatten_model = Gfm.FlattenListModel.new(
-                    CoreSong, proxy_model)
-                self._current_playlist_model = self._flatten_model
-
-                for model_song in self._flatten_model:
-                    song = CoreSong(
-                        model_song.props.media, self._coreselection,
-                        self.props.grilo)
-
-                    self._playlist_model.append(song)
-                    song.bind_property(
-                        "state", model_song, "state",
-                        GObject.BindingFlags.SYNC_CREATE)
-                    model_song.bind_property(
-                        "validation", song, "validation",
-                        GObject.BindingFlags.BIDIRECTIONAL
-                        | GObject.BindingFlags.SYNC_CREATE)
-
-                self.emit("playlist-loaded", playlist_type)
-            elif playlist_type == PlayerPlaylist.Type.ARTIST:
-                proxy_model = Gio.ListStore.new(Gio.ListModel)
-
-                for artist_album in model:
-                    for disc in artist_album.model:
-                        proxy_model.append(disc.props.model)
-
-                self._flatten_model = Gfm.FlattenListModel.new(
-                    CoreSong, proxy_model)
-                self._current_playlist_model = self._flatten_model
-
-                for model_song in self._flatten_model:
-                    song = CoreSong(
-                        model_song.props.media, self._coreselection,
-                        self.props.grilo)
-
-                    self._playlist_model.append(song)
-                    song.bind_property(
-                        "state", model_song, "state",
-                        GObject.BindingFlags.SYNC_CREATE)
-                    model_song.bind_property(
-                        "validation", song, "validation",
-                        GObject.BindingFlags.BIDIRECTIONAL
-                        | GObject.BindingFlags.SYNC_CREATE)
-
-                self.emit("playlist-loaded", playlist_type)
-            elif playlist_type == PlayerPlaylist.Type.SONGS:
-                self._current_playlist_model = self._songliststore.props.model
+            self._flatten_model = Gfm.FlattenListModel.new(
+                CoreSong, proxy_model)
+            self._current_playlist_model = self._flatten_model
+
+            for model_song in self._flatten_model:
+                song = CoreSong(
+                    model_song.props.media, self._coreselection,
+                    self.props.grilo)
+
+                songs_added.append(song)
+                song.bind_property(
+                    "state", model_song, "state",
+                    GObject.BindingFlags.SYNC_CREATE)
+                model_song.bind_property(
+                    "validation", song, "validation",
+                    GObject.BindingFlags.BIDIRECTIONAL
+                    | GObject.BindingFlags.SYNC_CREATE)
 
-                for song in self._songliststore.props.model:
-                    self._playlist_model.append(song)
+        elif playlist_type == PlayerPlaylist.Type.SONGS:
+            self._current_playlist_model = self._songliststore.props.model
 
-                    if song.props.state == SongWidget.State.PLAYING:
-                        song.props.state = SongWidget.State.PLAYED
+            for song in self._songliststore.props.model:
+                songs_added.append(song)
 
-                self.emit("playlist-loaded", playlist_type)
-            elif playlist_type == PlayerPlaylist.Type.SEARCH_RESULT:
-                self._current_playlist_model = self._song_search_flatten
-
-                for song in self._song_search_flatten:
-                    self._playlist_model.append(song)
+                if song.props.state == SongWidget.State.PLAYING:
+                    song.props.state = SongWidget.State.PLAYED
 
-                self.emit("playlist-loaded", playlist_type)
-            elif playlist_type == PlayerPlaylist.Type.PLAYLIST:
-                self._current_playlist_model = model
+        elif playlist_type == PlayerPlaylist.Type.SEARCH_RESULT:
+            self._current_playlist_model = self._song_search_flatten
 
-                for model_song in model:
-                    song = CoreSong(
-                        model_song.props.media, self._coreselection,
-                        self.props.grilo)
+            for song in self._song_search_flatten:
+                songs_added.append(song)
 
-                    self._playlist_model.append(song)
+        elif playlist_type == PlayerPlaylist.Type.PLAYLIST:
+            self._current_playlist_model = model
 
-                    song.bind_property(
-                        "state", model_song, "state",
-                        GObject.BindingFlags.SYNC_CREATE)
-                    model_song.bind_property(
-                        "validation", song, "validation",
-                        GObject.BindingFlags.BIDIRECTIONAL
-                        | GObject.BindingFlags.SYNC_CREATE)
+            for model_song in model:
+                song = CoreSong(
+                    model_song.props.media, self._coreselection,
+                    self.props.grilo)
+
+                songs_added.append(song)
+
+                song.bind_property(
+                    "state", model_song, "state",
+                    GObject.BindingFlags.SYNC_CREATE)
+                model_song.bind_property(
+                    "validation", song, "validation",
+                    GObject.BindingFlags.BIDIRECTIONAL
+                    | GObject.BindingFlags.SYNC_CREATE)
 
-                self.emit("playlist-loaded", playlist_type)
+        self._playlist_model.splice(
+            0, self._playlist_model.get_n_items(), songs_added)
 
         if self._current_playlist_model is not None:
             self._player_signal_id = self._current_playlist_model.connect(
                 "items-changed", _on_items_changed)
         self._previous_playlist_model = model
 
+        self.emit("playlist-loaded", playlist_type)
+
     def stage_playlist_deletion(self, playlist):
         """Prepares playlist deletion.
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gnome-music-3.34.1/gnomemusic/mpris.py 
new/gnome-music-3.34.2/gnomemusic/mpris.py
--- old/gnome-music-3.34.1/gnomemusic/mpris.py  2019-10-25 17:59:21.000000000 
+0200
+++ new/gnome-music-3.34.2/gnomemusic/mpris.py  2019-11-24 20:27:19.000000000 
+0100
@@ -293,6 +293,7 @@
 
         self._coremodel = app.props.coremodel
         self._player_model = self._coremodel.props.playlist_sort
+        self._player_model_changed_id = None
 
         self._coremodel.connect(
             "playlist-loaded", self._on_player_playlist_changed)
@@ -325,12 +326,12 @@
 
     @log
     def _get_loop_status(self):
-        if self._player.props.repeat_mode == RepeatMode.NONE:
-            return 'None'
+        if self._player.props.repeat_mode == RepeatMode.ALL:
+            return "Playlist"
         elif self._player.props.repeat_mode == RepeatMode.SONG:
             return 'Track'
         else:
-            return 'Playlist'
+            return "None"
 
     @log
     def _get_metadata(self, coresong=None, index=None):
@@ -460,7 +461,8 @@
         # current song has changed
         if (not previous_path_list
                 or previous_path_list[0] != self._path_list[0]
-                or previous_path_list[-1] != self._path_list[-1]):
+                or previous_path_list[-1] != self._path_list[-1]
+                or len(previous_path_list) != len(self._path_list)):
             current_song_path = self._get_song_dbus_path()
             self._track_list_replaced(self._path_list, current_song_path)
 
@@ -515,6 +517,18 @@
             if self._previous_can_play is True:
                 return
 
+        if self._player_model_changed_id is None:
+            self._player_model_changed_id = self._player_model.connect_after(
+                "items-changed", self._on_player_model_changed)
+
+        self._on_player_model_changed(self._player_model, 0, 0, 0)
+
+    def _on_player_model_changed(self, model, pos, removed, added):
+        # Do no update the properties if the model has completely changed.
+        # These changes will be applied once a new song starts playing.
+        if added == model.get_n_items():
+            return
+
         self._update_songs_list()
 
         properties = {}
@@ -531,8 +545,8 @@
             self._previous_can_go_previous = has_previous
 
         if self._previous_can_play is not True:
-            properties["CanPause"] = GLib.Variant("b", has_previous)
-            properties["CanPlay"] = GLib.Variant("b", has_previous)
+            properties["CanPause"] = GLib.Variant("b", True)
+            properties["CanPlay"] = GLib.Variant("b", True)
             self._previous_can_play = True
 
         self._properties_changed(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gnome-music-3.34.1/gnomemusic/scrobbler.py 
new/gnome-music-3.34.2/gnomemusic/scrobbler.py
--- old/gnome-music-3.34.1/gnomemusic/scrobbler.py      2019-10-25 
17:59:21.000000000 +0200
+++ new/gnome-music-3.34.2/gnomemusic/scrobbler.py      2019-11-24 
20:27:19.000000000 +0100
@@ -128,7 +128,12 @@
     @GObject.Property
     def session_key(self):
         """Retrieve the Last.fm session key"""
-        return self._authentication.call_get_access_token_sync(None)[0]
+        try:
+            return self._authentication.call_get_access_token_sync(None)[0]
+        except GLib.Error as e:
+            logger.warning(
+                "Error: Unable to retrieve last.fm session key", e.message)
+            return None
 
 
 class LastFmScrobbler(GObject.GObject):
@@ -160,6 +165,10 @@
         """Internal method called by self.scrobble"""
         api_key = self._goa_lastfm.client_id
         sk = self._goa_lastfm.session_key
+        if sk is None:
+            logger.warning(
+                "Error: Unable to perform last.fm api call", request_type_key)
+            return
         secret = self._goa_lastfm.secret
 
         artist = utils.get_artist_name(media)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gnome-music-3.34.1/gnomemusic/trackerwrapper.py 
new/gnome-music-3.34.2/gnomemusic/trackerwrapper.py
--- old/gnome-music-3.34.1/gnomemusic/trackerwrapper.py 2019-10-25 
17:59:21.000000000 +0200
+++ new/gnome-music-3.34.2/gnomemusic/trackerwrapper.py 2019-11-24 
20:27:19.000000000 +0100
@@ -107,7 +107,7 @@
             assert music_dir is not None
         except (TypeError, AssertionError):
             logger.warning("XDG Music dir is not set")
-            return
+            return None
 
         music_dir = Tracker.sparql_escape_string(
             GLib.filename_to_uri(music_dir))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gnome-music-3.34.1/gnomemusic/views/albumsview.py 
new/gnome-music-3.34.2/gnomemusic/views/albumsview.py
--- old/gnome-music-3.34.1/gnomemusic/views/albumsview.py       2019-10-25 
17:59:21.000000000 +0200
+++ new/gnome-music-3.34.2/gnomemusic/views/albumsview.py       2019-11-24 
20:27:19.000000000 +0100
@@ -22,8 +22,10 @@
 # code, but you are not obligated to do so.  If you do not wish to do so,
 # delete this exception statement from your version.
 
+import math
+
 from gettext import gettext as _
-from gi.repository import GObject, Gtk
+from gi.repository import GLib, GObject, Gtk
 
 from gnomemusic.widgets.headerbar import HeaderBar
 from gnomemusic.widgets.albumcover import AlbumCover
@@ -43,7 +45,7 @@
     selected_items_count = GObject.Property(type=int, default=0, minimum=0)
     selection_mode = GObject.Property(type=bool, default=False)
 
-    _all_albums = Gtk.Template.Child()
+    _scrolled_window = Gtk.Template.Child()
     _flowbox = Gtk.Template.Child()
 
     def __repr__(self):
@@ -62,6 +64,9 @@
 
         self._window = application.props.window
         self._headerbar = self._window._headerbar
+        self._adjustment_timeout_id = None
+        self._viewport = self._scrolled_window.get_child()
+        self._widget_counter = 1
 
         model = self._window._app.props.coremodel.props.albums_sort
         self._flowbox.bind_model(model, self._create_widget)
@@ -83,8 +88,64 @@
         self.connect(
             "notify::search-mode-active", self._on_search_mode_changed)
 
+        self._scrolled_window.props.vadjustment.connect(
+            "value-changed", self._on_vadjustment_changed)
+        self._scrolled_window.props.vadjustment.connect(
+            "changed", self._on_vadjustment_changed)
+
         self.show_all()
 
+    def _on_vadjustment_changed(self, adjustment):
+        if self._adjustment_timeout_id is not None:
+            GLib.source_remove(self._adjustment_timeout_id)
+            self._adjustment_timeout_id = None
+
+        self._adjustment_timeout_id = GLib.timeout_add(
+            200, self._retrieve_covers, adjustment.props.value,
+            priority=GLib.PRIORITY_LOW)
+
+    def _retrieve_covers(self, old_adjustment):
+        adjustment = self._scrolled_window.props.vadjustment.props.value
+
+        if old_adjustment != adjustment:
+            return GLib.SOURCE_CONTINUE
+
+        first_cover = self._flowbox.get_child_at_index(0)
+        if first_cover is None:
+            return GLib.SOURCE_REMOVE
+
+        cover_size, _ = first_cover.get_allocated_size()
+        if cover_size.width == 0 or cover_size.height == 0:
+            return GLib.SOURCE_REMOVE
+
+        viewport_size, _ = self._viewport.get_allocated_size()
+
+        h_space = self._flowbox.get_column_spacing()
+        v_space = self._flowbox.get_row_spacing()
+        nr_cols = (
+            (viewport_size.width + h_space) // (cover_size.width + h_space))
+
+        top_left_cover = self._flowbox.get_child_at_index(
+            nr_cols * (adjustment // (cover_size.height + v_space)))
+
+        covers_col = math.ceil(viewport_size.width / cover_size.width)
+        covers_row = math.ceil(viewport_size.height / cover_size.height)
+
+        children = self._flowbox.get_children()
+        retrieve_list = []
+        for i, albumcover in enumerate(children):
+            if top_left_cover == albumcover:
+                retrieve_covers = covers_row * covers_col
+                retrieve_list = children[i:i + retrieve_covers]
+                break
+
+        for albumcover in retrieve_list:
+            albumcover.retrieve()
+
+        self._adjustment_timeout_id = None
+
+        return GLib.SOURCE_REMOVE
+
     def _on_selection_mode_changed(self, widget, data=None):
         if not self.props.selection_mode:
             self.unselect_all()
@@ -110,11 +171,16 @@
             "selected", corealbum, "selected",
             GObject.BindingFlags.BIDIRECTIONAL)
 
+        GLib.timeout_add(
+            self._widget_counter * 250, album_widget.retrieve,
+            priority=GLib.PRIORITY_LOW)
+        self._widget_counter = self._widget_counter + 1
+
         return album_widget
 
     def _back_button_clicked(self, widget, data=None):
         self._headerbar.state = HeaderBar.State.MAIN
-        self.props.visible_child = self._all_albums
+        self.props.visible_child = self._scrolled_window
 
     def _on_child_activated(self, widget, child, user_data=None):
         corealbum = child.props.corealbum
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gnome-music-3.34.1/gnomemusic/views/emptyview.py 
new/gnome-music-3.34.2/gnomemusic/views/emptyview.py
--- old/gnome-music-3.34.1/gnomemusic/views/emptyview.py        2019-10-25 
17:59:21.000000000 +0200
+++ new/gnome-music-3.34.2/gnomemusic/views/emptyview.py        2019-11-24 
20:27:19.000000000 +0100
@@ -70,6 +70,7 @@
             assert music_folder is not None
         except (TypeError, AssertionError):
             print("XDG Music dir is not set")
+            self._content_text = ""
             return
 
         music_folder = Tracker.sparql_escape_string(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gnome-music-3.34.1/gnomemusic/views/searchview.py 
new/gnome-music-3.34.2/gnomemusic/views/searchview.py
--- old/gnome-music-3.34.1/gnomemusic/views/searchview.py       2019-10-25 
17:59:21.000000000 +0200
+++ new/gnome-music-3.34.2/gnomemusic/views/searchview.py       2019-11-24 
20:27:19.000000000 +0100
@@ -160,6 +160,7 @@
 
     def _create_album_widget(self, corealbum):
         album_widget = AlbumCover(corealbum)
+        album_widget.retrieve()
 
         self.bind_property(
             "selection-mode", album_widget, "selection-mode",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gnome-music-3.34.1/gnomemusic/widgets/albumcover.py 
new/gnome-music-3.34.2/gnomemusic/widgets/albumcover.py
--- old/gnome-music-3.34.1/gnomemusic/widgets/albumcover.py     2019-10-25 
17:59:21.000000000 +0200
+++ new/gnome-music-3.34.2/gnomemusic/widgets/albumcover.py     2019-11-24 
20:27:19.000000000 +0100
@@ -24,7 +24,7 @@
 
 import gi
 gi.require_version('Grl', '0.3')
-from gi.repository import Gdk, GLib, GObject, Gtk
+from gi.repository import Gdk, GObject, Gtk
 
 from gnomemusic import log
 from gnomemusic.albumartcache import Art
@@ -68,6 +68,7 @@
         AlbumCover._nr_albums += 1
 
         self._corealbum = corealbum
+        self._retrieved = False
 
         self._tooltip = TwoLineTip()
 
@@ -96,16 +97,20 @@
 
         self.show()
 
-        # FIXME: To work around slow updating of the albumsview,
-        # load album covers with a fixed delay. This results in a
-        # quick first show with a placeholder cover and then a
-        # reasonably responsive view while loading the actual
-        # covers.
         self._update_cover_id = self._cover_stack.connect(
             "updated", self._on_cover_stack_updated)
-        GLib.timeout_add(
-            50 * self._nr_albums, self._cover_stack.update, self._corealbum,
-            priority=GLib.PRIORITY_LOW)
+
+    def retrieve(self):
+        """Start retrieving the actual album cover
+
+        Cover retrieval is an expensive operation, so use this call to
+        start the retrieval process when needed.
+        """
+        if self._retrieved:
+            return
+
+        self._retrieved = True
+        self._cover_stack.update(self._corealbum)
 
     @GObject.Property(type=CoreAlbum, flags=GObject.ParamFlags.READABLE)
     def corealbum(self):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gnome-music-3.34.1/meson.build 
new/gnome-music-3.34.2/meson.build
--- old/gnome-music-3.34.1/meson.build  2019-10-25 17:59:21.000000000 +0200
+++ new/gnome-music-3.34.2/meson.build  2019-11-24 20:27:19.000000000 +0100
@@ -1,5 +1,5 @@
 project('gnome-music',
-    version: '3.34.1',
+    version: '3.34.2',
     meson_version: '>= 0.46.0'
 )
 


Reply via email to