rpms/audacious/devel audacious-2.2-coverart-2.patch, NONE, 1.1 audacious.spec, 1.72, 1.73 audacious-2.2-coverart.patch, 1.1, NONE

Michael Schwendt mschwendt at fedoraproject.org
Sat Mar 6 18:38:56 UTC 2010


Author: mschwendt

Update of /cvs/pkgs/rpms/audacious/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv1042

Modified Files:
	audacious.spec 
Added Files:
	audacious-2.2-coverart-2.patch 
Removed Files:
	audacious-2.2-coverart.patch 
Log Message:
* Sat Mar  6 2010 Michael Schwendt <mschwendt at fedoraproject.org> - 2.2-13
- Enhance the coverart patch to not display an empty filename for
  streams when title isn't known yet and filename isn't either.


audacious-2.2-coverart-2.patch:
 ui_albumart.c      |    2 ++
 ui_fileinfo.c      |    6 ++++--
 ui_fileinfopopup.c |   16 ++++++++++++----
 3 files changed, 18 insertions(+), 6 deletions(-)

--- NEW FILE audacious-2.2-coverart-2.patch ---
diff -Nur audacious-2.2-orig/src/audacious/ui_albumart.c audacious-2.2/src/audacious/ui_albumart.c
--- audacious-2.2-orig/src/audacious/ui_albumart.c	2009-11-22 23:43:47.000000000 +0100
+++ audacious-2.2/src/audacious/ui_albumart.c	2010-03-06 19:24:16.000000000 +0100
@@ -123,6 +123,8 @@
 {
 	GDir *d;
 
+    if (!path)
+        return NULL;
 	if (cfg.recurse_for_cover && depth > cfg.recurse_for_cover_depth)
 		return NULL;
 
diff -Nur audacious-2.2-orig/src/audacious/ui_fileinfo.c audacious-2.2/src/audacious/ui_fileinfo.c
--- audacious-2.2-orig/src/audacious/ui_fileinfo.c	2009-11-22 23:43:47.000000000 +0100
+++ audacious-2.2/src/audacious/ui_fileinfo.c	2010-03-06 19:24:16.000000000 +0100
@@ -790,7 +790,7 @@
 fileinfo_show_for_tuple(Tuple *tuple, gboolean updating_enabled)
 {
     gchar *tmp = NULL;
-    GdkPixbuf *icon = NULL;
+    GdkPixbuf *icon = NULL, *localpath = NULL;
     GtkTreeIter iter;
     GtkListStore *store;
     mowgli_dictionary_iteration_state_t state;
@@ -849,9 +849,11 @@
         g_object_unref(icon);
     }
 
+    localpath = g_filename_from_uri( tuple_get_string(tuple, FIELD_FILE_PATH, NULL), NULL, NULL );
     tmp = fileinfo_recursive_get_image(
-            tuple_get_string(tuple, FIELD_FILE_PATH, NULL),
+            localpath,
             tuple_get_string(tuple, FIELD_FILE_NAME, NULL), 0);
+    g_free(localpath);
 
     if (tmp) {
         fileinfo_entry_set_image(image_artwork, tmp);
diff -Nur audacious-2.2-orig/src/audacious/ui_fileinfopopup.c audacious-2.2/src/audacious/ui_fileinfopopup.c
--- audacious-2.2-orig/src/audacious/ui_fileinfopopup.c	2009-11-22 23:43:47.000000000 +0100
+++ audacious-2.2/src/audacious/ui_fileinfopopup.c	2010-03-06 19:26:09.000000000 +0100
@@ -340,6 +340,7 @@
     gchar *last_artwork;
     const static gchar default_artwork[] = DATA_DIR "/images/audio.png";
     gint length;
+    const gchar *fpath, *fname;
 
     last_artwork =
         g_object_get_data(G_OBJECT(filepopup_win), "last_artwork");
@@ -352,11 +353,16 @@
         tmp = NULL;
         g_object_set_data(G_OBJECT(filepopup_win), "file", NULL);
     }
-    if (tuple_get_string(tuple, FIELD_FILE_PATH, NULL) && tuple_get_string(tuple, FIELD_FILE_NAME, NULL))
+    fpath = tuple_get_string(tuple, FIELD_FILE_PATH, NULL);
+    fname = tuple_get_string(tuple, FIELD_FILE_NAME, NULL);
+    if (fpath && fname)
         g_object_set_data(G_OBJECT(filepopup_win), "file",
-                          g_build_filename(tuple_get_string(tuple, FIELD_FILE_PATH, NULL),
-                                           tuple_get_string(tuple, FIELD_FILE_NAME, NULL),
+                          g_build_filename(fpath,fname,
                                            NULL));
+    else {
+        if (!tuple_get_string(tuple, FIELD_TITLE, NULL))
+            return;
+    }
 
     gtk_widget_realize(filepopup_win);
 
@@ -408,7 +414,9 @@
     g_free(track_string);
 
     if (tuple_get_string(tuple, FIELD_FILE_NAME, NULL) && tuple_get_string(tuple, FIELD_FILE_PATH, NULL)) {
-        tmp = fileinfo_recursive_get_image(tuple_get_string(tuple, FIELD_FILE_PATH, NULL), tuple_get_string(tuple, FIELD_FILE_NAME, NULL), 0);
+        gchar *localpath = g_filename_from_uri( tuple_get_string(tuple, FIELD_FILE_PATH, NULL), NULL, NULL );
+        tmp = fileinfo_recursive_get_image( localpath, tuple_get_string(tuple, FIELD_FILE_NAME, NULL), 0);
+        g_free(localpath);
         if (tmp) { // picture found
             if (!last_artwork || strcmp(last_artwork, tmp)) { // new picture
                 filepopup_entry_set_image(filepopup_win, "image_artwork", tmp);


Index: audacious.spec
===================================================================
RCS file: /cvs/pkgs/rpms/audacious/devel/audacious.spec,v
retrieving revision 1.72
retrieving revision 1.73
diff -u -p -r1.72 -r1.73
--- audacious.spec	15 Feb 2010 19:26:14 -0000	1.72
+++ audacious.spec	6 Mar 2010 18:38:56 -0000	1.73
@@ -5,7 +5,7 @@
 
 Name: audacious
 Version: 2.2
-Release: 12%{?dist}
+Release: 13%{?dist}
 
 License: GPLv3
 Summary: GTK2 based media player similar to XMMS
@@ -28,7 +28,7 @@ Patch4: audacious-2.2-set_tuple_cb.patch
 #
 Patch5: audacious-2.2-libm.patch
 # obsolete with version upgrade
-Patch6: audacious-2.2-coverart.patch
+Patch6: audacious-2.2-coverart-2.patch
 
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
@@ -209,6 +209,10 @@ gtk-update-icon-cache %{_datadir}/icons/
 
 
 %changelog
+* Sat Mar  6 2010 Michael Schwendt <mschwendt at fedoraproject.org> - 2.2-13
+- Enhance the coverart patch to not display an empty filename for
+  streams when title isn't known yet and filename isn't either.
+
 * Mon Feb 15 2010 Michael Schwendt <mschwendt at fedoraproject.org> - 2.2-12
 - Fix album cover art image loader (which cannot handle vfs URIs).
 


--- audacious-2.2-coverart.patch DELETED ---



More information about the scm-commits mailing list