PDA

View Full Version : Television.pm plug-in is DISABLED, no VERSION?



Bob Myers
2004-01-06, 15:45
I'm a new SqueezeBox owner. I downloaded the Television.pm plugin to
show TV listings. Everything was going well until I actually tried to
call up the plugin from the remote control; I am told via a message on
the box's display) that the plugin is "disabled" due to "missing version
number". I copied some version-related code from the latest version of
other plugins, but no joy. I scanned the Slimserver source to find
where this error was being generated but a grep through all the code
didn't find anything. I thought the problem might be that I needed to
run whack.pl but that didn't help either. Thoughts please.

--
Bob Myers

kdf
2004-01-06, 15:55
Quoting Bob Myers <rtm (AT) gol (DOT) com>:

> I'm a new SqueezeBox owner. I downloaded the Television.pm plugin to
> show TV listings. Everything was going well until I actually tried to
> call up the plugin from the remote control; I am told via a message on
> the box's display) that the plugin is "disabled" due to "missing version
> number". I copied some version-related code from the latest version of
> other plugins, but no joy. I scanned the Slimserver source to find
> where this error was being generated but a grep through all the code
> didn't find anything. I thought the problem might be that I needed to
> run whack.pl but that didn't help either. Thoughts please.

This seems like you have navigated to the Settings -> Information menu to look
at plugin information. This is showing that in the server, you have
Television.pm disabled, and that the plugin does not contian a version number to
report. It should still work without a version number.

Go into server settings, advanced server settings, interface. you should see a
section for "Home Menu Customization" Under inactive menus, if you see Plugins,
click the "add" link. This will add the Plugins menu to the player. Now you
should see a menu item for Plugins in when you scroll up/down with the remote
from the Home menu.

