sound-juicer r2288 - in trunk: . libjuicer
- From: hadess svn gnome org
- To: svn-commits-list gnome org
- Subject: sound-juicer r2288 - in trunk: . libjuicer
- Date: Thu, 4 Sep 2008 16:53:02 +0000 (UTC)
Author: hadess
Date: Thu Sep 4 16:53:02 2008
New Revision: 2288
URL: http://svn.gnome.org/viewvc/sound-juicer?rev=2288&view=rev
Log:
2008-09-04 Bastien Nocera <hadess hadess net>
* libjuicer/sj-metadata-cdtext.c (cdtext_list_albums):
Remove some TODO items
* libjuicer/sj-metadata-musicbrainz3.c:
* libjuicer/sj-metadata.c (sj_metadata_helper_check_media):
* libjuicer/sj-structures.c (album_details_free):
Fixes for rhythmbox compilation
Modified:
trunk/ChangeLog
trunk/libjuicer/sj-metadata-cdtext.c
trunk/libjuicer/sj-metadata-musicbrainz3.c
trunk/libjuicer/sj-metadata.c
trunk/libjuicer/sj-structures.c
Modified: trunk/libjuicer/sj-metadata-cdtext.c
==============================================================================
--- trunk/libjuicer/sj-metadata-cdtext.c (original)
+++ trunk/libjuicer/sj-metadata-cdtext.c Thu Sep 4 16:53:02 2008
@@ -84,17 +84,23 @@
return NULL;
}
-#if 0
- /* Why can I not read this here? If I do, I get broken track data */
+ album = g_new0(AlbumDetails, 1);
+
+ /* TODO: why can't I do this first? */
cdtext = cdio_get_cdtext(cdio, 0);
- if (!cdtext) {
- g_printerr("Cannot read CD-TEXT\n");
- /* TODO: return no metadata somehow*/
- return;
- }
-#endif
+ if (cdtext) {
+ album->title = g_strdup (cdtext_get (CDTEXT_TITLE, cdtext));
+ album->artist = g_strdup (cdtext_get (CDTEXT_PERFORMER, cdtext));
+ album->genre = g_strdup (cdtext_get (CDTEXT_GENRE, cdtext));
- album = g_new0(AlbumDetails, 1);
+ album->metadata_source = SOURCE_CDTEXT;
+ } else {
+ album->artist = g_strdup (_("Unknown Artist"));
+ album->title = g_strdup (_("Unknown Title"));
+ album->genre = g_strdup ("");
+
+ album->metadata_source = SOURCE_FALLBACK;
+ }
cdtrack = cdio_get_first_track_num(cdio);
last_cdtrack = cdtrack + cdio_get_num_tracks(cdio);
@@ -118,23 +124,6 @@
album->number++;
}
- /* TODO: why can't I do this first? */
- cdtext = cdio_get_cdtext(cdio, 0);
- if (cdtext) {
- album->title = g_strdup (cdtext_get (CDTEXT_TITLE, cdtext));
- album->artist = g_strdup (cdtext_get (CDTEXT_PERFORMER, cdtext));
- album->genre = g_strdup (cdtext_get (CDTEXT_GENRE, cdtext));
-
- album->metadata_source = SOURCE_CDTEXT;
- } else {
- album->artist = g_strdup (_("Unknown Artist"));
- album->title = g_strdup (_("Unknown Title"));
- album->genre = g_strdup ("");
-
- album->metadata_source = SOURCE_FALLBACK;
- }
-
-
priv->albums = g_list_append (NULL, album);
return priv->albums;
Modified: trunk/libjuicer/sj-metadata-musicbrainz3.c
==============================================================================
--- trunk/libjuicer/sj-metadata-musicbrainz3.c (original)
+++ trunk/libjuicer/sj-metadata-musicbrainz3.c Thu Sep 4 16:53:02 2008
@@ -31,7 +31,6 @@
#include <musicbrainz3/mb_c.h>
#include "sj-metadata-musicbrainz3.h"
-#include "sj-metadata-cdtext.h"
#include "sj-structures.h"
#include "sj-error.h"
Modified: trunk/libjuicer/sj-metadata.c
==============================================================================
--- trunk/libjuicer/sj-metadata.c (original)
+++ trunk/libjuicer/sj-metadata.c Thu Sep 4 16:53:02 2008
@@ -19,12 +19,12 @@
*/
#include <glib-object.h>
+#include <glib/gi18n.h>
#include <stdlib.h>
#include <stdio.h>
#ifndef USE_TOTEM_PL_PARSER
#include <unistd.h>
-#include <glib/gi18n.h>
#include <nautilus-burn.h>
#else
#include <totem-disc.h>
@@ -198,10 +198,10 @@
TotemDiscMediaType type;
GError *totem_error = NULL;
- type = totem_cd_detect_type (priv->cdrom, &totem_error);
+ type = totem_cd_detect_type (cdrom, &totem_error);
if (totem_error != NULL) {
- error = g_set_error (error, SJ_ERROR, SJ_ERROR_CD_NO_MEDIA, _("Cannot read CD: %s"), totem_error->message);
+ g_set_error (error, SJ_ERROR, SJ_ERROR_CD_NO_MEDIA, _("Cannot read CD: %s"), totem_error->message);
g_error_free (totem_error);
return FALSE;
Modified: trunk/libjuicer/sj-structures.c
==============================================================================
--- trunk/libjuicer/sj-structures.c (original)
+++ trunk/libjuicer/sj-structures.c Thu Sep 4 16:53:02 2008
@@ -22,7 +22,6 @@
*/
#include "sj-structures.h"
-#include "sj-util.h"
#include <glib/gmessages.h>
#include <glib/glist.h>
@@ -51,7 +50,8 @@
g_free (album->genre);
g_free (album->album_id);
if (album->release_date) g_date_free (album->release_date);
- g_list_deep_free (album->tracks, (GFunc)track_details_free);
+ g_list_foreach (album->tracks, (GFunc)track_details_free, NULL);
+ g_list_free (album->tracks);
g_free (album->artist_sortname);
g_free (album->asin);
g_free (album->discogs);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]