Re: Plugin URL prefix mapping?

expectingtofly <expectingtofly.a1djy0-NUepA2SMhDQqspMVqqL2D+4xXEVPTSb/[email protected]>
Newsgroups gmane.music.equipment.slimdevices.devel
Organization Logitech Squeezebox Forums
Message-ID <[email protected]>
cpd73 wrote: 
> For Material 2.4.2 I'm using a track's URL to map to its source. e.g.
> URL starting with "youtube:" maps to "YouTube". Currently I have a JSON
> file that maps these prefixes (URL schemes) to a displayable name. Is
> there a way for material to determine the URL prefixes used for all
> installed plugins? This way I can remove the JSON file and provide this
> mapping for a JSONRPC call - and when new plugins are created I don't
> have to manually update this mapping.
> 
> e.g. I'd like Material's Perl plugin code to be able to query for all
> active prefixes/schemes and create a mapping from these to the plugin
> name.


From a plugin I believe you would be able to get the list of registered
handlers from Slim::Player::ProtocolHandlers    registeredHandlers  :  
https://github.com/Logitech/slimserver/blob/0c754fc34201bae2c4105db800c5ca4bd1c5a200/Slim/Player/ProtocolHandlers.pm#L68

But that might not give you want you want as the the key, I think, will
be a regex, not necessarily a prefix.



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=114546
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.