? eparser.namespace.media.patch
Index: feedapi_eparser.plugins.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/feedapi_eparser/feedapi_eparser.plugins.inc,v
retrieving revision 1.40
diff -u -p -r1.40 feedapi_eparser.plugins.inc
--- feedapi_eparser.plugins.inc	2 Sep 2009 22:58:55 -0000	1.40
+++ feedapi_eparser.plugins.inc	8 Apr 2010 01:44:44 -0000
@@ -218,6 +218,16 @@ function feedapi_eparser_eparse_namespac
       ),
       'path' => $base_path,
     ),
+    'media' => array(
+      'url' => 'http://search.yahoo.com/mrss/',
+      'name' => 'Media RSS',
+      'description' => "Media RSS content.",
+      'handler' =>  array(
+        'class' => 'FeedapiEparserNamespaceMedia',
+        'parent' => 'base',
+      ),
+      'path' => $base_path,
+    ),
   );
 }
 
Index: plugins/FeedapiEparserNamespaceMedia.class.php
===================================================================
RCS file: plugins/FeedapiEparserNamespaceMedia.class.php
diff -N plugins/FeedapiEparserNamespaceMedia.class.php
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ plugins/FeedapiEparserNamespaceMedia.class.php	8 Apr 2010 01:44:44 -0000
@@ -0,0 +1,38 @@
+<?php
+// $Id$
+/**
+ * @file
+ * Parse content from the Yahoo Media RSS namespace.
+ */
+
+class FeedapiEparserNamespaceMedia extends FeedapiEparserNamespacePlugin {
+  function parseGlobal($global_context) {
+  }
+
+  function parseItem(&$source_item, &$item) {
+    $content = $source_item->children('http://search.yahoo.com/mrss/');
+    $item->media = $this->convertStrings(array(
+      'content' => array(
+        'player',
+        'credit',
+        'thumbnail',
+        'title',
+        'category',
+      ),
+    ), $content);
+    
+    $attributes = $content->content->player->attributes();
+    $item->media->content->player = $this->convertStrings(array(
+      'url',
+    ), $attributes);
+    
+    $attributes = $content->content->thumbnail->attributes();
+    $item->media->content->thumbnail = $this->convertStrings(array(
+      'height',
+      'width',
+      'url',
+    ), $attributes);
+  
+    $item->media->keywords = explode(',', $item->media->category);
+  }
+}
