slimserver icon indicating copy to clipboard operation
slimserver copied to clipboard

Station logo doesn't show on "Now Playing" when Favorites URL is not canonical.

Open bpa-code opened this issue 2 years ago • 1 comments

If the remote URL of a station in a favorite is not canonical, the station logo is cached ("remote_image_$url") using the URL in the Favorite but the URL supplied to "getMetadataFor" will be a canonical URL and so station logo is not found.

The issue came up with the following favorite entry. <outline URL="https://stream.radio357.pl" icon="https://d3kle7qwymxpcy.cloudfront.net/images/broadcasts/d8/dd/134029/2/c300.png" text="Radio 357 (secure audio/aac)" type="audio" />

The above will not show station logo when playing but if the Favorite is changed to add a trailing "/" - the logo will be displayed.

The URL https://stream.radio357.pl is a root URL but is not canonical without a trailing "/". The URL was supplied by a RadioNet.

LMS in Schema.pm objectForUrl - will make an URL canonical before adding to database and this is the URL used when playing the Favorite.

A possible solution would be to add the following lines to Remote.pm setRemoteMetadata if ( $url =~ /^http/i ) { $url = URI->new($url)->canonical->as_string; }

I'm not sure if it'll break something.

The alternative is to tell users to ensure URLs are canonical but I feel saving data with one URL and then trying to retrieve with changed URL is not right.

bpa-code avatar Dec 01 '23 21:12 bpa-code

Could you please provide a patch which we could test?

michaelherger avatar Dec 02 '23 00:12 michaelherger

:warning: This issue is stale because it has been open for 720 days with no activity. Please chime in if you want to keep it alive.

github-actions[bot] avatar Nov 21 '25 13:11 github-actions[bot]

:no_entry: This issue was closed because it has been inactive for 14 days since being marked as stale.

github-actions[bot] avatar Dec 05 '25 13:12 github-actions[bot]