Home of the Squeezebox™ & Transporter® network music players.
Page 2 of 4 FirstFirst 1234 LastLast
Results 11 to 20 of 38
  1. #11
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    20,749

    When developing a plugin,where should I put it in the Docker container?

    >> <importmodule>Plugins::SimpleLibraryViews::Plugi n</importmodule>
    >
    > Will that be picked up just by dropping the module source into
    > /config/cache/Plugins? Or does the server need to 'install' the module
    > to pick that up?


    This line will cause the scanner to call
    Plugins::SimpleLibraryViews::Plugin->initPlugin(). But it will NOT
    automatically create a scan task. Therefore you should call
    Slim::Music::Import->addImporter() to tell the scanner that you have an
    importer, what type it is (file importer, post processing etc.), and how
    to call it.

    See eg.
    https://github.com/Logitech/slimserv...braries.pm#L18

  2. #12
    Senior Member
    Join Date
    May 2005
    Location
    UK
    Posts
    845
    What I don't understand is why the existing plugin works just fine on my 'real' LMS (which is up-to-date I believe).

    Doesn't the 'scannerCB' parameter of 'Slim::Music::VirtualLibraries->registerLibrary' handle that (causing the library to be updated during a scan)?

    Andy

  3. #13
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    20,749

    When developing a plugin,where should I put it in the Docker container?

    > What I don't understand is why the existing plugin works just fine on my
    > 'real' LMS (which is up-to-date I believe).


    Ah, ok, then there must be something else going on.

    What's the difference between the two installations again? No code change?

  4. #14
    Senior Member
    Join Date
    May 2005
    Location
    UK
    Posts
    845
    Installation 1 is a Debian VM with LMS installed from the Debian package. It has my plugin installed 'correctly' by ticking the box in the Plugins section to get it from the repo.

    Installation 2 is a Docker install. My (newly modified) plugin is copied into /lms/cache/Plugins. I pasted the file layout above. I've made changes to the plugin, but not (I believe) to the 'core' code, only the code that decides whether a particular track is part of the library or not. I'll try reverting this to the released code but copied in to LMS in the same way.

    Is the manual copy method likely to cause any difference in the way the plugin registers itself?

    I should probably add that if I allow the scan to happen at server startup, then the code seems to work as expected. However, this is inhibited as other it delays the startup of the server considerably.

    All code is available at https://github.com/adhawkins/SimpleLibraryViews

    The 'master' branch is the released code which is working on installation 1. The contents of the 'recurse' branch is the code I'm currently working on. Any chance you could find time to take a look at the code? It hasn't changed much since what is released, so unless I've done something stupid it should work the same way.

    Andy

  5. #15
    Senior Member
    Join Date
    May 2005
    Location
    UK
    Posts
    845
    Ok, I've put the 'release' code in place in the same way (in the docker container) and I'm seeing the behaviour. So it's either:

    1. The version of LMS running in the Docker container is newer than the one in my VM
    2. There's an issue with the way I've installed the plugin in the container


    The docker container reports version Logitech Media Server Version: 8.2.1 - 1649774087 @ Tue Apr 12 17:18:03 CEST 2022
    The VM reports Logitech Media Server Version: 8.2.0 - 1627922070 @ Tue Aug 3 11:37:35 CEST 2021

    Are there likely to have been any changes between those two? I thought I was checking for new Debian packages, but obviously I haven't updated it since around August last year. Is this likely to be an issue?

    Anyone?

    Andy
    Last edited by adhawkins; 2022-05-17 at 11:08.

  6. #16
    Senior Member
    Join Date
    May 2005
    Location
    UK
    Posts
    845
    Just pulled the 8.2.0 tag in the container, and seeing the same behaviour. There's no evidence of my plugin code being called at all during the scanning process. I suspect some kind of installation issue perhaps?

    Will try installing the released plugin using the installer in LMS and see if that behaves any differently. I'm confused though!

    Andy

  7. #17
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    20,749
    Do you have the same set of plugins in both installations?
    Michael

    "It doesn't work - what shall I do?" - "Please check your server.log and/or scanner.log file!"
    (LMS: Settings/Information)

  8. #18
    Senior Member
    Join Date
    May 2005
    Location
    UK
    Posts
    845
    Not necessarily. Is that likely to affect it?

    Andy

  9. #19
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    20,749
    Quote Originally Posted by adhawkins View Post
    Not necessarily. Is that likely to affect it?
    I wouldnĺt say likely, but I wouldnĺt rule it out.
    Michael

    "It doesn't work - what shall I do?" - "Please check your server.log and/or scanner.log file!"
    (LMS: Settings/Information)

  10. #20
    Senior Member
    Join Date
    Apr 2005
    Location
    UK/London
    Posts
    5,991
    Could it be confused by having (once had) the original plugin with the same name in the Cache/InstalledPlugins area?
    Paul Webster
    Author of "Now Playing" plugins covering Radio France (FIP etc), PlanetRadio (Bauer - Kiss, Absolute, Scala, JazzFM etc), KCRW, ABC Australia and CBC/Radio-Canada
    and, via the extra "Radio Now Playing" plugin lots more - see https://forums.slimdevices.com/showt...Playing-plugin

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •