Could you add YouTube shortlink (http://youtu.be/...) support to hook emvideo_PROVIDER_extract?

Comments

ihateie’s picture

Version: 6.x-1.x-dev » 6.x-1.3

+1
subscribing

cappadona’s picture

subscribe

Alexander Goncharov’s picture

Version: 6.x-1.3 » 6.x-1.x-dev
Anonymous’s picture

+1

Anonymous’s picture

+1

hexblot’s picture

Needed this for a site I have with embedded video, it's really simple to add --
Edit the file /media_youtube/providers/emvideo/youtube.inc

Find function emvideo_youtube_extract ( line 174 in my version )

and change the return array from

  return array(
    '@youtube\.com/v/([^"\&\? ]+)@i',
    '@youtube\.com/watch\?v=([^"\& ]+)@i',
    '@youtube\.com/\?v=([^"\& ]+)@i',
  );

to

  return array(
    '@youtube\.com/v/([^"\&\? ]+)@i',
    '@youtube\.com/watch\?v=([^"\& ]+)@i',
    '@youtube\.com/\?v=([^"\& ]+)@i',
    '@youtu\.be/([^"\&\? ]+)@i',
  );

In my case, I didn't even need to clear caches, worked like a charm :) Don't know if you need to update other locations for other types of functionality offered by the module though.

rv0’s picture

@hexblot

thanks, your patch fixed it for me :)

Anonymous’s picture

Priority: Major » Critical
Status: Active » Patch (to be ported)

for me too. Patch to be ported

aaron’s picture

Status: Patch (to be ported) » Fixed

this has been fixed in the dev version for some time.

Automatically closed -- issue fixed for 2 weeks with no activity.