rhythmbox r5550 - in trunk: . backends/gstreamer metadata plugins/audiocd rhythmdb



Author: jmatthew
Date: Sun Jan 20 06:17:29 2008
New Revision: 5550
URL: http://svn.gnome.org/viewvc/rhythmbox?rev=5550&view=rev

Log:
2008-01-20  Jonathan Matthew  <jonathan d14n org>

	* backends/gstreamer/rb-encoder-gst.c: (add_tags_from_entry):
	* metadata/rb-metadata-common.c:
	* metadata/rb-metadata-gst.c: (rb_metadata_gst_tag_to_field),
	(rb_metadata_gst_field_to_gst_tag):
	* metadata/rb-metadata.h:
	* plugins/audiocd/rb-audiocd-source.c: (metadata_cb):
	* rhythmdb/rhythmdb-private.h:
	* rhythmdb/rhythmdb-tree.c: (save_entry):
	* rhythmdb/rhythmdb.c: (metadata_field_from_prop),
	(rhythmdb_entry_allocate), (rhythmdb_entry_finalize),
	(set_props_from_metadata), (rhythmdb_entry_set_internal),
	(rhythmdb_prop_type_get_type), (rhythmdb_entry_get_string),
	(rhythmdb_entry_get_refstring):
	* rhythmdb/rhythmdb.h:
	As far as possible, rename musicbrainz_artistsortname to
	artist_sortname.  It's not musicbrainz-specific.


Modified:
   trunk/ChangeLog
   trunk/backends/gstreamer/rb-encoder-gst.c
   trunk/metadata/rb-metadata-common.c
   trunk/metadata/rb-metadata-gst.c
   trunk/metadata/rb-metadata.h
   trunk/plugins/audiocd/rb-audiocd-source.c
   trunk/rhythmdb/rhythmdb-private.h
   trunk/rhythmdb/rhythmdb-tree.c
   trunk/rhythmdb/rhythmdb.c
   trunk/rhythmdb/rhythmdb.h

Modified: trunk/backends/gstreamer/rb-encoder-gst.c
==============================================================================
--- trunk/backends/gstreamer/rb-encoder-gst.c	(original)
+++ trunk/backends/gstreamer/rb-encoder-gst.c	Sun Jan 20 06:17:29 2008
@@ -414,9 +414,9 @@
 				  GST_TAG_MUSICBRAINZ_ALBUMARTISTID, rhythmdb_entry_get_string (entry, RHYTHMDB_PROP_MUSICBRAINZ_ALBUMARTISTID),
 				  NULL);
 	}
-	if (rhythmdb_entry_get_string (entry, RHYTHMDB_PROP_MUSICBRAINZ_ARTISTSORTNAME)) {
+	if (rhythmdb_entry_get_string (entry, RHYTHMDB_PROP_ARTIST_SORTNAME)) {
 		gst_tag_list_add (tags, GST_TAG_MERGE_APPEND,
-				  GST_TAG_MUSICBRAINZ_SORTNAME, rhythmdb_entry_get_string (entry, RHYTHMDB_PROP_MUSICBRAINZ_ARTISTSORTNAME),
+				  GST_TAG_MUSICBRAINZ_SORTNAME, rhythmdb_entry_get_string (entry, RHYTHMDB_PROP_ARTIST_SORTNAME),
 				  NULL);
 	}
 #endif

Modified: trunk/metadata/rb-metadata-common.c
==============================================================================
--- trunk/metadata/rb-metadata-common.c	(original)
+++ trunk/metadata/rb-metadata-common.c	Sun Jan 20 06:17:29 2008
@@ -65,7 +65,7 @@
 	/* RB_METADATA_FIELD_MUSICBRAINZ_ARTISTID */	{ G_TYPE_STRING, "musicbrainz-artistid" },
 	/* RB_METADATA_FIELD_MUSICBRAINZ_ALBUMID */	{ G_TYPE_STRING, "musicbrainz-albumid" },
 	/* RB_METADATA_FIELD_MUSICBRAINZ_ALBUMARTISTID */ { G_TYPE_STRING, "musicbrainz-albumartistid" },
-	/* RB_METADATA_FIELD_MUSICBRAINZ_ARTISTSORTNAME */ { G_TYPE_STRING, "musicbrainz-sortname" },
+	/* RB_METADATA_FIELD_ARTIST_SORTNAME */         { G_TYPE_STRING, "musicbrainz-sortname" },
 
 };
 

