Index: media.browser.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/media/media.browser.inc,v
retrieving revision 1.22
diff -u -p -r1.22 media.browser.inc
--- media.browser.inc	26 Oct 2010 20:22:57 -0000	1.22
+++ media.browser.inc	26 Oct 2010 21:56:57 -0000
@@ -359,7 +359,7 @@ function media_include_browser_js() {
 
     // Adding src to blacklist; fid and view_mode we capture outside attribs so adding
     // them too to the blacklist.
-    'blacklist' => array('src','fid','view_mode'), // Only applies to WYSIWG - should be removed;
+    'blacklist' => array('src','fid','view_mode','format'), // Only applies to WYSIWG - should be removed;
   );
 
   drupal_add_js(array('media' => $settings), 'setting');
Index: media.filter.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/media/media.filter.inc,v
retrieving revision 1.11
diff -u -p -r1.11 media.filter.inc
--- media.filter.inc	5 Aug 2010 16:12:41 -0000	1.11
+++ media.filter.inc	26 Oct 2010 21:56:58 -0000
@@ -221,7 +221,8 @@ function _media_generate_tagMap($text) {
   preg_match_all("/\[\[.*?]]/s", $text, $matches, PREG_SET_ORDER);
   foreach($matches as $match) {
     // We see if tagContent is already in $tagMap, if not we add it
-    // to $tagmap otherwise return a empty error
+    // to $tagmap.  If we return an empty array, we break embeddings of the same
+    // media multiple times.
     if(empty($tagmap[$match[0]])) {
       // @TODO: Total HACK, but better than nothing.
       // We should find a better way of cleaning this up.
@@ -231,9 +232,6 @@ function _media_generate_tagMap($text) {
         $tagmap[$match[0]] = '<div><img src="/broken.jpg" height="50px" width="100px"/></div>';
       }
     }
-    else {
-      return array();
-    }
   }
   return $tagmap;
 }
Index: media.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/media/media.module,v
retrieving revision 1.55
diff -u -p -r1.55 media.module
--- media.module	20 Oct 2010 14:48:22 -0000	1.55
+++ media.module	26 Oct 2010 21:56:58 -0000
@@ -591,6 +591,15 @@ function media_access($op) {
 }
 
 /**
+ * Implements hook_file_download_access().
+ */
+function media_file_download_access($field, $entity_type, $entity) {
+  if ($entity_type == 'media') {
+    return media_access('view');
+  }
+}
+
+/**
  * Returns the type of the media file to be used as a page title.
  */
 function media_type_page_title($type) {
Index: media.theme.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/media/media.theme.inc,v
retrieving revision 1.13
diff -u -p -r1.13 media.theme.inc
--- media.theme.inc	18 Sep 2010 00:06:48 -0000	1.13
+++ media.theme.inc	26 Oct 2010 21:56:58 -0000
@@ -275,7 +275,6 @@ function theme_media_link($variables) {
 function theme_media_thumbnail($variables) {
   $label = '';
   $element = $variables['element'];
-  $icon = theme('media_type_icon', array('type' => $element['#object']->type));
   $destination = drupal_get_destination();
 
   // Wrappers to go around the thumbnail
@@ -322,4 +321,4 @@ function theme_media_formatter_large_ico
   $icon_dir = media_variable_get('icon_base_directory') . '/' . media_variable_get('icon_set');
   $icon = file_icon_path((object)$file, $icon_dir);
   return theme('image', array('path' => $icon));
-}
\ No newline at end of file
+}
Index: javascript/media-format-form.js
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/media/javascript/media-format-form.js,v
retrieving revision 1.5
diff -u -p -r1.5 media-format-form.js
--- javascript/media-format-form.js	7 Sep 2010 19:16:42 -0000	1.5
+++ javascript/media-format-form.js	26 Oct 2010 21:57:05 -0000
@@ -18,6 +18,10 @@ Drupal.behaviors.mediaFormatForm = {
     // IFRAME. See Drupal.media.browser.validateButtons() for more details.
     $('<a class="button fake-ok">Submit</a>').appendTo($('#media-format-form')).bind('click', Drupal.media.formatForm.submit);
     $('<a class="button fake-cancel">Cancel</a>').appendTo($('#media-format-form')).bind('click', Drupal.media.formatForm.submit);
+
+    if (Drupal.settings.media_format_form.autosubmit) {
+      $('.button.fake-ok').click();
+    }
   }
 };
 
