aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeshan Wanigasooriya <heshanmw@gmail.com>2009-06-17 02:53:44 +0000
committerHeshan Wanigasooriya <heshanmw@gmail.com>2009-06-17 02:53:44 +0000
commit09c0f59568a0d2a1aacd7bcadb85a8ee649cf6c9 (patch)
tree3834529f1c3a098cec7dfe605cce02666e7a7c39
parenta47b9e621c7f1287058064ba9f0fd33340b17f86 (diff)
downloadvideo-09c0f59568a0d2a1aacd7bcadb85a8ee649cf6c9.tar.gz
video-09c0f59568a0d2a1aacd7bcadb85a8ee649cf6c9.tar.bz2
#488616 by glen201: added #comment-1710102 features
-rw-r--r--types/video_upload/video_upload.module7
1 files changed, 5 insertions, 2 deletions
diff --git a/types/video_upload/video_upload.module b/types/video_upload/video_upload.module
index e2cf6d9..7f7e29c 100644
--- a/types/video_upload/video_upload.module
+++ b/types/video_upload/video_upload.module
@@ -485,9 +485,12 @@ function _video_upload_store_file(&$file, &$node) {
_video_upload_get_path($file, $node);
if (file_move($file, file_directory_path())) { // file moved successfully
-
+ if(variable_get('video_ffmpeg_helper_auto_conversion', false))
+ $status = 0; // ffmpeg will use this as source, so let drupal delete the file later
+ else
+ $status = 1; // ffmpeg will not be called, this video file will play as-is
// update the file db entry
- db_query("UPDATE {files} SET filename = '%s', filepath = '%s', filemime = '%s', filesize = %d, status = %d WHERE fid = %d", $file->filename, $file->filepath, $file->filemime, $file->filesize, 1, $file->fid);
+ db_query("UPDATE {files} SET filename = '%s', filepath = '%s', filemime = '%s', filesize = %d, status = %d WHERE fid = %d", $file->filename, $file->filepath, $file->filemime, $file->filesize, $status, $file->fid);
// add an entry in the file_revisions table
db_query("INSERT INTO {video_upload} (vid, nid, fid) VALUES (%d, %d, %d)", $node->vid, $node->nid, $file->fid);
// update the file db entry