X-Git-Url: http://git.pippins.net/embedvideo/.git/static/git-logo.png?a=blobdiff_plain;f=ItemAddEmbedVideo.inc;h=a6cb38c5aad7092791554c75e110d47ba4e69492;hb=74a1d0cec8dd6b7257d3d70bef106af9dcd7f786;hp=c0d355dc927a11fa18e5b6bb49a3a3486b5ccd32;hpb=12aedded878face3b4c06f1d0886f9f4fd1b96bc;p=embedvideo%2F.git
diff --git a/ItemAddEmbedVideo.inc b/ItemAddEmbedVideo.inc
index c0d355d..a6cb38c 100644
--- a/ItemAddEmbedVideo.inc
+++ b/ItemAddEmbedVideo.inc
@@ -122,7 +122,7 @@ class ItemAddEmbedVideo extends ItemAddPlugin {
}
- if($debugOutput) {
+ if(!strcmp($debugOutput,"true")) {
print "$xml";
}
@@ -229,19 +229,18 @@ class ItemAddEmbedVideo extends ItemAddPlugin {
* Check to make sure the URL to the remote flv file is valid
* (That the file exists at the URL given)
*/
- list ($successfullyCopied, $response, $headers) =
- GalleryCoreApi::fetchWebPage($url, $extraHeaders);
- if (!$successfullyCopied) {
- return array(GalleryCoreApi::error(ERROR_BAD_PATH,__FILE__,__LINE__,
- "Unable to locate a video at url: $url"),null,null);
- }
+ /*
+ * TODO: How can we check if the remote file exists without actually
+ * downloading the entire file? For now, if the file doesn't exist,
+ * a gallery item is still added, and the embedded player won't play it.
+ */
/*
* Format the description to hold a reference to the embedded video
* This reference will be embedded using the G2 internal player,
* or an external player if provided by the user.
*/
- if(!$useInternalFlvPlayer) {
+ if(!strcmp($useInternalFlvPlayer,"false")) {
/*
* The user has indicated they want to use an external flv player
@@ -334,7 +333,7 @@ class ItemAddEmbedVideo extends ItemAddPlugin {
$tmpFile = $platform->tempnam($tmpDir, 'add');
$tmpFile.= ".jpg";
- if($debugOutput) {
+ if(!strcmp($debugOutput,"true")) {
print "thumbnail: $thumbnail
";
}
@@ -357,7 +356,7 @@ class ItemAddEmbedVideo extends ItemAddPlugin {
$fileName = preg_replace("/\d+;/","",$fileName);
/* General debug output */
- if($debugOutput) {
+ if(!strcmp($debugOutput,"true")) {
print "
";
print "\n".$summary."
$description
";