Embedded Media Import Roadmap

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…