rpms/rhythmbox/devel rb-0.12.0-sj-updates.patch, NONE, 1.1 rhythmbox.spec, 1.242, 1.243

Bastien Nocera hadess at fedoraproject.org
Tue Apr 14 13:47:20 UTC 2009


Author: hadess

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

Modified Files:
	rhythmbox.spec 
Added Files:
	rb-0.12.0-sj-updates.patch 
Log Message:
* Tue Apr 14 2009 - Bastien Nocera <bnocera at redhat.com> - 0.12.0-5
- Fix possible crashers in the libmusicbrainz3 code


rb-0.12.0-sj-updates.patch:

--- NEW FILE rb-0.12.0-sj-updates.patch ---
diff -upr rhythmbox-0.12.0.old/plugins/audiocd/sj-metadata.c rhythmbox-0.12.0/plugins/audiocd/sj-metadata.c
--- rhythmbox-0.12.0.old/plugins/audiocd/sj-metadata.c	2009-03-12 02:26:12.000000000 +0000
+++ rhythmbox-0.12.0/plugins/audiocd/sj-metadata.c	2009-04-14 14:34:41.000000000 +0100
@@ -26,7 +26,7 @@
 
 #ifndef USE_TOTEM_PL_PARSER
 #include <unistd.h>
-#include <nautilus-burn.h>
+#include <brasero-medium-selection.h>
 #else
 #include <totem-disc.h>
 #endif /* USE_TOTEM_PL_PARSER */
