Ok, I have no problem with a separate scanner.pm, even if it's only for
calling one subfunction. It would certainly be nice if Windows users get
no more errors. And then all the reasons you mentioned.

Hope you can help me with some questions:

on macOS I just successfully ran something like this:

PLUGIN.PM

Code:
--------------------
    use Plugins::RatingsLight::Scanner;
  ...
  sub initPlugin {
        my $class = shift;
        return if $initialised;
        $class->SUPER::initPlugin(@_);
  
        Slim::Music::Import->addImporter('Plugins::RatingsLight::Scanner', {
                'type' => 'post',
                'weight' => 99,
                'use' => 1,
        });
        initPrefs();
        initIR();
  ...
--------------------


And then the *scanner.pm* basically gets the startScan and the import
function:


Code:
--------------------
    sub startScan {
        my $enableautoscan = $prefs->get('autoscan');
        if (defined $enableautoscan) {
                importRatingsFromCommentTags();
        }
        Slim::Music::Import->endImporter(__PACKAGE__);
  }
  
  importRatingsFromCommentTags{...}
  
--------------------


But the scanner still calls InitIR() from the plugin.pm initPlugin
function which includes stuff the scanner can't deal with. That makes me
think it would still give the same error on Windows.

How do I tell the LMS scanner to just use the scanner.pm and that it
should ignore the contents of *plugin.pm* otherwise that's causing the
(Windows) problems?
Or is it the addImporter part? Do I have to move to scanner.pm too or
use something else entirely?
Thank you.


------------------------------------------------------------------------
afriend's Profile: http://forums.slimdevices.com/member.php?userid=39306
View this thread: http://forums.slimdevices.com/showthread.php?t=113344

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

Reply via email to