[brasero] Don't reset checksums for images and media as they won't change



commit c6186c72ed1421d2308bf2e1c1bea38fab274d7a
Author: Philippe Rouquier <bonfire-app wanadoo fr>
Date:   Mon Sep 7 15:54:41 2009 +0200

    Don't reset checksums for images and media as they won't change

 libbrasero-burn/brasero-burn.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/libbrasero-burn/brasero-burn.c b/libbrasero-burn/brasero-burn.c
index 1c836e8..f6a7587 100644
--- a/libbrasero-burn/brasero-burn.c
+++ b/libbrasero-burn/brasero-burn.c
@@ -2131,19 +2131,23 @@ static void
 brasero_burn_unset_checksums (BraseroBurn *self)
 {
 	GSList *tracks;
+	BraseroTrackType *type;
 	BraseroBurnPrivate *priv;
 
 	priv = BRASERO_BURN_PRIVATE (self);
 
 	tracks = brasero_burn_session_get_tracks (priv->session);
+	type = brasero_track_type_new ();
 	for (; tracks; tracks = tracks->next) {
 		BraseroTrack *track;
 
-		/* unset checksum (might depend from copy to another). */
 		track = tracks->data;
-		brasero_track_set_checksum (track,
-					    BRASERO_CHECKSUM_NONE,
-					    NULL);
+		brasero_track_get_track_type (track, type);
+		if (!brasero_track_type_get_has_image (type)
+		&& !brasero_track_type_get_has_medium (type))
+			brasero_track_set_checksum (track,
+						    BRASERO_CHECKSUM_NONE,
+						    NULL);
 	}
 }
 



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