@@ -152,7 +152,11 @@ GDate *
 sj_metadata_helper_scan_date (const char *date)
 {
   int matched, year=1, month=1, day=1;
-  matched = sscanf(date, "%u-%u-%u", &year, &month, &day);
+
+  if (date == NULL)
+    return NULL;
+
+  matched = sscanf (date, "%u-%u-%u", &year, &month, &day);
   if (matched >= 1) {
     return g_date_new_dmy ((day == 0) ? 1 : day, (month == 0) ? 1 : month, year);
   }
@@ -164,22 +168,21 @@ gboolean
 sj_metadata_helper_check_media (const char *cdrom, GError **error)
 {
 #ifndef USE_TOTEM_PL_PARSER
-  NautilusBurnMediaType type;
-  NautilusBurnDriveMonitor *monitor;
-  NautilusBurnDrive *drive;
+  BraseroMediumMonitor *monitor;
+  BraseroMedium *medium;
+  BraseroDrive *drive;
 
-  if (! nautilus_burn_initialized ()) {
-    nautilus_burn_init ();
-  }
-  monitor = nautilus_burn_get_drive_monitor ();
-  drive = nautilus_burn_drive_monitor_get_drive_for_device (monitor, cdrom);
+
+  /* This initialize the library if it isn't done yet */
+  monitor = brasero_medium_monitor_get_default ();
+  drive = brasero_medium_monitor_get_drive (monitor, cdrom);
   if (drive == NULL) {
     return FALSE;
   }
-  type = nautilus_burn_drive_get_media_type (drive);
-  nautilus_burn_drive_unref (drive);
+  medium = brasero_drive_get_medium (drive);
+  g_object_unref (drive);
 
-  if (type == NAUTILUS_BURN_MEDIA_TYPE_ERROR) {
+  if (!medium || !BRASERO_MEDIUM_VALID (brasero_medium_get_status (medium))) {
     char *msg;
     SjError err;
 
diff -upr rhythmbox-0.12.0.old/plugins/audiocd/sj-metadata-gvfs.c rhythmbox-0.12.0/plugins/audiocd/sj-metadata-gvfs.c
--- rhythmbox-0.12.0.old/plugins/audiocd/sj-metadata-gvfs.c	2009-03-12 02:26:12.000000000 +0000
+++ rhythmbox-0.12.0/plugins/audiocd/sj-metadata-gvfs.c	2009-04-14 14:34:41.000000000 +0100
@@ -134,6 +134,8 @@ gvfs_list_albums (SjMetadata *metadata, 
     track->duration = g_file_info_get_attribute_uint64 (info, "xattr::org.gnome.audio.duration");
     album->number++;
     g_object_unref (info);
+
+    album->tracks = g_list_append (album->tracks, track);
   }
   g_object_unref (e);
 
diff -upr rhythmbox-0.12.0.old/plugins/audiocd/sj-metadata-musicbrainz3.c rhythmbox-0.12.0/plugins/audiocd/sj-metadata-musicbrainz3.c
--- rhythmbox-0.12.0.old/plugins/audiocd/sj-metadata-musicbrainz3.c	2009-03-12 02:26:12.000000000 +0000
+++ rhythmbox-0.12.0/plugins/audiocd/sj-metadata-musicbrainz3.c	2009-04-14 14:34:41.000000000 +0100
@@ -172,7 +172,9 @@ make_album_from_release (MbRelease *rele
     GET (track->title, mb_track_get_title, mbt);
     track->duration = mb_track_get_duration (mbt) / 1000;
 
-    artist = mb_release_get_artist (release);
+    artist = mb_track_get_artist (mbt);
+    if (artist == NULL)
+      artist = mb_release_get_artist (release);
     GET (track->artist_id, mb_artist_get_id, artist);
     GET (track->artist, mb_artist_get_name, artist);
     GET (track->artist_sortname, mb_artist_get_sortname, artist);
@@ -264,16 +266,19 @@ mb_list_albums (SjMetadata *metadata, ch
     char buffer[512];
 
     release = mb_result_list_get_release (results, i);
-    mb_release_get_id (release, buffer, sizeof (buffer));
-    includes = get_release_includes ();
-    release = mb_query_get_release_by_id (query, buffer, includes);
-    mb_release_includes_free (includes);
-
-    album = make_album_from_release (release);
-    album->metadata_source = SOURCE_MUSICBRAINZ;
-    fill_empty_durations (priv->disc, album);
-    albums = g_list_append (albums, album);
-    mb_release_free (release);
+    if(release) {
+      mb_release_get_id (release, buffer, sizeof (buffer));
+      includes = get_release_includes ();
+      release = mb_query_get_release_by_id (query, buffer, includes);
+      if(release) {
+        mb_release_includes_free (includes);
+        album = make_album_from_release (release);
+        album->metadata_source = SOURCE_MUSICBRAINZ;
+        fill_empty_durations (priv->disc, album);
+        albums = g_list_append (albums, album);
+        mb_release_free (release);
+      }
+    }
   }
   mb_result_list_free (results);
   mb_query_free (query);


Index: rhythmbox.spec
===================================================================
RCS file: /cvs/pkgs/rpms/rhythmbox/devel/rhythmbox.spec,v
retrieving revision 1.242
retrieving revision 1.243
diff -u -r1.242 -r1.243
--- rhythmbox.spec	9 Apr 2009 17:12:35 -0000	1.242
+++ rhythmbox.spec	14 Apr 2009 13:46:49 -0000	1.243
@@ -3,7 +3,7 @@
 Name: rhythmbox
 Summary: Music Management Application 
 Version: 0.12.0
-Release: 4%{?dist}
+Release: 5%{?dist}
 License: GPLv2+ with exceptions and GFDL
 Group: Applications/Multimedia
 URL: http://projects.gnome.org/rhythmbox/
@@ -59,6 +59,7 @@
 # http://bugzilla.gnome.org/show_bug.cgi?id=578514
 Patch3: rb-ddkit-monitor.patch
 BuildRequires: automake autoconf libtool
+Patch4: rb-0.12.0-sj-updates.patch
 
 %description
 Rhythmbox is an integrated music management application based on the powerful
@@ -96,6 +97,7 @@
 %patch1 -p0 -b .decodebin2
 %patch2 -p1 -b .psp-crasher
 %patch3 -p1 -b .ddkit
+%patch4 -p1 -b .sj
 
 # Use the installed louie, not the one in Coherence
 find plugins/coherence/upnp_coherence/ -type f -exec sed -i 's/coherence.extern.louie as louie/louie/' '{}' ';'
@@ -235,6 +237,9 @@
 %{_libdir}/rhythmbox/plugins/upnp_coherence
 
 %changelog
+* Tue Apr 14 2009 - Bastien Nocera <bnocera at redhat.com> - 0.12.0-5
+- Fix possible crashers in the libmusicbrainz3 code
+
 * Thu Apr 09 2009 - Bastien Nocera <bnocera at redhat.com> - 0.12.0-4
 - Fix iPod detection with the DeviceKit-disks gvfs monitor (#493640)
 




More information about the scm-commits mailing list