PDA

View Full Version : Plugins



Daniel Cohen
2004-04-21, 01:33
I'm having trouble loading plugins, and am wondering what I am doing
wrong. I use Mac OS X and there are two places where one can put the
plugins. One is inside the SlimServer package, the other is in
~/Library/SlimDevices/Plugins. The latter is the preferred option, as
it gets preserved on an update, whereas I assume the former does not.

Anyway, my two plugins in the Library don't seem to be recognised by
the player. They appear under Server Settings in a web browser, and
can be checked and unchecked. But even after starting and stopping
the SlimServer, they don't appear in the Plugins menu on the
Squeezebox.
--
Daniel Cohen

Daniel Cohen
2004-04-21, 09:18
On 21/4/04 at 9:33 am +0100, Daniel Cohen wrote
>I'm having trouble loading plugins, and am wondering what I am doing
>wrong. I use Mac OS X and there are two places where one can put the
>plugins. One is inside the SlimServer package, the other is in
>~/Library/SlimDevices/Plugins. The latter is the preferred option,
>as it gets preserved on an update, whereas I assume the former does
>not.
>
>Anyway, my two plugins in the Library don't seem to be recognised by
>the player. They appear under Server Settings in a web browser, and
>can be checked and unchecked. But even after starting and stopping
>the SlimServer, they don't appear in the Plugins menu on the
>Squeezebox.

Later I noticed that the items could be added under "Home Menu
Customization". However, this gave me two problems, presumably
related. The first is that they appeared in the main menu on the
Squeezebox rather than in the Plugins submenu, the second is that
when I tried to use either of them, I got the message "lost contact
with server" and in fact I found that the Slimserver had stopped.

On a totally different topic, today's "Guardian" (once called
"Machester Guardian" to those who don't know) had an article on
melodeons, which began by using the name "squeezebox" for them.
--
Daniel Cohen

kdf
2004-04-21, 09:38
Quoting Daniel Cohen <danco (AT) f2s (DOT) com>:

> On 21/4/04 at 9:33 am +0100, Daniel Cohen wrote
> >I'm having trouble loading plugins, and am wondering what I am doing
> >wrong. I use Mac OS X and there are two places where one can put the
> >plugins. One is inside the SlimServer package, the other is in
> >~/Library/SlimDevices/Plugins. The latter is the preferred option,
> >as it gets preserved on an update, whereas I assume the former does
> >not.
> >
> >Anyway, my two plugins in the Library don't seem to be recognised by
> >the player. They appear under Server Settings in a web browser, and
> >can be checked and unchecked. But even after starting and stopping
> >the SlimServer, they don't appear in the Plugins menu on the
> >Squeezebox.
>
> Later I noticed that the items could be added under "Home Menu
> Customization". However, this gave me two problems, presumably
> related. The first is that they appeared in the main menu on the
> Squeezebox rather than in the Plugins submenu, the second is that
> when I tried to use either of them, I got the message "lost contact
> with server" and in fact I found that the Slimserver had stopped.
>

Run the server form the command line (slimserver.pl --d_plugins for linux/osx or
c:\program files\slimserver\server\slim.exe --d_plugins). The debug message
will explain why the plugins are not valid, thus cause a crash when you try to
use them.

There are TWO ways to access plugins from the player interface. If you have tem
enabled, they will appear in the PLUGINS menu, or you can add them to the HOME
menu. BOTH will ONLY work if the plugin is loaded and workign properly. Many
plugins require other Perl modules to be installed in order to work.
Shoutcastbrowser was a famous one. It sfar nicer that it is now included with
the server so that the server can include all the needed extras.

0kdf

