Skip to content

Commit bca23d8

Browse files
committed
Merge branch 'release/1.0.9'
2 parents 8b7f2fc + 6e8985d commit bca23d8

File tree

5 files changed

+22
-3
lines changed

5 files changed

+22
-3
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Transcoder Changelog
22

3+
## 1.0.9 - 2018.01.25
4+
### Changed
5+
* Handle Asset Volumes that use aliases
6+
* Updated DocBlock comments
7+
38
## 1.0.8 - 2017.12.06
49
### Changed
510
* Updated to require craftcms/cms `^3.0.0-RC1`

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "nystudio107/craft3-transcoder",
33
"description": "Transcode video & audio files to various formats, and provide video thumbnails",
44
"type": "craft-plugin",
5-
"version": "1.0.8",
5+
"version": "1.0.9",
66
"keywords": [
77
"craft",
88
"cms",

src/controllers/DefaultController.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ class DefaultController extends Controller
4545
* from downloading things that are outside of the server root.
4646
*
4747
* @param $url
48+
*
49+
* @throws \yii\base\ExitException
4850
*/
4951
public function actionDownloadFile($url)
5052
{

src/services/Transcode.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ class Transcode extends Component
8383
* @param $videoOptions array of options for the video
8484
*
8585
* @return string URL of the transcoded video or ""
86+
* @throws Exception
8687
*/
8788
public function getVideoUrl($filePath, $videoOptions): string
8889
{
@@ -201,6 +202,7 @@ public function getVideoUrl($filePath, $videoOptions): string
201202
* @param $thumbnailOptions array of options for the thumbnail
202203
*
203204
* @return string URL of the video thumbnail
205+
* @throws Exception
204206
*/
205207
public function getVideoThumbnailUrl($filePath, $thumbnailOptions): string
206208
{
@@ -262,6 +264,7 @@ public function getVideoThumbnailUrl($filePath, $thumbnailOptions): string
262264
* @param $audioOptions array of options for the audio file
263265
*
264266
* @return string URL of the transcoded audio file or ""
267+
* @throws Exception
265268
*/
266269
public function getAudioUrl($filePath, $audioOptions): string
267270
{
@@ -357,6 +360,7 @@ public function getAudioUrl($filePath, $audioOptions): string
357360
* @param bool $summary
358361
*
359362
* @return array
363+
* @throws Exception
360364
*/
361365
public function getFileInfo($filePath, $summary = false): array
362366
{
@@ -427,6 +431,7 @@ public function getFileInfo($filePath, $summary = false): array
427431
* @param $videoOptions
428432
*
429433
* @return string
434+
* @throws Exception
430435
*/
431436
public function getVideoFilename($filePath, $videoOptions): string
432437
{
@@ -451,6 +456,7 @@ public function getVideoFilename($filePath, $videoOptions): string
451456
* @param $audioOptions
452457
*
453458
* @return string
459+
* @throws Exception
454460
*/
455461
public function getAudioFilename($filePath, $audioOptions): string
456462
{
@@ -478,6 +484,7 @@ public function getAudioFilename($filePath, $audioOptions): string
478484
* @param $options
479485
*
480486
* @return string
487+
* @throws Exception
481488
*/
482489
protected function getFilename($filePath, $options)
483490
{
@@ -539,7 +546,7 @@ protected function getAssetPath($filePath): string
539546
$filePath = $sourcePath . $folderPath . $asset->filename;
540547
}
541548

542-
return $filePath;
549+
return Craft::getAlias($filePath);
543550
}
544551

545552
/**

src/variables/TranscoderVariable.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212

1313
use nystudio107\transcoder\Transcoder;
1414

15-
use Craft;
1615
use craft\helpers\UrlHelper;
1716

1817
/**
@@ -33,6 +32,7 @@ class TranscoderVariable
3332
* @param $videoOptions
3433
*
3534
* @return string
35+
* @throws \yii\base\Exception
3636
*/
3737
public function getVideoUrl($filePath, $videoOptions): string
3838
{
@@ -48,6 +48,7 @@ public function getVideoUrl($filePath, $videoOptions): string
4848
* @param $thumbnailOptions
4949
*
5050
* @return string
51+
* @throws \yii\base\Exception
5152
*/
5253
public function getVideoThumbnailUrl($filePath, $thumbnailOptions): string
5354
{
@@ -64,6 +65,7 @@ public function getVideoThumbnailUrl($filePath, $thumbnailOptions): string
6465
* @param $audioOptions
6566
*
6667
* @return string
68+
* @throws \yii\base\Exception
6769
*/
6870
public function getAudioUrl($filePath, $audioOptions): string
6971
{
@@ -79,6 +81,7 @@ public function getAudioUrl($filePath, $audioOptions): string
7981
* @param bool $summary
8082
*
8183
* @return array
84+
* @throws \yii\base\Exception
8285
*/
8386
public function getFileInfo($filePath, $summary = false): array
8487
{
@@ -94,6 +97,7 @@ public function getFileInfo($filePath, $summary = false): array
9497
* @param $videoOptions
9598
*
9699
* @return string
100+
* @throws \yii\base\Exception
97101
*/
98102
public function getVideoProgressUrl($filePath, $videoOptions): string
99103
{
@@ -116,6 +120,7 @@ public function getVideoProgressUrl($filePath, $videoOptions): string
116120
* @param $audioOptions
117121
*
118122
* @return string
123+
* @throws \yii\base\Exception
119124
*/
120125
public function getAudioProgressUrl($filePath, $audioOptions): string
121126
{

0 commit comments

Comments
 (0)