Re: Adding a new protocol handler
afriend <afriend.abgryn-NUepA2SMhDQqspMVqqL2D+4xXEVPTSb/[email protected]>
| Newsgroups | gmane.music.equipment.slimdevices.devel |
|---|---|
| Organization | Logitech Squeezebox Forums |
| Message-ID | <[email protected]> |
mherger wrote:
> > 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?
>
> No, you'll have to do it in your Plugin.pm. I'd register there, and LMS
>
> will then load the protocol handler if needed.
So you can register it in ProtocolHandler.pm and put -use
Plugins::myPluginName::ProtocolHandler;- in Plugin.pm - or register it
right there in Plugin.pm.
Does it make a difference (ressources, etc.) or is the 'proper' way to
do it more like a convention?
*Plugin repositories:* 'Ratings Light'
(https://github.com/AF-1/lms-ratingslight) 'Visual Statistics'
(https://github.com/AF-1/lms-visualstatistics) 'Use Comment Tag
Info' (https://github.com/AF-1/lms-usecommenttaginfo) 'Dynamic
Playlists 3 FAQ' (https://github.com/AF-1/lms-dynamicplaylists#faq)
'Custom Skip 3 FAQ' (https://github.com/AF-1/lms-customskip#faq)
------------------------------------------------------------------------
afriend's Profile: http://forums.slimdevices.com/member.php?userid=39306
View this thread: http://forums.slimdevices.com/showthread.php?t=114593
_______________________________________________
developers mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/developers