I have tracked the problem down to `_video_embed_youku_get_video_id` which is not returning an ID. The URL being passed in is `http://v.youku.com/v_show/id_XMTQwMjA1OTMwNA` and the regular expression is not able to properly parse it.
I'm not good with regular expressions, so I've rewritten that function to use parse_url (since it was in an inline code-comment in there anyway).
function _video_embed_youku_get_video_id($url) {
$id = FALSE;
// Parse_url is an easy way to break a url into its components.
$parsed = parse_url($url);
$path = $parsed['path'];
$parts = explode('/', $path);
foreach ($parts as $part) {
if (strstr($part, 'id_')) {
$id = str_replace('id_', '', $part);
return $id;
}
}
return $id;
}
Comments
Comment #2
shivachevva commentedUsing the above patch not getting the thumbnail information. Changed the code in video_embed_youku_handle_thumbnail function and working fine.
Comment #4
dansboy commentedComment #6
dansboy commented