Hello community,

here is the log from the commit of package noise for openSUSE:Factory checked 
in at 2018-03-26 13:10:25
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/noise (Old)
 and      /work/SRC/openSUSE:Factory/.noise.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "noise"

Mon Mar 26 13:10:25 2018 rev:7 rq:590794 version:0.4.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/noise/noise.changes      2017-12-08 
12:57:02.674429370 +0100
+++ /work/SRC/openSUSE:Factory/.noise.new/noise.changes 2018-03-26 
13:11:30.167141807 +0200
@@ -1,0 +2,5 @@
+Sat Mar 24 02:38:11 UTC 2018 - [email protected]
+
+- Read the embedded cover art (noise-0.4.2-gst.patch) 
+
+-------------------------------------------------------------------

New:
----
  noise-0.4.2-gst.patch

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

Other differences:
------------------
++++++ noise.spec ++++++
--- /var/tmp/diff_new_pack.F5YLLE/_old  2018-03-26 13:11:33.155034370 +0200
+++ /var/tmp/diff_new_pack.F5YLLE/_new  2018-03-26 13:11:33.155034370 +0200
@@ -26,6 +26,8 @@
 Group:          Productivity/Multimedia/Sound/Players
 Url:            https://launchpad.net/noise
 Source:         
https://launchpad.net/noise/%{_version}/%{version}/+download/%{name}-%{version}.tar.xz
+# PATCH-FIX-UPSTREAM -- Read the embedded cover art (#89)
+Patch0:         noise-0.4.2-gst.patch
 BuildRequires:  cmake
 BuildRequires:  fdupes
 BuildRequires:  gcc-c++
@@ -84,6 +86,7 @@
 
 %prep
 %setup -q
+%patch0 -p1
 
 sed -i 's/metainfo/appdata/' $(grep -rwl metainfo)
 

++++++ noise-0.4.2-gst.patch ++++++
diff -ruN noise-0.4.2.orig/src/GStreamer/CoverImport.vala 
noise-0.4.2/src/GStreamer/CoverImport.vala
--- noise-0.4.2.orig/src/GStreamer/CoverImport.vala     2017-11-27 
19:02:59.000000000 +0300
+++ noise-0.4.2/src/GStreamer/CoverImport.vala  2018-03-24 05:29:26.386097981 
+0300
@@ -35,7 +35,6 @@
     construct {
         try {
             discoverer = new Gst.PbUtils.Discoverer ((Gst.ClockTime) 
(DISCOVERER_TIMEOUT * Gst.SECOND));
-            discoverer.discovered.connect (import_media);
         } catch (Error err) {
             critical ("Could not create Gst discoverer object: %s", 
err.message);
         }
@@ -43,16 +42,22 @@
 
     public CoverImport (Album album) {
         this.album = album;
-        foreach (var media in album.get_media ()) {
-            discoverer.discover_uri_async (media.uri);
-        }
-    }
-
-    public void start () {
-        discoverer.start ();
+        new Thread<void*>(null, () => {
+            lock (this.album) {
+                foreach (var media in album.get_media ()) {
+                    try {
+                        var info = discoverer.discover_uri (media.uri);
+                        read_info (info);
+                    } catch (Error err) {
+                        critical ("Error while importing cover for %s: %s", 
album.name, err.message);
+                    }
+                }
+            }
+            return null;
+        });
     }
 
-    private void import_media (Gst.PbUtils.DiscovererInfo info, Error err) {
+    private void read_info (Gst.PbUtils.DiscovererInfo info) {
         string uri = info.get_uri ();
         bool gstreamer_discovery_successful = false;
         switch (info.get_result ()) {
@@ -65,7 +70,7 @@
             break;
 
             case Gst.PbUtils.DiscovererResult.ERROR:
-                warning ("GStreamer could not import '%s': %s", uri, 
err.message);
+                warning ("GStreamer could not import '%s'", uri);
             break;
 
             case Gst.PbUtils.DiscovererResult.TIMEOUT:
@@ -102,9 +107,9 @@
                 if (buffer != null) {
                     pixbuf = get_pixbuf_from_buffer (buffer);
                     if (pixbuf != null) {
-                        album.save_cover_pixbuf (pixbuf);
-                        debug ("Cover imported for '%s'", info.get_uri ());
-                        discoverer.stop ();
+                        lock (album) {
+                            album.save_cover_pixbuf (pixbuf);
+                        }
                     }
                 }
 
@@ -151,9 +156,9 @@
         } catch (Error err) {
             warning ("Error processing image data: %s", err.message);
         }
- 
+
         buffer.unmap (map_info);
- 
+
         return pix;
     }
 }
diff -ruN noise-0.4.2.orig/src/GStreamer/GStreamerTagger.vala 
noise-0.4.2/src/GStreamer/GStreamerTagger.vala
--- noise-0.4.2.orig/src/GStreamer/GStreamerTagger.vala 2017-11-27 
19:02:59.000000000 +0300
+++ noise-0.4.2/src/GStreamer/GStreamerTagger.vala      2018-03-24 
06:15:31.523855164 +0300
@@ -86,7 +86,7 @@
         });
     }
 
-    private void import_media (Gst.PbUtils.DiscovererInfo info, Error err) {
+    private void import_media (Gst.PbUtils.DiscovererInfo info, Error? err) {
         if (cancellable.is_cancelled ()) {
             d.stop ();
             lock (uri_queue) {
diff -ruN noise-0.4.2.orig/src/LocalBackend/LocalLibrary.vala 
noise-0.4.2/src/LocalBackend/LocalLibrary.vala
--- noise-0.4.2.orig/src/LocalBackend/LocalLibrary.vala 2017-11-27 
19:02:59.000000000 +0300
+++ noise-0.4.2/src/LocalBackend/LocalLibrary.vala      2018-03-24 
05:37:19.803720112 +0300
@@ -740,8 +740,9 @@
     }
 
     public override void add_medias (Gee.Collection<Media> new_media) {
-        if (new_media.is_empty) // happens more often than you would think
-            return;
+        if (new_media.is_empty) {// happens more often than you would think
+             return;
+        }
 
         // make a copy of the media list so that it doesn't get modified before
         // the async code (e.g. updating the smart playlists) is done with it
@@ -752,20 +753,19 @@
                                                   
(Gee.EqualDataFunc<int64?>?)GLib.int64_equal, null);
         foreach (var m in media) {
             var local_m = new LocalMedia.from_media (connection, m);
-            local_media.set (local_m.rowid, local_m);
+            local_media[local_m.rowid] = local_m;
             // Append the media into an album.
             if (local_m.get_album_hashkey () in album_info.keys) {
-                var album = album_info.get (local_m.get_album_hashkey ());
+                var album = album_info[local_m.get_album_hashkey ()];
                 album.add_media (local_m);
             }
 
             if (local_m.album_info == null) {
                 var album = new Album.from_media (local_m);
                 album.add_media (local_m);
-                album_info.set (album.get_hashkey (), album);
+                album_info[album.get_hashkey ()] = album;
                 if (album.cover_icon == null) {
-                    var cover_import = new CoverImport (album);
-                    cover_import.start ();
+                    new CoverImport (album);
                 }
             }
         }

Reply via email to