Adding a new protocol handler
Paul Webster <Paul.Webster.a1sik0-NUepA2SMhDQqspMVqqL2D+4xXEVPTSb/[email protected]>
| Newsgroups | gmane.music.equipment.slimdevices.devel |
|---|---|
| Organization | Logitech Squeezebox Forums |
| Message-ID | <[email protected]> |
I am now looking at adding a protocol handler for one of my plugins - so
that I can have something like
radiogroup://station%20name
to play one
I have been reading
https://wiki.slimdevices.com/index.php/Design_of_new-streaming#Protocol_Handlers
and looked at some code in other plugins.
I can see that I need to call
Slim::Player::ProtocolHandlers->registerHandler with the protocol name
(radiogroup in this fake example) and the Perl package name as
parameters.
Some have done this by having a file
ProtocolHandler.pm and then having something like this in the code of
that module
Slim::Player::ProtocolHandlers->registerHandler('radiogroup',
__PACKAGE__);
I am trying something similar but not seeing my code get called.
So ... does LMS automatically look for
ProtocolHandler.pm
to load in on plugin startup or is there something else that I have to
do to get my ProtocolHandler.pm to be invoked?
Paul Webster
http://dabdig.blogspot.com
author of \"now playing\" plugins covering radio france (fip etc),
planetradio (bauer - kiss, absolute, scala, jazzfm etc), kcrw, supla
finland, abc australia, cbc/radio-canada and rte ireland
------------------------------------------------------------------------
Paul Webster's Profile: http://forums.slimdevices.com/member.php?userid=105
View this thread: http://forums.slimdevices.com/showthread.php?t=114593