Skip to content

Commit

Permalink
Fixing path for video original to not be /base but /original. #616
Browse files Browse the repository at this point in the history
  • Loading branch information
jmathai committed Sep 24, 2013
1 parent e5eae32 commit d7d156c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/libraries/models/Video.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public function generatePaths($videoName, $dateTaken)
$originalName = sprintf('%s-%s.%s', $rootName, uniqid(), $ext);

return array(
'pathOriginal' => sprintf('/video/base/%s/%s', date('Ym', $dateTaken), $originalName),
'pathOriginal' => sprintf('/video/original/%s/%s', date('Ym', $dateTaken), $originalName),
'pathBase' => sprintf('/base/%s/%s', date('Ym', $dateTaken), $baseName)
);
}
Expand Down
8 changes: 5 additions & 3 deletions src/libraries/plugins/AwsTranscoderPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ public function defineConf()
return array(
'pipelineId' => '',
'presets' => '',
'bucket' => '',
);
}

Expand Down Expand Up @@ -144,6 +145,7 @@ private function confirmSubscription($values)
private function handleNotification($values)
{
$message = json_decode($values->Message);
$conf = $this->getConf();

switch ($message->state) {
case 'ERROR':
Expand All @@ -157,9 +159,9 @@ private function handleNotification($values)

$params = array(
'skipOriginal' => '1',
'photo' => str_replace('{count}', '00002', sprintf('http://opmeshared.s3.amazonaws.com/%s.jpg', $output->thumbnailPattern)),
'photo' => str_replace('{count}', '00002', sprintf('http://%s/%s.jpg', $conf->bucket, $output->thumbnailPattern)),
'videoStatus' => 'completed',
'videoSource' => sprintf('http://opmeshared.s3.amazonaws.com/%s', $output->key)
'videoSource' => sprintf('http://%s/%s', $conf->bucket, $output->key)
);

$utilityObj = new Utility;
Expand Down Expand Up @@ -205,5 +207,5 @@ private function generatePaths($presetId, $video)
'video' => sprintf('video/custom/%s/%s-%s.%s', date('Ym', $video['dateTaken']), $parts['filename'], $preset['Id'], $preset['Container']),
'thumbnail' => sprintf('video/custom/%s/%s-{count}', date('Ym', $video['dateTaken']), $parts['filename'])
);
}
}
}

0 comments on commit d7d156c

Please sign in to comment.