Modified: trunk/metadata/rb-metadata-gst.c
==============================================================================
--- trunk/metadata/rb-metadata-gst.c	(original)
+++ trunk/metadata/rb-metadata-gst.c	Sun Jan 20 06:17:29 2008
@@ -469,7 +469,7 @@
 	else if (!strcmp (tag, GST_TAG_MUSICBRAINZ_ALBUMARTISTID))
 		return RB_METADATA_FIELD_MUSICBRAINZ_ALBUMARTISTID;
 	else if (!strcmp (tag, GST_TAG_MUSICBRAINZ_SORTNAME))
-		return RB_METADATA_FIELD_MUSICBRAINZ_ARTISTSORTNAME;
+		return RB_METADATA_FIELD_ARTIST_SORTNAME;
 
 #endif
 	else
@@ -540,7 +540,7 @@
 		return GST_TAG_MUSICBRAINZ_ALBUMID;
 	case RB_METADATA_FIELD_MUSICBRAINZ_ALBUMARTISTID:
 		return GST_TAG_MUSICBRAINZ_ALBUMARTISTID;
-	case RB_METADATA_FIELD_MUSICBRAINZ_ARTISTSORTNAME:
+	case RB_METADATA_FIELD_ARTIST_SORTNAME:
 		return GST_TAG_MUSICBRAINZ_SORTNAME;
 #endif
 	default:

Modified: trunk/metadata/rb-metadata.h
==============================================================================
--- trunk/metadata/rb-metadata.h	(original)
+++ trunk/metadata/rb-metadata.h	Sun Jan 20 06:17:29 2008
@@ -60,7 +60,7 @@
 	RB_METADATA_FIELD_MUSICBRAINZ_ARTISTID,    /* string */
 	RB_METADATA_FIELD_MUSICBRAINZ_ALBUMID,     /* string */
 	RB_METADATA_FIELD_MUSICBRAINZ_ALBUMARTISTID,   /* string */
-	RB_METADATA_FIELD_MUSICBRAINZ_ARTISTSORTNAME,  /* string */
+	RB_METADATA_FIELD_ARTIST_SORTNAME,         /* string */
 
 	RB_METADATA_FIELD_LAST			   /* nothing */
 } RBMetaDataField;

Modified: trunk/plugins/audiocd/rb-audiocd-source.c
==============================================================================
--- trunk/plugins/audiocd/rb-audiocd-source.c	(original)
+++ trunk/plugins/audiocd/rb-audiocd-source.c	Sun Jan 20 06:17:29 2008
@@ -558,7 +558,7 @@
 		rb_debug ("musicbrainz_artistid: %s", track->artist_id);
 		rb_debug ("musicbrainz_albumid: %s", album->album_id);
 		rb_debug ("musicbrainz_albumartistid: %s", album->artist_id);
-		rb_debug ("musicbrainz_sortname: %s", album->artist_sortname);
+		rb_debug ("album sortname: %s", album->artist_sortname);
 
 		/* record track info in entry*/
 		entry_set_string_prop (db, entry, TRUE, RHYTHMDB_PROP_TITLE, track->title);
@@ -569,7 +569,7 @@
 		entry_set_string_prop (db, entry, TRUE, RHYTHMDB_PROP_MUSICBRAINZ_ARTISTID, track->artist_id);
 		entry_set_string_prop (db, entry, TRUE, RHYTHMDB_PROP_MUSICBRAINZ_ALBUMID, album->album_id);
 		entry_set_string_prop (db, entry, TRUE, RHYTHMDB_PROP_MUSICBRAINZ_ALBUMARTISTID, album->artist_id);
-		entry_set_string_prop (db, entry, TRUE, RHYTHMDB_PROP_MUSICBRAINZ_ARTISTSORTNAME, album->artist_sortname);
+		entry_set_string_prop (db, entry, TRUE, RHYTHMDB_PROP_ARTIST_SORTNAME, album->artist_sortname);
 
 		g_value_init (&value, G_TYPE_ULONG);
 		g_value_set_ulong (&value, track->duration);

Modified: trunk/rhythmdb/rhythmdb-private.h
==============================================================================
--- trunk/rhythmdb/rhythmdb-private.h	(original)
+++ trunk/rhythmdb/rhythmdb-private.h	Sun Jan 20 06:17:29 2008
@@ -86,7 +86,7 @@
 	RBRefString *musicbrainz_artistid;
 	RBRefString *musicbrainz_albumid;
 	RBRefString *musicbrainz_albumartistid;
