Created
September 12, 2012 15:12
-
-
Save svendecabooter/3707277 to your computer and use it in GitHub Desktop.
PROV-424 patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/app/lib/core/Plugins/TaskQueueHandlers/mediaproc.php b/app/lib/core/Plugins/TaskQueueHandlers/mediaproc.php | |
index d956891..5e84570 100644 | |
--- a/app/lib/core/Plugins/TaskQueueHandlers/mediaproc.php | |
+++ b/app/lib/core/Plugins/TaskQueueHandlers/mediaproc.php | |
@@ -42,6 +42,7 @@ include_once(__CA_LIB_DIR__."/core/Plugins/WLPlug.php"); | |
include_once(__CA_LIB_DIR__."/core/Plugins/IWLPlugTaskQueueHandler.php"); | |
include_once(__CA_LIB_DIR__."/core/Media.php"); | |
include_once(__CA_LIB_DIR__."/core/Media/MediaVolumes.php"); | |
+include_once(__CA_LIB_DIR__."/core/Media/MediaInfoCoder.php"); | |
include_once(__CA_LIB_DIR__."/core/Media/MediaProcessingSettings.php"); | |
include_once(__CA_LIB_DIR__."/core/Datamodel.php"); | |
include_once(__CA_LIB_DIR__."/core/Error.php"); | |
@@ -429,7 +430,14 @@ include_once(__CA_LIB_DIR__."/core/Logging/Eventlog.php"); | |
if ($t_instance->load($vn_id)) { | |
$md = $t_instance->get($vs_field); | |
+ if ($vs_field == 'value_blob') { | |
+ // we are getting the info as a serialized blob, so convert to a regular array | |
+ $coder = new MediaInfoCoder(); | |
+ $md = $coder->getMediaArray($md); | |
+ } | |
+ if (is_array($md)) { | |
$media_desc = array_merge($md, $media_desc); | |
+ } | |
$t_instance->setMediaInfo($vs_field, $media_desc); | |
$t_instance->setMode(ACCESS_WRITE); | |
$t_instance->update(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment