Index: media.theme.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/media/media.theme.inc,v
retrieving revision 1.12
diff -u -p -r1.12 media.theme.inc
--- media.theme.inc	19 Aug 2010 21:45:13 -0000	1.12
+++ media.theme.inc	16 Sep 2010 23:29:12 -0000
@@ -288,8 +288,8 @@ function theme_media_thumbnail($variable
   $options = array('query' => $destination, 'html' => true, 'attributes' => array('title' => t('Click to edit details')));
 
   // Element should be a field renderable array... This is a little wonky - admitted.
-  if (!empty($element['#show_names']) && $element['#object']->filename) {
-    $label = '<div class="label-wrapper"><label class="media-filename">' . $element['#object']->filename . '</label></div>';
+  if (!empty($element['#show_names']) && $element['#name']) {
+    $label = '<div class="label-wrapper"><label class="media-filename">' . $element['#name'] . '</label></div>';
   }
 
   // How can I attach CSS here?
@@ -307,6 +307,13 @@ function theme_media_thumbnail($variable
   return $output;
 }
 
+function media_preprocess_media_thumbnail(&$variables) {
+  // Set the name for the thumbnail to be the filename.  This is done here so
+  // that other modules can hijack the name displayed if it should not be the
+  // filename.
+  $variables['element']['#name'] = empty($variables['element']['#object']->filename) ? 'Filename' : $variables['element']['#object']->filename;
+}
+
 /**
  * Field formatter for displaying a file as a large icon.
  */
