(self, entry)
return entry
Add additional fields to an RSS item.

        :param feed: The RSS item XML element to use.
Add additional fields to an RSS item.
Add additional fields to an RSS item .
def extend_atom(self, entry):
        '''Add additional fields to an RSS item.

        :param feed: The RSS item XML element to use.
        '''

        groups = {None: entry}
        for media_content in self.__media_content:
            # Define current media:group
            group = groups.get(media_content.get('group'))
            if group is None:
                group = xml_elem('{%s}group' % MEDIA_NS, entry)
                groups[media_content.get('group')] = group
            # Add content
            content = xml_elem('{%s}content' % MEDIA_NS, group)
            for attr in ('url', 'fileSize', 'type', 'medium', 'isDefault',
                         'expression', 'bitrate', 'framerate', 'samplingrate',
                         'channels', 'duration', 'height', 'width', 'lang'):
                if media_content.get(attr):
                    content.set(attr, media_content[attr])

        for media_thumbnail in self.__media_thumbnail:
            # Define current media:group
            group = groups.get(media_thumbnail.get('group'))
            if group is None:
                group = xml_elem('{%s}group' % MEDIA_NS, entry)
                groups[media_thumbnail.get('group')] = group
            # Add thumbnails
            thumbnail = xml_elem('{%s}thumbnail' % MEDIA_NS, group)
            for attr in ('url', 'height', 'width', 'time'):
                if media_thumbnail.get(attr):
                    thumbnail.set(attr, media_thumbnail[attr])

        return entry
def extend_atom ( self , entry ) : groups = { None : entry } for media_content in self . __media_content : # Define current media:group group = groups . get ( media_content . get ( 'group' ) ) if group is None : group = xml_elem ( '{%s}group' % MEDIA_NS , entry ) groups [ media_content . get ( 'group' ) ] = group # Add content content = xml_elem ( '{%s}content' % MEDIA_NS , group ) for attr in ( 'url' , 'fileSize' , 'type' , 'medium' , 'isDefault' , 'expression' , 'bitrate' , 'framerate' , 'samplingrate' , 'channels' , 'duration' , 'height' , 'width' , 'lang' ) : if media_content . get ( attr ) : content . set ( attr , media_content [ attr ] ) for media_thumbnail in self . __media_thumbnail : # Define current media:group group = groups . get ( media_thumbnail . get ( 'group' ) ) if group is None : group = xml_elem ( '{%s}group' % MEDIA_NS , entry ) groups [ media_thumbnail . get ( 'group' ) ] = group # Add thumbnails thumbnail = xml_elem ( '{%s}thumbnail' % MEDIA_NS , group ) for attr in ( 'url' , 'height' , 'width' , 'time' ) : if media_thumbnail . get ( attr ) : thumbnail . set ( attr , media_thumbnail [ attr ] ) return entry