diff --git a/CHANGELOG.md b/CHANGELOG.md index 140586887..c7ca33612 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ * Clicking the previously played song didn't play it again after stopping the playback with the keyboard 'stop' media key - Radio stream relaying not working on some redirecting stream URLs, depending on the headers [#1194](https://github.com/owncloud/music/issues/1194) +- Radio stream playback failing when the stream URL has only the domain part without any path and no trailing '/' (like http://abc.somedomain.xyz) ## 2.1.1 - 2025-01-03 diff --git a/lib/Utility/RadioService.php b/lib/Utility/RadioService.php index ec39f5c75..eba9d90db 100644 --- a/lib/Utility/RadioService.php +++ b/lib/Utility/RadioService.php @@ -59,7 +59,7 @@ private static function parseStreamUrl(string $url) : array { $ret['scheme'] = $parse_url['scheme']; $ret['hostname'] = $parse_url['host']; - $ret['pathname'] = $parse_url['path']; + $ret['pathname'] = $parse_url['path'] ?? '/'; if (isset($parse_url['query'])) { $ret['pathname'] .= "?" . $parse_url['query']; @@ -276,7 +276,7 @@ public function resolveStreamUrl(string $url) : array { $isHls = false; $urlParts = \parse_url($url); - $lcPath = \mb_strtolower($urlParts['path']); + $lcPath = \mb_strtolower($urlParts['path'] ?? '/'); $isPls = Util::endsWith($lcPath, '.pls'); $isM3u = !$isPls && (Util::endsWith($lcPath, '.m3u') || Util::endsWith($lcPath, '.m3u8'));