Skip to content

Commit

Permalink
Merge branch 'release/1.0.9'
Browse files Browse the repository at this point in the history
  • Loading branch information
khalwat committed Jan 25, 2018
2 parents 8b7f2fc + 6e8985d commit bca23d8
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 3 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Transcoder Changelog

## 1.0.9 - 2018.01.25
### Changed
* Handle Asset Volumes that use aliases
* Updated DocBlock comments

## 1.0.8 - 2017.12.06
### Changed
* Updated to require craftcms/cms `^3.0.0-RC1`
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "nystudio107/craft3-transcoder",
"description": "Transcode video & audio files to various formats, and provide video thumbnails",
"type": "craft-plugin",
"version": "1.0.8",
"version": "1.0.9",
"keywords": [
"craft",
"cms",
Expand Down
2 changes: 2 additions & 0 deletions src/controllers/DefaultController.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ class DefaultController extends Controller
* from downloading things that are outside of the server root.
*
* @param $url
*
* @throws \yii\base\ExitException
*/
public function actionDownloadFile($url)
{
Expand Down
9 changes: 8 additions & 1 deletion src/services/Transcode.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ class Transcode extends Component
* @param $videoOptions array of options for the video
*
* @return string URL of the transcoded video or ""
* @throws Exception
*/
public function getVideoUrl($filePath, $videoOptions): string
{
Expand Down Expand Up @@ -201,6 +202,7 @@ public function getVideoUrl($filePath, $videoOptions): string
* @param $thumbnailOptions array of options for the thumbnail
*
* @return string URL of the video thumbnail
* @throws Exception
*/
public function getVideoThumbnailUrl($filePath, $thumbnailOptions): string
{
Expand Down Expand Up @@ -262,6 +264,7 @@ public function getVideoThumbnailUrl($filePath, $thumbnailOptions): string
* @param $audioOptions array of options for the audio file
*
* @return string URL of the transcoded audio file or ""
* @throws Exception
*/
public function getAudioUrl($filePath, $audioOptions): string
{
Expand Down Expand Up @@ -357,6 +360,7 @@ public function getAudioUrl($filePath, $audioOptions): string
* @param bool $summary
*
* @return array
* @throws Exception
*/
public function getFileInfo($filePath, $summary = false): array
{
Expand Down Expand Up @@ -427,6 +431,7 @@ public function getFileInfo($filePath, $summary = false): array
* @param $videoOptions
*
* @return string
* @throws Exception
*/
public function getVideoFilename($filePath, $videoOptions): string
{
Expand All @@ -451,6 +456,7 @@ public function getVideoFilename($filePath, $videoOptions): string
* @param $audioOptions
*
* @return string
* @throws Exception
*/
public function getAudioFilename($filePath, $audioOptions): string
{
Expand Down Expand Up @@ -478,6 +484,7 @@ public function getAudioFilename($filePath, $audioOptions): string
* @param $options
*
* @return string
* @throws Exception
*/
protected function getFilename($filePath, $options)
{
Expand Down Expand Up @@ -539,7 +546,7 @@ protected function getAssetPath($filePath): string
$filePath = $sourcePath . $folderPath . $asset->filename;
}

return $filePath;
return Craft::getAlias($filePath);
}

/**
Expand Down
7 changes: 6 additions & 1 deletion src/variables/TranscoderVariable.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

use nystudio107\transcoder\Transcoder;

use Craft;
use craft\helpers\UrlHelper;

/**
Expand All @@ -33,6 +32,7 @@ class TranscoderVariable
* @param $videoOptions
*
* @return string
* @throws \yii\base\Exception
*/
public function getVideoUrl($filePath, $videoOptions): string
{
Expand All @@ -48,6 +48,7 @@ public function getVideoUrl($filePath, $videoOptions): string
* @param $thumbnailOptions
*
* @return string
* @throws \yii\base\Exception
*/
public function getVideoThumbnailUrl($filePath, $thumbnailOptions): string
{
Expand All @@ -64,6 +65,7 @@ public function getVideoThumbnailUrl($filePath, $thumbnailOptions): string
* @param $audioOptions
*
* @return string
* @throws \yii\base\Exception
*/
public function getAudioUrl($filePath, $audioOptions): string
{
Expand All @@ -79,6 +81,7 @@ public function getAudioUrl($filePath, $audioOptions): string
* @param bool $summary
*
* @return array
* @throws \yii\base\Exception
*/
public function getFileInfo($filePath, $summary = false): array
{
Expand All @@ -94,6 +97,7 @@ public function getFileInfo($filePath, $summary = false): array
* @param $videoOptions
*
* @return string
* @throws \yii\base\Exception
*/
public function getVideoProgressUrl($filePath, $videoOptions): string
{
Expand All @@ -116,6 +120,7 @@ public function getVideoProgressUrl($filePath, $videoOptions): string
* @param $audioOptions
*
* @return string
* @throws \yii\base\Exception
*/
public function getAudioProgressUrl($filePath, $audioOptions): string
{
Expand Down

0 comments on commit bca23d8

Please sign in to comment.