To enable the plugin, go into server settings, advanced server settings, click
on the plugins link from teh list of 8 items (Interace, Behavior, Formatting,
Security, Performance, Network, Debugging, Plugins. Make sure the checkbox next
to "tv listings" is checked and click the "change" button. This will enable the
television plugin.

If you have done all of this, and it is still not working, then the server might
have blocked the plugin due to another error. The plugin requires taht
XML::Simple is installed. You can search for this at Cpan.org and save to
Plugins/XML/Simple.pm or if you have a perl command line setup, run: perl -MCPAN
-e 'install XML::Simple'

Hope that helps,
-kdf

Bob Myers
2004-01-07, 01:00
Dear kdf, thanks for your help so far.

kdf wrote on Tuesday, January 06, 2004 2:55 PM:

> Quoting Bob Myers <rtm (AT) gol (DOT) com>:
>
>> I'm a new SqueezeBox owner. I downloaded the Television.pm plugin to
>> show TV listings. Everything was going well until I actually tried
>> to call up the plugin from the remote control; I am told via a
>> message on the box's display) that the plugin is "disabled" due to
>> "missing version number". I copied some version-related code from
>> the latest version of other plugins, but no joy. I scanned the
>> Slimserver source to find where this error was being generated but a
>> grep through all the code didn't find anything. I thought the
>> problem might be that I needed to run whack.pl but that didn't help
>> either. Thoughts please.
>
> This seems like you have navigated to the Settings -> Information
> menu to look at plugin information. This is showing that in the
> server, you have Television.pm disabled, and that the plugin does not
> contian a version number to report. It should still work without a
> version number.

I see. I thought it was disabled *because* of no version info, but now
I realize that being disabled and having no version info are separate
issues.

> Go into server settings, advanced server settings, interface. you
> should see a section for "Home Menu Customization" Under inactive
> menus, if you see Plugins, click the "add" link. This will add the
> Plugins menu to the player. Now you should see a menu item for
> Plugins in when you scroll up/down with the remote from the Home menu.

I did that. It worked OK, of course. However, the Plugins menu does
not show Television as an option. I suppose this is because it is
disabled for whatever reason.

> To enable the plugin, go into server settings, advanced server
> settings, click on the plugins link from teh list of 8 items
> (Interace, Behavior, Formatting, Security, Performance, Network,
> Debugging, Plugins. Make sure the checkbox next to "tv listings" is
> checked and click the "change" button. This will enable the
> television plugin.

Had already done that.

> If you have done all of this, and it is still not working, then the
> server might have blocked the plugin due to another error. The
> plugin requires that XML::Simple is installed. You can search for
> this at Cpan.org and save to Plugins/XML/Simple.pm or if you have a
> perl command line setup, run: perl -MCPAN -e 'install XML::Simple'

I did that. It still didn't work. I also tried putting an XML
directory containing Simple.pm under the CPAN directory. (I am running
SlimServer under Windows XP :-( .) Also no luck.

Basic question: is there some environment in which I can run these
plugins to see their error messages within the SlimServer context, or
otherwise debug them? I would have hoped that the Debug window would
have displayed something useful, but it didn't.

Thanks in advance.

--
Bob Myers

kdf
2004-01-07, 02:20
Quoting Bob Myers <rtm (AT) gol (DOT) com>:


> Basic question: is there some environment in which I can run these
> plugins to see their error messages within the SlimServer context, or
> otherwise debug them? I would have hoped that the Debug window would
> have displayed something useful, but it didn't.

you need some way of seeing the --d_plugins debug output while the server is
starting up. Unfortunately, I have only ever used the perl version of the
server to do this. If you install activestate perl and run slimserver.pl
--d_plugins from a command session, you should see the problem.

-kdf

Simon
2004-01-07, 11:02
On Wed, Jan 07, 2004 at 12:00:46AM -0800, Bob Myers wrote:
> Dear kdf, thanks for your help so far.
>
> kdf wrote on Tuesday, January 06, 2004 2:55 PM:
>
> > Quoting Bob Myers <rtm (AT) gol (DOT) com>:
> >
> >> I'm a new SqueezeBox owner. I downloaded the Television.pm plugin to
> >> show TV listings. Everything was going well until I actually tried
> >> to call up the plugin from the remote control; I am told via a
> >> message on the box's display) that the plugin is "disabled" due to
> >> "missing version number". I copied some version-related code from
> >> the latest version of other plugins, but no joy. I scanned the
> >> Slimserver source to find where this error was being generated but a
> >> grep through all the code didn't find anything. I thought the
> >> problem might be that I needed to run whack.pl but that didn't help
> >> either. Thoughts please.

I ran into the same problem trying to get Television.pm running today.
A couple of points; Television.pm needed to be whacked with whack.pl
included with the server. whack.pl seems to have fallen under the evil
influence of windows and adds both carriage return and line feed for
newlines. After running whack.pl i also needed to strip the carriage
returns, otherwise perl complained about the strings defined in the
__DATA__ section of the plugin. On an ordinary *nix box this can be done
multiple ways, the easiest probably being either the 'dos2unix' utility
or running the file through 'tr -d "\r"'. I have no idea if this affects
SlimServer running under windows, a quick google would probably bring up
a windows utility to strip carriage returns if it's needed.

After that was done the plugin loaded fine.
Another point i noticed though is that the plugin requires <channel>
sections for each channel in the xml file generated by xmltv. The
channel sections aren't mandatory in the dtd and the grabber i was using
wasn't generating them, so that might be something to check if the
Television plugin isn't finding any programs.

--
Simon

Simon
2004-01-07, 15:06
Replying to myself.
I've put a modified version of the television plugin at:
http://lilith.routemeister.net/~simius/Television.pm

Fixes:
* Whacked with whack.pl.
* Carriage returns stripped.
* Added a config option for 12/24 hour time format, as a non-american
the AM/PM stuff is just confusing.
* Fixed to work with xmltv generated xml files that don't have <channel>
tags. When the xml file is parsed any channels that aren't defined in
a <channel> section are grabbed from the <programme> sections. The
names aren't as nice but seem to be generally good enough.

I don't usually do perl but the changes were fairly trivial and it Works
For Me(tm). Give it a try if you like.

I couldn't find a contact email-address for the original author but with
a little luck he reads this list.

--
Simon

kdf
2004-01-07, 15:18
Quoting Simon <lists (AT) routemeister (DOT) net>:

> Replying to myself.
> I've put a modified version of the television plugin at:
> http://lilith.routemeister.net/~simius/Television.pm
>
> Fixes:
> * Whacked with whack.pl.
> * Carriage returns stripped.
> * Added a config option for 12/24 hour time format, as a non-american
> the AM/PM stuff is just confusing.
> * Fixed to work with xmltv generated xml files that don't have <channel>
> tags. When the xml file is parsed any channels that aren't defined in
> a <channel> section are grabbed from the <programme> sections. The
> names aren't as nice but seem to be generally good enough.
>
> I don't usually do perl but the changes were fairly trivial and it Works
> For Me(tm). Give it a try if you like.
>
> I couldn't find a contact email-address for the original author but with
> a little luck he reads this list.
>

cool. I'm a 24h clock fan myself.

I'm confused over whack.pl causing line ending changes. I've used it on linux
before for converting all my plugins without any troubles. Could the line
endings have started off messed up? The tool simply substitutes text within
existing lines and copies the rest from one file to another.

-kdf

Simon
2004-01-07, 18:19
On Wed, Jan 07, 2004 at 02:18:49PM -0800, kdf wrote:
> cool. I'm a 24h clock fan myself.
>
> I'm confused over whack.pl causing line ending changes. I've used it on linux
> before for converting all my plugins without any troubles. Could the line
> endings have started off messed up? The tool simply substitutes text within
> existing lines and copies the rest from one file to another.

You're right, Television.pl did in fact use \r\n for line breaks before
whack.pl ever touched it. What confused me was that whack.pl actually
strips the carriage return (\r) on lines where the string being
substituted is at the end of the line. This left the converted
Television.pm with certain lines ending in \r\n and some just with \n,
which lead to vim displaying all \r:s while editing since the file now
used a mixed format.
It probably wouldn't be a bad idea to have whack.pl strip all carriage
returns in the name of portability, but that's a slightly different
topic.

Either way, for *nix boxes Television.pm was broken due to the CRLF
issue (amoungst other stuff) before whack.pl ever touched it, whack.pl
wasn't to blame.

--
Simon