Skip to content

Commit

Permalink
Merge branch 'public/8.5' into public/9.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mherger committed Mar 20, 2024
2 parents f9d34e4 + 8368f4c commit 5d7e674
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
1 change: 1 addition & 0 deletions Changelog8.html
Expand Up @@ -23,6 +23,7 @@ <h2><a name="v8.5.1" id="v8.5.1"></a>Version 8.5.1</h2>

<li>Bug Fixes:</li>
<ul>
<li>Fix definition of track-level favorites' artwork.</li>
<li></li>
</ul>
<br />
Expand Down
19 changes: 9 additions & 10 deletions HTML/Default/xmlbrowser.html
Expand Up @@ -164,12 +164,13 @@
[% END %]
[% END %]

<!-- The songinfo data must be selected when using favs icon from an album summary, a track summary or a list of -->
<!-- albums or artists, but never when using a list of tracks. In such case, Web::XMLBrowser must be used to -->
<!-- re-drill the tree one level below and execute the add there (see code there) -->
[% IF item.favorites == 1 %]
[% WRAPPER favaddlink noTarget=1 %]
[% IF item.type == 'audio' && item.url %]
onclick="SqueezeJS.Utils.toggleFavorite(this, '[% item.url | uri | replace("'", "%27") %]', '[% (item.name _ " " _ stringBY _ " " _ item.artist) | uri | replace("'", "%27") %]');"
[% ELSIF songinfo.favorites %]
onclick="SqueezeJS.Utils.toggleFavorite(this, '[% songinfo.favorites_url | uri | replace("'", "%27") %]', '[% crumb.values.-1 | html %]');"
[% IF songinfo.favorites && item.type != 'audio' %]
onclick="SqueezeJS.Utils.toggleFavorite(this, '[% songinfo.favorites_url | uri | replace("'", "%27") %]', '[% crumb.name | html | replace("'", "%27") %]');"
[% ELSIF item.simpleAlbumLink && item.favorites_url %]
onclick="SqueezeJS.Utils.toggleFavorite(this, '[% item.favorites_url | uri | replace("'", "%27") %]', '[% (item.name _ " " _ stringBY _ " " _ item.artist) | uri | replace("'", "%27") %]');"
[% ELSE %]
Expand All @@ -178,10 +179,8 @@
[% END %]
[% ELSIF item.favorites == 2 %]
[% WRAPPER favdellink noTarget=1 %]
[% IF item.type == 'audio' && item.url %]
onclick="SqueezeJS.Utils.toggleFavorite(this, '[% item.url | uri | replace("'", "%27") %]', '[% (item.name _ " " _ stringBY _ " " _ item.artist) | uri | replace("'", "%27") %]');"
[% ELSIF songinfo.favorites %]
onclick="SqueezeJS.Utils.toggleFavorite(this, '[% songinfo.favorites_url | uri | replace("'", "%27") %]', '[% crumb.values.-1 | html %]');"
[% IF songinfo.favorites && item.type != 'audio' %]
onclick="SqueezeJS.Utils.toggleFavorite(this, '[% songinfo.favorites_url | uri | replace("'", "%27") %]', '[% crumb.name | html | replace("'", "%27") %]');"
[% ELSE %]
onclick="Browse.XMLBrowser.toggleFavorite(this, '[% (item.index || index _ (start + loop.index)) | uri | replace("'", "%27") %]', '[% pageinfo.startitem %]', '[% sess %]');"
[% END %]
Expand Down Expand Up @@ -210,11 +209,11 @@
[%- BLOCK allcontrol -%]
[% IF songinfo.favorites == 1 %]
[% WRAPPER favaddlink noTarget=1 %]
onclick="SqueezeJS.Utils.toggleFavorite(this, '[% songinfo.favorites_url | uri | replace("'", "%27") %]', '[% crumb.name | html %]');"
onclick="SqueezeJS.Utils.toggleFavorite(this, '[% songinfo.favorites_url | uri | replace("'", "%27") %]', '[% crumb.name | html | replace("'", "%27") %]');"
[% END %]
[% ELSIF songinfo.favorites == 2 %]
[% WRAPPER favdellink noTarget=1 %]
onclick="SqueezeJS.Utils.toggleFavorite(this, '[% songinfo.favorites_url | uri | replace("'", "%27") %]', '[% crumb.name | html %]');"
onclick="SqueezeJS.Utils.toggleFavorite(this, '[% songinfo.favorites_url | uri | replace("'", "%27") %]', '[% crumb.name | html | replace("'", "%27") %]');"
[% END %]
[% END %]

Expand Down
6 changes: 3 additions & 3 deletions Slim/Web/XMLBrowser.pm
Expand Up @@ -540,7 +540,7 @@ sub handleFeed {
&& !($subFeed->{type} && $subFeed->{type} eq 'search')
&& !(ref $subFeed->{'url'}) )
) {
$subFeed->{'image'} ||= $subFeed->{'cover'} || $subFeed->{'icon'} || Slim::Player::ProtocolHandlers->iconForURL($subFeed->{'play'} || $subFeed->{'url'});
$subFeed->{'image'} ||= $subFeed->{'cover'} || $subFeed->{'icon'} || Slim::Player::ProtocolHandlers->iconForURL($subFeed->{'play'} || $subFeed->{'url'}, $client);
$subFeed->{'image'} = proxiedImage($subFeed->{'image'});

$stash->{'streaminfo'} = {
Expand Down Expand Up @@ -999,9 +999,9 @@ sub handleFeed {

my $type = $item->{'favorites_type'} || $item->{'type'} || 'link';
my $name = $item->{'favorites_title'} || $item->{'name'};
my $icon = $item->{'favorites_icon'} || $item->{'image'} || $item->{'icon'} || Slim::Player::ProtocolHandlers->iconForURL($furl);
my $icon = $item->{'favorites_icon'} || $item->{'image'} || $item->{'icon'} || Slim::Player::ProtocolHandlers->iconForURL($furl, $client);

if ( ($item->{'play'} && !$item->{'favorites_type'})
if ( ($item->{'play'} && !$item->{'favorites_type'})
|| ($type eq 'playlist' && $furl =~ /^(file|db):/)
) {
$type = 'audio';
Expand Down

0 comments on commit 5d7e674

Please sign in to comment.