aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--video.module4
1 files changed, 2 insertions, 2 deletions
diff --git a/video.module b/video.module
index ac10642..0cfb20d 100644
--- a/video.module
+++ b/video.module
@@ -1008,8 +1008,8 @@ function theme_video_download(&$node) {
* string value of file type or boolean FALSE on error
*/
function _video_get_filetype($vidfile) {
- //If the filename doesn't contain a ".", "/", or "\" then consider it a youtube video ID.
- if (!strpos($vidfile, '.') and !strpos($vidfile, '/') and !strpos($vidfile, '\\') and strlen($vidfile) <= 12 and strlen($vidfile) >= 10) {
+ //If the filename doesn't contain a ".", "/", or "\" and is exactly 11 characters then consider it a youtube video ID.
+ if (!strpos($vidfile, '.') and !strpos($vidfile, '/') and !strpos($vidfile, '\\') and strlen($vidfile) == 11) {
$file_type = 'youtube';
} elseif (strstr($vidfile, '.')) { //If file contains a "." then get the file extension after the "."
$file_type = substr($vidfile, strrpos($vidfile, '.') + 1);