diff options
author | glen201 <glen201@527446.no-reply.drupal.org> | 2009-07-24 03:39:16 +0000 |
---|---|---|
committer | glen201 <glen201@527446.no-reply.drupal.org> | 2009-07-24 03:39:16 +0000 |
commit | dac773de5327d0fbfca02c25743a68d32eab3b6d (patch) | |
tree | 8f03105ba3f199c783585d653b31b5d2f0d6c617 | |
parent | e1b56ef6eb28f1627b1bb41cbb56f11a472bcbc3 (diff) | |
download | video-dac773de5327d0fbfca02c25743a68d32eab3b6d.tar.gz video-dac773de5327d0fbfca02c25743a68d32eab3b6d.tar.bz2 |
Fixed ffmpeg rendered video not deleted when replaced with new video
-rw-r--r-- | types/video_upload/video_upload.module | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/types/video_upload/video_upload.module b/types/video_upload/video_upload.module index 4241306..8a98a06 100644 --- a/types/video_upload/video_upload.module +++ b/types/video_upload/video_upload.module @@ -510,7 +510,9 @@ function _video_upload_store_file(&$file, &$node) { // update the file db entry //GMM: Remove the serialized encoded fid information in case we're replacing an already encoded video if (isset($node->serial_data['video_encoded_fid'])) { - $node->serial_data['video_encoded_fid'] = 0; + //GMM: set rendered video to delete by Drupal cron + db_query('UPDATE {files} SET status = %d WHERE fid = %d', FILE_STATUS_TEMPORARY, $node->serial_data['video_encoded_fid']); + $node->serial_data['video_encoded_fid'] = 0; db_query("UPDATE {video} SET serialized_data = '%s' WHERE vid = %d", serialize($node->serial_data), $node->vid); } } |