Skip to content

Commit

Permalink
TTK-27327: Show downloadable master (#673) (#676)
Browse files Browse the repository at this point in the history
Co-authored-by: Pablo Ogando Ferreira <[email protected]>
  • Loading branch information
albacodina and Yurujai authored Nov 26, 2024
1 parent cd4619d commit 50cbe1a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Pumukit/BasePlayerBundle/Services/TrackUrlService.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ public function __construct(UrlGeneratorInterface $router, $secret, $secureDurat
*/
public function generateTrackFileUrl(Track $track, $reference_type = UrlGeneratorInterface::ABSOLUTE_PATH)
{
$ext = pathinfo(parse_url($track->getUrl(), PHP_URL_PATH), PATHINFO_EXTENSION);
if (!$ext) {
if ($track->getUrl()) {
$ext = pathinfo(parse_url($track->getUrl(), PHP_URL_PATH), PATHINFO_EXTENSION);
} else {
$ext = pathinfo($track->getPath(), PATHINFO_EXTENSION);
}

Expand Down

0 comments on commit 50cbe1a

Please sign in to comment.