I'm writing a plugin for embedding videos from the BBC news site.

The only thing I can feasibly use as the unique item ID (ie what's stored in the 'value' column) is the full URL of the playlist that their embed code uses, eg http://playlists.bbc.co.uk/news/technology-11965864A/playlist.sxml

This works fine with thumbnails file saving, as the filename has slashes transformed to hyphens.

However, this doesn't work with the thumbnail -> video replacement display output. This is because the path at emvideo/modal/%node, handled by emvideo_modal(), only allows for one piece after a slash, rather than any number.

Changing my own module to store the ID run through urlencode() appeared to cause problems with double-encoding further down the line; storing the ID with hyphens for slashes works too but I have doubts as to the soundness of this, should any BBC IDs contain actual hyphens.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

joachim’s picture

Status: Active » Needs review
FileSize
1.54 KB

Here's a patch which changes emvideo_modal() to allow any number of arguments to be imploded back together as an ID containing slashes.

ZeiP’s picture

I had the same issue using emfield-6.x-2.5 and media_video_flotsam-6.x-1.2 (provider zzz_custom_url), fixed it with the patch on comment #1 and by adding a call to url() function. Patch attached.

lieb’s picture

This patch worked for me trying to get a video provider I wrote working. I hope it gets included in the next update.