aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeshan Wanigasooriya <heshanmw@gmail.com>2009-06-18 01:44:51 +0000
committerHeshan Wanigasooriya <heshanmw@gmail.com>2009-06-18 01:44:51 +0000
commit557a5b80f3f3ae6b3b7707ef7ecf1396071ab590 (patch)
tree9c1d86f6cbe0205feac83ed0a98b03d3ca564a5b
parent09c0f59568a0d2a1aacd7bcadb85a8ee649cf6c9 (diff)
downloadvideo-557a5b80f3f3ae6b3b7707ef7ecf1396071ab590.tar.gz
video-557a5b80f3f3ae6b3b7707ef7ecf1396071ab590.tar.bz2
#221209 by bkat: editing video loses auto converted version
-rw-r--r--video.module13
1 files changed, 13 insertions, 0 deletions
diff --git a/video.module b/video.module
index d3fee31..dc67235 100644
--- a/video.module
+++ b/video.module
@@ -636,6 +636,14 @@ function video_form($node) {
'#type' => 'hidden',
'#value' => $node->vtype
);
+
+ // kjh: set an hidden field to store encoded fid
+ if ($node->serial_data && isset($node->serial_data['video_encoded_fid'])) {
+ $form['video_encoded_fid'] = array(
+ '#type' => 'hidden',
+ '#value' => $node->serial_data['video_encoded_fid']
+ );
+ }
$form['video'] = array('#type' => 'fieldset', '#title' => t('Video Information'), '#weight' => -19);
@@ -790,6 +798,11 @@ function video_update($node) {
else {
// set the required properties of the video node
video_presave($node);
+ // kjh: make sure to save the encoded_fid
+ if ($node->new_video_upload_file_fid == 0 && $node->video_encoded_fid) {
+ $node->serial_data['video_encoded_fid'] = $node->video_encoded_fid;
+ }
+
$node->serialized_data = serialize($node->serial_data); //Serialize the data for insertion into the database.
return db_query("UPDATE {video} SET vidfile='%s', size=%d, videox=%d, videoy=%d, video_bitrate=%d, audio_bitrate=%d, audio_sampling_rate=%d, audio_channels='%s', playtime_seconds=%d, disable_multidownload=%d, download_folder='%s', use_play_folder=%d, serialized_data='%s' WHERE vid = %d",