-	RBRefString *musicbrainz_artistsortname;
+	RBRefString *artist_sortname;
 	gulong tracknum;
 	gulong discnum;
 	gulong duration;

Modified: trunk/rhythmdb/rhythmdb-tree.c
==============================================================================
--- trunk/rhythmdb/rhythmdb-tree.c	(original)
+++ trunk/rhythmdb/rhythmdb-tree.c	Sun Jan 20 06:17:29 2008
@@ -925,8 +925,8 @@
 		case RHYTHMDB_PROP_MUSICBRAINZ_ALBUMARTISTID:
 			save_entry_string(ctx, elt_name, rb_refstring_get (entry->musicbrainz_albumartistid));
 			break;
-		case RHYTHMDB_PROP_MUSICBRAINZ_ARTISTSORTNAME:
-			save_entry_string(ctx, elt_name, rb_refstring_get (entry->musicbrainz_artistsortname));
+		case RHYTHMDB_PROP_ARTIST_SORTNAME:
+			save_entry_string(ctx, elt_name, rb_refstring_get (entry->artist_sortname));
 			break;
 		case RHYTHMDB_PROP_TRACK_NUMBER:
 			save_entry_ulong (ctx, elt_name, entry->tracknum, FALSE);

Modified: trunk/rhythmdb/rhythmdb.c
==============================================================================
--- trunk/rhythmdb/rhythmdb.c	(original)
+++ trunk/rhythmdb/rhythmdb.c	Sun Jan 20 06:17:29 2008
@@ -391,8 +391,8 @@
 	case RHYTHMDB_PROP_MUSICBRAINZ_ALBUMARTISTID:
 		*field = RB_METADATA_FIELD_MUSICBRAINZ_ALBUMARTISTID;
 		return TRUE;
-	case RHYTHMDB_PROP_MUSICBRAINZ_ARTISTSORTNAME:
-		*field = RB_METADATA_FIELD_MUSICBRAINZ_ARTISTSORTNAME;
+	case RHYTHMDB_PROP_ARTIST_SORTNAME:
+		*field = RB_METADATA_FIELD_ARTIST_SORTNAME;
 		return TRUE;
 	default:
 		return FALSE;
@@ -1218,7 +1218,7 @@
 	ret->musicbrainz_artistid = rb_refstring_ref (db->priv->empty_string);
 	ret->musicbrainz_albumid = rb_refstring_ref (db->priv->empty_string);
 	ret->musicbrainz_albumartistid = rb_refstring_ref (db->priv->empty_string);
-	ret->musicbrainz_artistsortname = rb_refstring_ref (db->priv->empty_string);
+	ret->artist_sortname = rb_refstring_ref (db->priv->empty_string);
 	ret->mimetype = rb_refstring_ref (db->priv->octet_stream_str);
 
 	ret->flags |= RHYTHMDB_ENTRY_LAST_PLAYED_DIRTY |
@@ -1397,7 +1397,7 @@
 	rb_refstring_unref (entry->musicbrainz_artistid);
 	rb_refstring_unref (entry->musicbrainz_albumid);
 	rb_refstring_unref (entry->musicbrainz_albumartistid);
-	rb_refstring_unref (entry->musicbrainz_artistsortname);
+	rb_refstring_unref (entry->artist_sortname);
 	rb_refstring_unref (entry->mimetype);
 
 	g_free (entry);
@@ -1577,12 +1577,12 @@
 		g_value_unset (&val);
 	}
 
-	/* musicbrainz artistsortname */
+	/* artist sortname */
 	if (rb_metadata_get (metadata,
-			     RB_METADATA_FIELD_MUSICBRAINZ_ARTISTSORTNAME,
+			     RB_METADATA_FIELD_ARTIST_SORTNAME,
 			     &val)) {
 		rhythmdb_entry_set_internal (db, entry, TRUE,
-					     RHYTHMDB_PROP_MUSICBRAINZ_ARTISTSORTNAME, &val);
+					     RHYTHMDB_PROP_ARTIST_SORTNAME, &val);
 		g_value_unset (&val);
 	}
 
