Skip to content

Commit

Permalink
Follow HTTP redirections when fetching Icy-Metadata of radio stream
Browse files Browse the repository at this point in the history
For some reason, the following of redirections was never activated for the
Icy-Metadata fetching although logic for this was implemented. It really
didn't make sense as we anyway follow the redirections when streaming the
audio.
  • Loading branch information
paulijar committed Jan 19, 2025
1 parent 71215fb commit 45d8d24
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
8 changes: 5 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@
- Dashboard widget:
* Playback controls disappearing when the playing track changes with Aurora.js backend (used when the audio format has no native browser support)
* 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)
- Internet radio:
* Stream relaying not working on some redirecting stream URLs, depending on the headers
[#1194](https://github.com/owncloud/music/issues/1194)
* Stream playback failing when the stream URL has only the domain part without any path and no trailing '/' (like http://abc.somedomain.xyz)
* HTTP redirections not followed when parsing Icy-MetaData of the channel

## 2.1.1 - 2025-01-03

Expand Down
4 changes: 2 additions & 2 deletions lib/Controller/RadioApiController.php
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ public function getChannelInfo(int $id, ?string $type=null) {

switch ($type) {
case 'icy':
$metadata = $this->service->readIcyMetadata($streamUrl, 3, 1);
$metadata = $this->service->readIcyMetadata($streamUrl, 3, 5);
break;
case 'shoutcast-v1':
$metadata = $this->service->readShoutcastV1Metadata($streamUrl);
Expand All @@ -247,7 +247,7 @@ public function getChannelInfo(int $id, ?string $type=null) {
$metadata = $this->service->readIcecastMetadata($streamUrl);
break;
default:
$metadata = $this->service->readIcyMetadata($streamUrl, 3, 1)
$metadata = $this->service->readIcyMetadata($streamUrl, 3, 5)
?? $this->service->readShoutcastV2Metadata($streamUrl)
?? $this->service->readIcecastMetadata($streamUrl)
?? $this->service->readShoutcastV1Metadata($streamUrl);
Expand Down

0 comments on commit 45d8d24

Please sign in to comment.