slimserver
slimserver copied to clipboard
Favorites drill down setting on server makes favorite deletion impossible using Touch UI
If the Favorites plugin setting "Local music items behavior" is set to "When you select a favorite contributor, genre or album, drill down to its content" (PLUGIN_FAVORITES_DONT_BROWSEDB_OFF) , a long press on a local album favorite in the Touch UI shows an option "save to favorites" (which does nothing) rather than "delete favorite".
If "Local music items behavior" is set to PLUGIN_FAVORITES_DONT_BROWSEDB_ON, the long-press menu behaves as expected, with a "delete favorite" option.
I can see this in the JSON sent to the player:
{
actions => {
go => {
cmd => ["jivefavorites", "add"],
params => {
icon => "music/059863fd/cover.png",
isContextMenu => 1,
parser => undef,
title => "All Live and All of the Night",
type => "audio",
url => "db:album.title=All%20Live%20and%20All%20of%20the%20Night&contributor.name=The%20Stranglers&libraryTracks.library=-1",
},
player => 0,
},
},
style => "item_fav",
text => "Save to Favorites",
},
And in the debug log I get this: it looks like having found the album URL, it's constructing a track URL which it then can't find:
[23-10-18 16:11:23.8376] Slim::Plugin::Favorites::OpmlFavorites::findUrl (399) Match db:album.title=All%20Live%20and%20All%20of%20the%20Night&contributor.name=The%20Stranglers at index 5
[23-10-18 16:11:23.8379] Slim::Plugin::Favorites::Plugin::_objectInfoHandler (1085) Item is a favorite [db:album.title=All%20Live%20and%20All%20of%20the%20Night&contributor.name=The%20Stranglers]
[23-10-18 16:11:23.8563] Slim::Plugin::Favorites::OpmlFavorites::findUrl (404) No match for db:album.title=All%20Live%20and%20All%20of%20the%20Night&contributor.name=The%20Stranglers&libraryTracks.library=-1
Heh... thanks for the pointer! A few days ago I was looking into another issue related drilling down to items from Favorites (https://github.com/Logitech/slimserver/issues/918) - and I didn't figure it out quickly. You might actually have pointed me at something.
But anyway, that's another story... You're on 8.4, aren't you? Would you know whether this is a regression?
Yes, 8.4 12th October, so pretty recent. I just fired up 8.3.1 on my laptop and it's the same behaviour.
Ok, so it's not related to my recent work for the Releases items.
BTW: this made me realise that the other issue #918 can't be as absolutely true as it seemed in my earlier test...
Here's the call stack at the "No match" point:
[23-10-18 21:14:09.5729] Slim::Plugin::Favorites::OpmlFavorites::findUrl (411) No match for db:album.title=All%20Live%20and%20All%20of%20the%20Night&contributor.name=The%20Stranglers&libraryTracks.library=-1
[23-10-18 21:14:09.5730] Slim::Plugin::Favorites::OpmlFavorites::findUrl (414) DK Slim::Control::XMLBrowser /usr/share/perl5/Slim/Control/XMLBrowser.pm 1878 Slim::Plugin::Favorites::OpmlFavorites::findUrl
[23-10-18 21:14:09.5731] Slim::Plugin::Favorites::OpmlFavorites::findUrl (414) DK Slim::Control::XMLBrowser /usr/share/perl5/Slim/Control/XMLBrowser.pm 850 Slim::Control::XMLBrowser::_playlistControlContextMenu
[23-10-18 21:14:09.5732] Slim::Plugin::Favorites::OpmlFavorites::findUrl (414) DK Slim::Control::XMLBrowser /usr/share/perl5/Slim/Control/XMLBrowser.pm 1572 Slim::Control::XMLBrowser::_cliQuery_done
[23-10-18 21:14:09.5733] Slim::Plugin::Favorites::OpmlFavorites::findUrl (414) DK Slim::Control::XMLBrowser /usr/share/perl5/Slim/Control/XMLBrowser.pm 486 Slim::Control::XMLBrowser::_cliQuerySubFeed_done
[23-10-18 21:14:09.5734] Slim::Plugin::Favorites::OpmlFavorites::findUrl (414) DK Slim::Menu::BrowseLibrary /usr/share/perl5/Slim/Menu/BrowseLibrary.pm 873 Slim::Control::XMLBrowser::__ANON__
[23-10-18 21:14:09.5735] Slim::Plugin::Favorites::OpmlFavorites::findUrl (414) DK Slim::Menu::BrowseLibrary /usr/share/perl5/Slim/Menu/BrowseLibrary.pm 951 Slim::Menu::BrowseLibrary::__ANON__
[23-10-18 21:14:09.5735] Slim::Plugin::Favorites::OpmlFavorites::findUrl (414) DK Slim::Menu::BrowseLibrary /usr/share/perl5/Slim/Menu/BrowseLibrary.pm 884 Slim::Menu::BrowseLibrary::_doRequest
[23-10-18 21:14:09.5736] Slim::Plugin::Favorites::OpmlFavorites::findUrl (414) DK Slim::Menu::BrowseLibrary /usr/share/perl5/Slim/Menu/BrowseLibrary.pm 928 Slim::Menu::BrowseLibrary::__ANON__
[23-10-18 21:14:09.5737] Slim::Plugin::Favorites::OpmlFavorites::findUrl (414) DK Slim::Menu::BrowseLibrary /usr/share/perl5/Slim/Menu/BrowseLibrary.pm 1874 Slim::Menu::BrowseLibrary::_generic
[23-10-18 21:14:09.5738] Slim::Plugin::Favorites::OpmlFavorites::findUrl (414) DK Slim::Plugin::Favorites::OpmlFavorites /usr/share/perl5/Slim/Plugin/Favorites/OpmlFavorites.pm 285 Slim::Menu::BrowseLibrary::_tracks
[23-10-18 21:14:09.5739] Slim::Plugin::Favorites::OpmlFavorites::findUrl (414) DK Slim::Control::XMLBrowser /usr/share/perl5/Slim/Control/XMLBrowser.pm 520 Slim::Plugin::Favorites::OpmlFavorites::_dbItem
[23-10-18 21:14:09.5740] Slim::Plugin::Favorites::OpmlFavorites::findUrl (414) DK Slim::Control::XMLBrowser /usr/share/perl5/Slim/Control/XMLBrowser.pm 121 Slim::Control::XMLBrowser::_cliQuery_done
[23-10-18 21:14:09.5741] Slim::Plugin::Favorites::OpmlFavorites::findUrl (414) DK Slim::Plugin::Favorites::Plugin /usr/share/perl5/Slim/Plugin/Favorites/Plugin.pm 760 Slim::Control::XMLBrowser::cliQuery
[23-10-18 21:14:09.5741] Slim::Plugin::Favorites::OpmlFavorites::findUrl (414) DK Slim::Control::Request /usr/share/perl5/Slim/Control/Request.pm 1880 Slim::Plugin::Favorites::Plugin::cliBrowse
[23-10-18 21:14:09.5742] Slim::Plugin::Favorites::OpmlFavorites::findUrl (414) DK Slim::Control::Request /usr/share/perl5/Slim/Control/Request.pm 1880 (eval)
[23-10-18 21:14:09.5743] Slim::Plugin::Favorites::OpmlFavorites::findUrl (414) DK Slim::Web::Cometd /usr/share/perl5/Slim/Web/Cometd.pm 896 Slim::Control::Request::execute
[23-10-18 21:14:09.5744] Slim::Plugin::Favorites::OpmlFavorites::findUrl (414) DK Slim::Web::Cometd /usr/share/perl5/Slim/Web/Cometd.pm 547 Slim::Web::Cometd::handleRequest
[23-10-18 21:14:09.5745] Slim::Plugin::Favorites::OpmlFavorites::findUrl (414) DK Slim::Web::Cometd /usr/share/perl5/Slim/Web/Cometd.pm 116 Slim::Web::Cometd::handler
[23-10-18 21:14:09.5746] Slim::Plugin::Favorites::OpmlFavorites::findUrl (414) DK Slim::Web::HTTP /usr/share/perl5/Slim/Web/HTTP.pm 484 Slim::Web::Cometd::webHandler
[23-10-18 21:14:09.5747] Slim::Plugin::Favorites::OpmlFavorites::findUrl (414) DK Slim::Networking::IO::Select /usr/share/perl5/Slim/Networking/IO/Select.pm 123 Slim::Web::HTTP::processHTTP
[23-10-18 21:14:09.5747] Slim::Plugin::Favorites::OpmlFavorites::findUrl (414) DK Slim::Networking::IO::Select /usr/share/perl5/Slim/Networking/IO/Select.pm 119 (eval)
[23-10-18 21:14:09.5748] Slim::Plugin::Favorites::OpmlFavorites::findUrl (414) DK Slim::Networking::IO::Select /usr/share/perl5/Slim/Networking/IO/Select.pm 169 Slim::Networking::IO::Select::__ANON__
[23-10-18 21:14:09.5749] Slim::Plugin::Favorites::OpmlFavorites::findUrl (414) DK Slim::Networking::IO::Select /usr/share/perl5/Slim/Networking/IO/Select.pm 169 (eval)
[23-10-18 21:14:09.5750] Slim::Plugin::Favorites::OpmlFavorites::findUrl (414) DK main /usr/sbin/squeezeboxserver 724 Slim::Networking::IO::Select::loop
[23-10-18 21:14:09.5751] Slim::Plugin::Favorites::OpmlFavorites::findUrl (414) DK main /usr/sbin/squeezeboxserver 674 main::idle
[23-10-18 21:14:09.5751] Slim::Plugin::Favorites::OpmlFavorites::findUrl (414) DK main /usr/sbin/squeezeboxserver 1211 main::main
Re #918 clicking on the album brings up the list of tracks for me.
Let me park some findings here while I try to clear my head dealing with other (more important? - sorry!) stuff.
Here are $args and $pt as sent to the Slim::Menu::BrowseLibrary::_tracks() call. First when coming from a favourite album entry:
(
{
"index" => undef,
isWeb => 1,
library_id => undef,
orderBy => undef,
params => undef,
quantity => 50,
search => undef,
wantIndex => 1,
wantMetadata => 1,
},
{
"join" => ["contributor"],
library_id => -1,
query => {
"contributor.name" => "Cat Stevens",
title => "Harold and Maude [Original Motion Picture Soundtrack]",
},
searchTags => ["album_id:5340", "library_id:-1"],
wantIndex => 1,
wantMetadata => 1,
},
)
Second when navigating a "normal" way like Artist/Album:
(
{
"index" => 0,
isControl => 1,
params => {
_index => 0,
_quantity => 50,
album_id => 5340,
artist_id => 8459,
feedMode => 1,
library_id => -1,
mode => "tracks",
release_type => "ALBUM,BOXSET,EP",
wantIndex => 1,
wantMetadata => 1,
},
quantity => 50,
},
{
library_id => -1,
searchTags => [
"artist_id:8459",
"album_id:5340",
"library_id:-1",
"release_type:ALBUM,BOXSET,EP",
],
wantIndex => 1,
wantMetadata => 1,
},
)
I'll have to figure out which of these numerous differences are causing the issue.
: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.
I might look at this soon!
EDIT: It seems that my comment below should have been posted against issue #919. For what it may be worth.
It sounds as if some of this may be relevant to you:
Be aware that if a feed has over 200 items and is passed to a SqueezePlay based player, S::C::XMLBrowser will split the feed into chunks of 200 items each. These are not necessarily sent/received consecutively.
Nevertheless, SqueezePlay does re-assemble them in the correct order, but I forget the details. In fact, I've probably forgotten quite a lot of details.
What Squeezeplay doesn't do quite right is handle the case where each chunk happens to have a differing set of $baseActions. Squeezeplay assumes that the $baseActions will be the same for the whole feed, and only reacts to the $baseActions from the last chunk received. That is not always a correct assumption. S::C::XMLBrowser figures out $baseActions chunk by chunk, and they can differ.
(I noticed this in the Podcast app some while ago, as a result of some strange handling of 'Touch to Play' items.)