Daniel Cohen
2004-04-21, 10:15
On 21/4/04 at 9:38 am -0700, kdf wrote
>Run the server form the command line (slimserver.pl --d_plugins for linux/osx

I had to juggle a bit with paths before this worked under OS X. I
vaguely understand Unix, but am not familiar with it.

The terminal returned

2004-04-21 18:06:38.1380 Requiring Plugins::DateTime plugin.
2004-04-21 18:06:38.1533 Registering screensaver Datetime Screensaver
2004-04-21 18:06:38.1580 Requiring Plugins::Snow plugin.
2004-04-21 18:06:38.2288 Registering screensaver Snow Screensaver
2004-04-21 18:06:38.2339 Requiring Plugins::SavePlaylist plugin.
2004-04-21 18:06:38.2584 Requiring Plugins::Rescan plugin.
2004-04-21 18:06:38.2750 Requiring Plugins::Shooter plugin.
2004-04-21 18:06:38.4186 Requiring Plugins::XSync plugin.
2004-04-21 18:06:38.4277 Can't require Plugins::XSync for Plugins
menu: Plugins/XSync.pm did not return a true value at (eval 31) line
3.
2004-04-21 18:06:38.4296 Requiring Plugins::NewShoutcastBrowser plugin.
2004-04-21 18:06:38.5584 Can't require Plugins::NewShoutcastBrowser
for Plugins menu: Plugins/NewShoutcastBrowser.pm did not return a
true value at (eval 32) line 3.
2004-04-21 18:06:38.5602 Requiring Plugins::SlimTris plugin.
2004-04-21 18:06:38.5836 Requiring Plugins::ShoutcastBrowser plugin.
2004-04-21 18:06:38.7202 Registering screensaver Now Playing (Jump
back on wake.)
Use of uninitialized value in string eq at
/System/Library/Perl/5.8.1/File/Spec/Unix.pm line 77, <PLIST> line 75.
Use of uninitialized value in string eq at
/System/Library/Perl/5.8.1/File/Spec/Unix.pm line 77.

NewShoutcastBrowser is the latest version of the plugin, renamed by
me to help distinguish it from the one that comes with SlimServer.

Both plugins show up in the Web Browser menu, which somewhat confused
me - I thought they wouldn't show if they weren't properly working.

--
Daniel Cohen

kdf
2004-04-21, 11:15
Hopefully when you renamed the NewShoutcastBrowser, you also edited the line in
the file to read:
package Plugins::NewShoutcastBrowser;

Other than that, I can confirm that those errors are why you can't access teh
plugins properly. They are not an error message that I am familiar with,
however, so I can't suggest an exact fix. I would think it is complaining about
the package lines in both. Something about the attempt to validate the plugin
is failing. Sorry I cannot be more specific.

-kdf

Quoting Daniel Cohen <danco (AT) f2s (DOT) com>:

> On 21/4/04 at 9:38 am -0700, kdf wrote
> >Run the server form the command line (slimserver.pl --d_plugins for
> linux/osx
>
> I had to juggle a bit with paths before this worked under OS X. I
> vaguely understand Unix, but am not familiar with it.
>
> The terminal returned
>
> 2004-04-21 18:06:38.1380 Requiring Plugins::DateTime plugin.
> 2004-04-21 18:06:38.1533 Registering screensaver Datetime Screensaver
> 2004-04-21 18:06:38.1580 Requiring Plugins::Snow plugin.
> 2004-04-21 18:06:38.2288 Registering screensaver Snow Screensaver
> 2004-04-21 18:06:38.2339 Requiring Plugins::SavePlaylist plugin.
> 2004-04-21 18:06:38.2584 Requiring Plugins::Rescan plugin.
> 2004-04-21 18:06:38.2750 Requiring Plugins::Shooter plugin.
> 2004-04-21 18:06:38.4186 Requiring Plugins::XSync plugin.
> 2004-04-21 18:06:38.4277 Can't require Plugins::XSync for Plugins
> menu: Plugins/XSync.pm did not return a true value at (eval 31) line
> 3.
> 2004-04-21 18:06:38.4296 Requiring Plugins::NewShoutcastBrowser plugin.
> 2004-04-21 18:06:38.5584 Can't require Plugins::NewShoutcastBrowser
> for Plugins menu: Plugins/NewShoutcastBrowser.pm did not return a
> true value at (eval 32) line 3.
> 2004-04-21 18:06:38.5602 Requiring Plugins::SlimTris plugin.
> 2004-04-21 18:06:38.5836 Requiring Plugins::ShoutcastBrowser plugin.
> 2004-04-21 18:06:38.7202 Registering screensaver Now Playing (Jump
> back on wake.)
> Use of uninitialized value in string eq at
> /System/Library/Perl/5.8.1/File/Spec/Unix.pm line 77, <PLIST> line 75.
> Use of uninitialized value in string eq at
> /System/Library/Perl/5.8.1/File/Spec/Unix.pm line 77.
>
> NewShoutcastBrowser is the latest version of the plugin, renamed by
> me to help distinguish it from the one that comes with SlimServer.
>
> Both plugins show up in the Web Browser menu, which somewhat confused
> me - I thought they wouldn't show if they weren't properly working.
>
> --
> Daniel Cohen
>

Daniel Cohen
2004-04-21, 13:19
I seem to have solved the problem. It was something to do with the
way I got the plugins onto my hard drive, possibly an issue of white
space (CR or LF or extra spaces), and perhaps only occurring on a Mac.

What I had done at first, which did not work, was to copy the file
(which after all is a plain text file) and paste it into a text
editor. I saved the file with the right name and extension, but this
just didn't work.

What did work was simply saving the page to disk. I still needed to
give it the extension .pm
--
Daniel Cohen

kdf
2004-04-21, 13:24
Quoting Daniel Cohen <danco (AT) f2s (DOT) com>:

> I seem to have solved the problem. It was something to do with the
> way I got the plugins onto my hard drive, possibly an issue of white
> space (CR or LF or extra spaces), and perhaps only occurring on a Mac.
>
> What I had done at first, which did not work, was to copy the file
> (which after all is a plain text file) and paste it into a text
> editor. I saved the file with the right name and extension, but this
> just didn't work.
>
> What did work was simply saving the page to disk. I still needed to
> give it the extension .pm

ah yes. They are VERY dependant on whitepace. Tabs and spaces are not
interchangeable for localisation strings, for example. Line endings can also
make a mess of things in certain cases.

Glad its working now :)
-kdf