Re: The "favourites_url" not available to controllers where "favourites_type" is 'link'

expectingtofly <expectingtofly.a6uatb-NUepA2SMhDQqspMVqqL2D+4xXEVPTSb/[email protected]>
Newsgroups gmane.music.equipment.slimdevices.devel
Organization Logitech Squeezebox Forums
Message-ID <[email protected]>
philippe_44 wrote: 
> The different XMLBrowser.pm code are pretty hairy with crazy long
> function. It caused me more than a few headaches, especially when you
> want to make sure that all versions work properly. Good luck, let me
> know if I can help at some point

I've now had a dig through this.  I see what you mean, it's not the
easiest of code to follow.  Anyway, Ive got to the bottom of it.

In Slim::Control::XMLBrowser  the follow code means that the
favorites_url will only propagate through if the the item is playable
(audio or playlist)


Code:
--------------------
    
  if ($isPlayable) {
  my $presetParams = _favoritesParams($item);
  if ($presetParams && !$xmlBrowseInterimCM) {
  	  $hash{'presetParams'} = $presetParams;
  	  $presetFavSet = 1;
  }
  }
  
--------------------


This code is here :
https://github.com/Logitech/slimserver/blob/55f8e3f3d584baf6a3979a13fd23c7ef8e845d59/Slim/Control/XMLBrowser.pm#L1122

I don't believe this still needs to be the case in 8.2.0 with the new
ability for a favorites_url to resolve to any opml not necessarily
something that is playable, so if it is changed to always propagate
favorite_urls like so :


Code:
--------------------
    
   IF (MY $PRESETPARAMS = _FAVORITESPARAMS($ITEM)) {
  if ($presetParams && !$xmlBrowseInterimCM) {
  	  $hash{'presetParams'} = $presetParams;
  	  $presetFavSet = 1;
  }
  }
  
--------------------


That works fine, and material skin will display the favorites menu as
expected :
35579


For info the other XMLBrowser.pm : Slim::Web::XMLBrowser doesn't impose
any restriction of propagating favorites_url, so that works fine anyway
and does not need changing.

I guess I could raise a pull request, as I can't see why this needs to
remain as it is anymore?


+-------------------------------------------------------------------+
|Filename: Screenshot 2021-08-23 15.57.10.png                       |
|Download: http://forums.slimdevices.com/attachment.php?attachmentid=35579|
+-------------------------------------------------------------------+


Stuart McLean   

EXPECTINGTOFLY PLUGINS :
    
- *BBC Sounds* : 
  https://github.com/expectingtofly/LMS_BBC_Sounds_Plugin 
- *Virgin Radio (UK)* : 
  https://github.com/expectingtofly/LMS_Virgin_Radio_Plugin 
- *Times Radio* : 
  https://github.com/expectingtofly/LMS_TIMES_RADIO_PLUGIN 
- *Global Player (UK)* : 
  https://github.com/expectingtofly/LMS_GlobalPlayer_Plugin 
  
For BBC Sounds help see the 'BBC Sounds Wiki'
(https://github.com/expectingtofly/LMS_BBC_Sounds_Plugin/wiki).
------------------------------------------------------------------------
expectingtofly's Profile: http://forums.slimdevices.com/member.php?userid=63263
View this thread: http://forums.slimdevices.com/showthread.php?t=115012
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.