--- old-stuff/sources/rb-audiocd-source.c	2005-12-29 00:47:25.000000000 +1000
+++ new-stuff/sources/rb-audiocd-source.c	2005-12-29 00:47:25.000000000 +1000
@@ -380,12 +380,11 @@ metadata_cb (SjMetadata *metadata, GList
 
 		g_object_set (G_OBJECT (source), "name", album->title, NULL);
 
-		while (album->tracks) {
+		while (album->tracks && cd_track) {
 			TrackDetails *track = (TrackDetails*)album->tracks->data;
 			RhythmDBEntry *entry = cd_track->data;
 			GValue value = {0, };
 
-			g_assert (cd_track != NULL);
 			/* record track info in entry*/
 			entry_set_string_prop (db, entry, TRUE, RHYTHMDB_PROP_TITLE, track->title);
 			entry_set_string_prop (db, entry, TRUE, RHYTHMDB_PROP_ARTIST, track->artist);
@@ -404,7 +403,21 @@ metadata_cb (SjMetadata *metadata, GList
 			cd_track = g_list_next (cd_track);
 		}
 
-		g_assert (cd_track == NULL);
+		while (cd_track) {
+			/* We don't have any metadata for this track, so just use album info and
+			 * set the track to 'unknown'.  Duration is already set in 
+			 * rb_audiocd_create_track_entry.
+			 */
+			RhythmDBEntry *entry = cd_track->data;
+			entry_set_string_prop (db, entry, TRUE, RHYTHMDB_PROP_TITLE, _("Unknown"));
+			entry_set_string_prop (db, entry, TRUE, RHYTHMDB_PROP_ARTIST, album->artist);
+			entry_set_string_prop (db, entry, TRUE, RHYTHMDB_PROP_ALBUM, album->title);
+			entry_set_string_prop (db, entry, TRUE, RHYTHMDB_PROP_GENRE, album->genre);
+			rhythmdb_commit (db);
+
+			cd_track = g_list_next (cd_track);
+		}
+
 		/*albums = g_list_next (albums);
 	}*/
 

