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.
Comment | File | Size | Author |
---|---|---|---|
#2 | localvideofix-1006976-2.patch | 1.73 KB | ZeiP |
#1 | 1006976.emfield.multiple-slashes-id-modal.patch | 1.54 KB | joachim |
Comments
Comment #1
joachim CreditAttribution: joachim commentedHere's a patch which changes emvideo_modal() to allow any number of arguments to be imploded back together as an ID containing slashes.
Comment #2
ZeiP CreditAttribution: ZeiP commentedI 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.
Comment #3
lieb CreditAttribution: lieb commentedThis patch worked for me trying to get a video provider I wrote working. I hope it gets included in the next update.