@@ -3052,9 +3052,9 @@
 			rb_refstring_unref (entry->musicbrainz_albumartistid);
 			entry->musicbrainz_albumartistid = rb_refstring_new (g_value_get_string (value));
 			break;
-		case RHYTHMDB_PROP_MUSICBRAINZ_ARTISTSORTNAME:
-			rb_refstring_unref (entry->musicbrainz_artistsortname);
-			entry->musicbrainz_artistsortname = rb_refstring_new (g_value_get_string (value));
+		case RHYTHMDB_PROP_ARTIST_SORTNAME:
+			rb_refstring_unref (entry->artist_sortname);
+			entry->artist_sortname = rb_refstring_new (g_value_get_string (value));
 			break;
 		case RHYTHMDB_PROP_HIDDEN:
 			if (g_value_get_boolean (value)) {
@@ -3809,7 +3809,7 @@
 			ENUM_ENTRY (RHYTHMDB_PROP_MUSICBRAINZ_ARTISTID, "Musicbrainz Artist ID (gchararray) [mb-artistid]"),
 			ENUM_ENTRY (RHYTHMDB_PROP_MUSICBRAINZ_ALBUMID, "Musicbrainz Album ID (gchararray) [mb-albumid]"),
 			ENUM_ENTRY (RHYTHMDB_PROP_MUSICBRAINZ_ALBUMARTISTID, "Musicbrainz Album Artist ID (gchararray) [mb-albumartistid]"),
-			ENUM_ENTRY (RHYTHMDB_PROP_MUSICBRAINZ_ARTISTSORTNAME, "Musicbrainz Artist Sortname (gchararray) [mb-artistsortname]"),
+			ENUM_ENTRY (RHYTHMDB_PROP_ARTIST_SORTNAME, "Artist Sortname (gchararray) [mb-artistsortname]"),
 
 			ENUM_ENTRY (RHYTHMDB_PROP_DURATION, "Duration (gulong) [duration]"),
 			ENUM_ENTRY (RHYTHMDB_PROP_FILE_SIZE, "File Size (guint64) [file-size]"),
@@ -4561,8 +4561,8 @@
 		return rb_refstring_get (entry->musicbrainz_albumid);
 	case RHYTHMDB_PROP_MUSICBRAINZ_ALBUMARTISTID:
 		return rb_refstring_get (entry->musicbrainz_albumartistid);
-	case RHYTHMDB_PROP_MUSICBRAINZ_ARTISTSORTNAME:
-		return rb_refstring_get (entry->musicbrainz_artistsortname);
+	case RHYTHMDB_PROP_ARTIST_SORTNAME:
+		return rb_refstring_get (entry->artist_sortname);
 	case RHYTHMDB_PROP_MIMETYPE:
 		return rb_refstring_get (entry->mimetype);
 	case RHYTHMDB_PROP_TITLE_SORT_KEY:
@@ -4664,8 +4664,8 @@
 		return rb_refstring_ref (entry->musicbrainz_albumid);
 	case RHYTHMDB_PROP_MUSICBRAINZ_ALBUMARTISTID:
 		return rb_refstring_ref (entry->musicbrainz_albumartistid);
-	case RHYTHMDB_PROP_MUSICBRAINZ_ARTISTSORTNAME:
-		return rb_refstring_ref (entry->musicbrainz_artistsortname);
+	case RHYTHMDB_PROP_ARTIST_SORTNAME:
+		return rb_refstring_ref (entry->artist_sortname);
 	case RHYTHMDB_PROP_MIMETYPE:
 		return rb_refstring_ref (entry->mimetype);
 	case RHYTHMDB_PROP_MOUNTPOINT:

Modified: trunk/rhythmdb/rhythmdb.h
==============================================================================
--- trunk/rhythmdb/rhythmdb.h	(original)
+++ trunk/rhythmdb/rhythmdb.h	Sun Jan 20 06:17:29 2008
@@ -202,7 +202,7 @@
 	RHYTHMDB_PROP_MUSICBRAINZ_ARTISTID,
 	RHYTHMDB_PROP_MUSICBRAINZ_ALBUMID,
 	RHYTHMDB_PROP_MUSICBRAINZ_ALBUMARTISTID,
-	RHYTHMDB_PROP_MUSICBRAINZ_ARTISTSORTNAME,
+	RHYTHMDB_PROP_ARTIST_SORTNAME,
 
 	RHYTHMDB_NUM_PROPERTIES
 } RhythmDBPropType;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]