Drupal aggregating multiple files from enclosures

From Transmission
Jump to: navigation, search

Contents

Aggregating and displaying Multiple files from RSS into Drupal

This possibility depends on a patch by ekes Media_Enclosure_parser_patch

What the patch will do is to go through the feed and create an array of information that it thinks will be useful. It will then store that data in the Embedded Media Field, as a Custom URL.

The kind of information that it will look for is

  • Enclosed media file (mp4, avi, etc)
  • Metadata in the enclosures, video length, file size, dimensions, codec


This information is contained in a sample feed below

Engage media field rss 2.png

When this data is put into Drupals database it looks like this

Enclosure elements mapped.png

Here's a close up of that. As Techies would say, it parses the enclosure infomration as a serialised array.

Enclosure elements mapped part.png

Displaying Multiple items in feeds

What happens if you allow multiple items for a Video type and there are more than one media items stored in the array you've stored in the database.

To do basic test of this we would change the number of items allowed in the Embed Media Field you've created to map the content to

Go to manage the settings for your Embed Media Field


Video emfield settings.png

At the bottom of the page under Global settings change the setting to unlimited.

Video emfield settings2.png

Video emfield settings3.png

If you save this then and you go back to the default view of the your video content type, then if there are multiple versions of the video file data in the Embed Media Field arrays then you'll see them all. In the case below there are two streaming versions of the video.

Video emfield settings4.png

This is because the database has two version on there.

Video emfield settings5.png


Theming output from Embeded Media Field

To avoid the random multiple output of these different version you'll need to 'theme' the output of the Embedded Media Field.

A common case

other info

In order to store as much use useful data as possible add patch embedded_video_zz_custom_url, which adds more understanding of mime types to the Custom URL provider.

Personal tools