[brasero] When loading an audio/video project keep the already existing values for artist, title



commit d272c0fd9a69f0c27b740c8b0af2e02ccffcca6b
Author: Philippe Rouquier <bonfire-app wanadoo fr>
Date:   Fri Sep 4 13:12:15 2009 +0200

    When loading an audio/video project keep the already existing values for artist, title

 libbrasero-burn/brasero-track-stream-cfg.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/libbrasero-burn/brasero-track-stream-cfg.c b/libbrasero-burn/brasero-track-stream-cfg.c
index f405daa..71a215b 100644
--- a/libbrasero-burn/brasero-track-stream-cfg.c
+++ b/libbrasero-burn/brasero-track-stream-cfg.c
@@ -229,19 +229,23 @@ brasero_track_stream_cfg_results_cb (GObject *obj,
 	}
 
 	/* Get the song info */
-	if (g_file_info_get_attribute_string (info, BRASERO_IO_TITLE))
+	if (g_file_info_get_attribute_string (info, BRASERO_IO_TITLE)
+	&& !brasero_track_tag_lookup_string (BRASERO_TRACK (obj), BRASERO_TRACK_STREAM_TITLE_TAG))
 		brasero_track_tag_add_string (BRASERO_TRACK (obj),
 					      BRASERO_TRACK_STREAM_TITLE_TAG,
 					      g_file_info_get_attribute_string (info, BRASERO_IO_TITLE));
-	if (g_file_info_get_attribute_string (info, BRASERO_IO_ARTIST))
+	if (g_file_info_get_attribute_string (info, BRASERO_IO_ARTIST)
+	&& !brasero_track_tag_lookup_string (BRASERO_TRACK (obj), BRASERO_TRACK_STREAM_ARTIST_TAG))
 		brasero_track_tag_add_string (BRASERO_TRACK (obj),
 					      BRASERO_TRACK_STREAM_ARTIST_TAG,
 					      g_file_info_get_attribute_string (info, BRASERO_IO_ARTIST));
-	if (g_file_info_get_attribute_string (info, BRASERO_IO_COMPOSER))
+	if (g_file_info_get_attribute_string (info, BRASERO_IO_COMPOSER)
+	&& !brasero_track_tag_lookup_string (BRASERO_TRACK (obj), BRASERO_TRACK_STREAM_COMPOSER_TAG))
 		brasero_track_tag_add_string (BRASERO_TRACK (obj),
 					      BRASERO_TRACK_STREAM_COMPOSER_TAG,
 					      g_file_info_get_attribute_string (info, BRASERO_IO_COMPOSER));
-	if (g_file_info_get_attribute_int32 (info, BRASERO_IO_ISRC))
+	if (g_file_info_get_attribute_int32 (info, BRASERO_IO_ISRC)
+	&& !brasero_track_tag_lookup_int (BRASERO_TRACK (obj), BRASERO_TRACK_STREAM_ISRC_TAG))
 		brasero_track_tag_add_int (BRASERO_TRACK (obj),
 					   BRASERO_TRACK_STREAM_ISRC_TAG,
 					   g_file_info_get_attribute_int32 (info, BRASERO_IO_ISRC));



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