Commits

Anonymous committed 5863271

Using description field to display channel informations/resolution. So the podcast title is more short

  • Participants
  • Parent commits 0d9e38e

Comments (0)

Files changed (3)

File podcaster/lib/podcast.py

 
 
 VideoFeed = collections.namedtuple('VideoFeed', 'id,guid,title,description,published,updated,duration')
-UserFeed = collections.namedtuple('UserFeed', 'username,title,videos')
+UserFeed = collections.namedtuple('UserFeed', 'username,title,description,videos')
 VideoDetails = collections.namedtuple('VideoDetails', 'id,urls')
 VideoFormat = collections.namedtuple('VideoFormat', 'id,description,extension,content_type,supported')
 
 
     with r.rss(version='2.0'):
         with r.channel:
-            r << r.title(u'%s (%s)' % (feed.title, format.description))
+            r << r.title(feed.title)
+            r << i.subtitle('%s (%s)' % (feed.description, format.description))
             for v in feed.videos:
                 with r.item:
                     r << r.title(v.title)

File podcaster/platforms/dailymotion/comp.py

             return None
 
         videos = []
-        feed_title = "Uploads by %s" % username
+        feed_title = username
+        feed_description = '%s on Dailymotion' % username
         for v in data['list']:
             id = v['id']
             title = v['title']
             description = v['description']
             videos.append(VideoFeed(id, guid, title, description, published, updated, duration))
 
-        return UserFeed(username, feed_title, videos)
+        return UserFeed(username, feed_title, feed_description, videos)
 
     def get_video_details(self, id):
         ress = restkit.Resource("https://api.dailymotion.com")

File podcaster/platforms/youtube/comp.py

         nsmedia = nsmap['media'] #Media namespace
 
         videos = []
-        feed_title = root.find('{%s}title' % ns).text
+        feed_title = username
+        feed_description = '%s on YouTube' % username
         for vtag in root.findall('{%s}entry' % ns):
             guid = vtag.find('{%s}id' % ns).text
             published = parse_date(vtag.find('{%s}published' % ns).text)
             duration = int(vtag.find('{%s}group/{%s}duration' % (nsmedia, nsyt)).get('seconds'))
             description = ''
             videos.append(VideoFeed(id, guid, title, description, published, updated, duration))
-        return UserFeed(username.lower(), feed_title, videos)
+        return UserFeed(username.lower(), feed_title, feed_description, videos)
 
     def get_video_details(self, id):
         """Returns the available video formats"""