Sophie

Sophie

distrib > Mageia > 3 > i586 > media > core-release-src > by-pkgid > 9a703561af36af9ceb58a5082c2f9eda > files > 2

python-planet-2.0-3.mga3.src.rpm

--- planet-2.0/planet/feedparser.py	2011-05-21 17:59:06.132158511 +0100
+++ planet-2.0/planet/feedparser.py	2011-05-24 15:17:34.481074951 +0100
@@ -865,6 +865,17 @@
         self.pop('image')
         self.inimage = 0
 
+    def _start_media_content(self, attrsD):
+        self.inimage = 1
+        self.push('image', 0)
+        context = self._getContext()
+        context.setdefault('image', FeedParserDict())
+        context['image']['link'] = attrsD.get('url','')
+
+    def _end_media_content(self):
+        self.pop('image')
+        self.inimage = 0
+
     def _start_textinput(self, attrsD):
         self.intextinput = 1
         self.push('textinput', 0)
@@ -1249,7 +1260,6 @@
     def _start_title(self, attrsD):
         self.pushContent('title', attrsD, 'text/plain', self.infeed or self.inentry or self.insource)
     _start_dc_title = _start_title
-    _start_media_title = _start_title
 
     def _end_title(self):
         value = self.popContent('title')
@@ -1259,7 +1269,14 @@
         elif self.inimage:
             context['image']['title'] = value
     _end_dc_title = _end_title
-    _end_media_title = _end_title
+
+    def _start_media_title(self, attrsD):
+        self.pushContent('media_title', attrsD, 'text/plain', False)
+
+    def _end_media_title(self):
+        value = self.popContent('media_title')
+	context = self._getContext()
+	context['image']['title'] = value
 
     def _start_description(self, attrsD):
         context = self._getContext()