Sorry about not being clear.

The goal is to call an -external application- that responds to a
specific URL scheme, a bit like you would call your default email client
using "mailto:";

What I meant by "call directly" was that I put my URL in the url key on
line 31 of the plugin.pm code : -url  => FM_BASEURL.'test',-
(this is a of course a proof of concept for the moment, I'll have to
append the track ID instead of 'test')


Code:
--------------------
    package Slim::Plugin::LMS2FM::Plugin;
  
  use strict;
  use base qw(Slim::Plugin::OPMLBased);
  use Slim::Schema;
  use Slim::Schema::Track;
  
  use constant FM_BASEURL => 
'fmp18://192.168.0.151/Music.fmp12?script=findtrack&param=';
  
  sub initPlugin {
        my $class = shift;
  
        $class->SUPER::initPlugin(
                tag    => 'lms2fm',
        );
        
        # Track Info item
        Slim::Menu::TrackInfo->registerInfoProvider( lms2fm => (
                after => 'top',
                func  => \&trackInfoHandler,
        ) );
  }
  
  sub getDisplayName { 'PLUGIN_LMS2FM_ACTION' }
  
  sub trackInfoHandler {
        
        return {
                name => 'Open in FileMaker',
                type => 'link',
                url  => FM_BASEURL.'test',
                favorites => 0,
        };
  }
  
  # Don't add this item to any menu
  # sub playerMenu { }
  
  1;
  
--------------------


------------------------------------------------------------------------
Stan Pulsar's Profile: http://forums.slimdevices.com/member.php?userid=6669
View this thread: http://forums.slimdevices.com/showthread.php?t=111851

_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/plugins

Reply via email to