rhythmbox r6275 - in trunk: . plugins/audiocd
- From: jmatthew svn gnome org
- To: svn-commits-list gnome org
- Subject: rhythmbox r6275 - in trunk: . plugins/audiocd
- Date: Mon, 6 Apr 2009 07:51:06 +0000 (UTC)
Author: jmatthew
Date: Mon Apr 6 07:51:06 2009
New Revision: 6275
URL: http://svn.gnome.org/viewvc/rhythmbox?rev=6275&view=rev
Log:
2009-04-06 Jonathan Matthew <jonathan d14n org>
* plugins/audiocd/sj-metadata.c: (sj_metadata_helper_scan_date),
(sj_metadata_helper_check_media):
Update from sound-juicer, including fix for #578060.
Modified:
trunk/ChangeLog
trunk/plugins/audiocd/sj-metadata.c
Modified: trunk/plugins/audiocd/sj-metadata.c
==============================================================================
--- trunk/plugins/audiocd/sj-metadata.c (original)
+++ trunk/plugins/audiocd/sj-metadata.c Mon Apr 6 07:51:06 2009
@@ -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 @@
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 @@
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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]