Embedded Media Import Roadmap

Share this

So I had a dream last night. About Drupal, as I often do. I envisioned a way to make Embedded Media Import, which is bundled with Embedded Media Field, far more useful than it currently is. And I don't think it'll be too difficult to implement either.

I plan to work on this at DrupalCon, if anyone's interested. Alex Urevick-Ackelsberg and I plan to do some work towards updating the module to Drupal 6 at that time anyway.

emImport currently works by pasting the URL of a playlist, currently only from Flickr, but easy enough to implement for other providers such as YouTube, into a text field. You are then presented with a screen of captured media, with checkboxes, to import them as nodes, complete with titles, descriptions, media, and tags.

The next step is to allow this to automatically aggregrate playlists. In my dream, it was a new module, which I dubbed Embedded Media Aggregrator. However, after thinking about it this morning, I think it would be better to simply integrate that into emImport. In either case, the functionality would simply be built on top of what's already there.

Following is my envisioned workflow from the editor's perspective...

  • The editor will browse to Import Media > Aggregrate (at /emimport/aggregrate).
  • They'll paste the URL of a playlist and submit.
  • On the next screen, they'll have a sample of retrieved media, with options, including whether to store titles/descriptions/tags with imported media. Also perhaps an optional time limit of when to stop importing.
  • They'll make any changes and submit this.
  • Immediately, all active media will be imported as nodes, in the same fashion as currently happens with emImport.
  • On a periodic cron, the playlist will be checked again, Any duplicates (based on provider/value) will be ignored, but anything new will be imported as a new node.
  • This happens either indefinitely, or until a specified date, or until the editor turns off that playlist aggregration.
  • As currently, imported media are stored as nodes, that may be used for views, front page promotion, or whatever.

To make this happen: as a bonus, I'll add an 'Allow duplicates' checkbox with emField, as I'll need to write that code anyway for emAggregrator. This will run a quick query against provider/value when submitting a new node, and give a validation error if that media already exists (for that field/node type combo).

The rest of the code is already there. However, I should make the form for aggregration smarter, including the specific node add form, so the editor can set any other desired options, such as promoting a post or specifying the node creator.

Look for this soon! I'll probably work on it at DrupalCon, if you want to be part of some impromptu brainstorm/coding session...


bmann's picture

Feed API!

I really think that this aggregation to Embedded Media Field is fantastic. However, when you start talking aggregation, I would hope that you integrate / work directly with Feed API.

In fact, the way I envision this happening is with the Feed Element Mapper. You can have some presets in Embedded Media Field (or some helper aggregator / parser module) that would assist in mapping e.g. Flickr fields to local fields.

I'd love to talk this through at Drupalcon, and I bet the guys at Development Seed would, too.

aaron's picture

Great Idea!

I agree! Serendipitously, I just installed Feed API on a client site about the same time you wrote this comment. I hadn't seen it before, and am super-impressed. I'm examining it now for hooks (its hooks don't seem to be well-documented, so I'm just scanning the code for module_invoke) to see how I can best hook into its functionality for Embedded Media Import.


The Society for Venturism has chosen me as the recipient of its charity for this year, to hopefully offer me cryonic preservation when the time comes. And this month, Longecity, an excellent forum for the discussion of issues related to extending the lifespan of humans, has offered up a matching grant of up to a thousand dollars to help out! So help out! Please.