From 515c081f794c0e020241956f291381361e28489a Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Wed, 25 Feb 2009 05:27:29 +0000 Subject: Add support MP4 movies also. Flowplayer supports them and can stream them using the h264streaming plugin. Everything else is a fairly minor change. --- modules/local_import/controllers/local_import.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules/local_import/controllers') diff --git a/modules/local_import/controllers/local_import.php b/modules/local_import/controllers/local_import.php index 80dc0215..12f548fc 100644 --- a/modules/local_import/controllers/local_import.php +++ b/modules/local_import/controllers/local_import.php @@ -86,7 +86,7 @@ class Local_Import_Controller extends Controller { } else { $parent = $album; } - } else if ($pathinfo["extension"] == "flv") { + } else if (in_array($pathinfo["extension"], array("flv", "mp4")) { $movie = movie::create($parent, $source_path, basename($source_path), basename($source_path)); log::success("content", t("Added a movie"), @@ -115,7 +115,7 @@ class Local_Import_Controller extends Controller { $extension = strtolower(substr(strrchr($file, '.'), 1)); // Make sure the file is readable if (is_readable($full_path) && - in_array($extension, array("IMAGETYPE_GIF", "JPEG", "jpg", "PNG", "flv"))) { + in_array($extension, array("gif", "jpeg", "jpg", "png", "flv", "mp4"))) { $file_list[$file] = array("path" => $full_path, "is_dir" => false); } } -- cgit v1.2.3