Index: xmlrpc.php
===================================================================
--- xmlrpc.php	(revision 8954)
+++ xmlrpc.php	(working copy)
@@ -2170,7 +2170,22 @@
 		// Handle enclosures
 		$enclosure = $content_struct['enclosure'];
 		if( is_array( $enclosure ) && isset( $enclosure['url'] ) && isset( $enclosure['length'] ) && isset( $enclosure['type'] ) ) {
-			add_post_meta( $post_ID, 'enclosure', $enclosure['url'] . "\n" . $enclosure['length'] . "\n" . $enclosure['type'] );
+		
+			$encstring = $enclosure['url'] . "\n" . $enclosure['length'] . "\n" . $enclosure['type'];
+			$found = false;
+			foreach ( (array) get_post_custom($post_ID) as $key => $val) {
+				if ($key == 'enclosure') {
+					foreach ( (array) $val as $enc ) {
+						if ($enc == $encstring) {
+							$found = true;
+							break 2;
+						}
+					}
+				}
+			}
+			if (!found) {
+				add_post_meta( $post_ID, 'enclosure', $encstring );
+			}
 		}
 
 		$this->attach_uploads( $post_ID, $post_content );
@@ -2453,7 +2468,22 @@
 		// Handle enclosures
 		$enclosure = $content_struct['enclosure'];
 		if( is_array( $enclosure ) && isset( $enclosure['url'] ) && isset( $enclosure['length'] ) && isset( $enclosure['type'] ) ) {
-			add_post_meta( $post_ID, 'enclosure', $enclosure['url'] . "\n" . $enclosure['length'] . "\n" . $enclosure['type'] );
+		
+			$encstring = $enclosure['url'] . "\n" . $enclosure['length'] . "\n" . $enclosure['type'];
+			$found = false;
+			foreach ( (array) get_post_custom($post_ID) as $key => $val) {
+				if ($key == 'enclosure') {
+					foreach ( (array) $val as $enc ) {
+						if ($enc == $encstring) {
+							$found = true;
+							break 2;
+						}
+					}
+				}
+			}
+			if (!found) {
+				add_post_meta( $post_ID, 'enclosure', $encstring );
+			}
 		}
 
 		$this->attach_uploads( $ID, $post_content );
