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