X-Git-Url: http://git.pippins.net/embedvideo/.git/static/%7Bg-%3Eurl%20arg1=?a=blobdiff_plain;f=ItemAddEmbedVideo.inc;h=22986988fd3957466a24a292f67d18a4ddd98951;hb=d9b0ef7fec32d06faec82150e4c4e7c9f879334c;hp=544c5225cd970821b8ff23a6379f983313e97ced;hpb=7ec319c1b7a2ab44287ac3d6ecbd6f2e773533c9;p=embedvideo%2F.git diff --git a/ItemAddEmbedVideo.inc b/ItemAddEmbedVideo.inc index 544c522..2298698 100644 --- a/ItemAddEmbedVideo.inc +++ b/ItemAddEmbedVideo.inc @@ -214,11 +214,15 @@ class ItemAddEmbedVideo extends ItemAddPlugin { /* Handle the high quality format information */ if(preg_match("/fmt=(\d+)/",$extra_params,$matches)) { $extra_params="&ap=%2526fmt%3D".$matches[1]; + if(!strcmp($matches[1],"22")) { + //$youtubeWidth=1280; + //$youtubeHeight=720; + } } } /* Youtube api feed */ - $feed = $youtubeApiUrl."videos/$video_id"; + $feed = $youtubeApiUrl."videos/".urlencode($video_id); if(!strcmp($debugOutput,"true")) { print "\n

Youtube URL Parsing Results

"; @@ -800,7 +804,7 @@ class ItemAddEmbedVideo extends ItemAddPlugin { $title=$matches[1]; /* Extract the thumbnail URL from the webpage contents */ - preg_match('/"videothumbnail" href="(.+?)"/i', + preg_match('/"og:image" content="(.+?)"/i', $contents, $matches); $thumbnail=$matches[1];