Bug 1339 - current rss feed not set
: current rss feed not set
Status: CLOSED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Plugin
: 6.0.0
: PC All
: P2 normal (vote)
: ---
Assigned To: Dave Cohen
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-04-08 12:12 UTC by Dave Cohen
Modified: 2008-08-18 10:54 UTC (History)
1 user (show)

See Also:
Category: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dave Cohen 2005-04-08 12:12:04 UTC
The Rss News plugin causes messages like this to be repeatedly entered in the log...

2005-04-01 16:45:42.5880 current rss feed not set\n2005-04-01
16:45:42.5990 Backtrace:

   frame 0: Slim::Utils::Misc::assert
(C:/PROGRA~1/SLIMSE~1/server/Plugins/RssNews.pm line 628)
   frame 1: Plugins::RssNews::lines
(/PerlApp/Slim/Player/SqueezeboxG.pm line 622)
   frame 2: Slim::Player::SqueezeboxG::scrollUpdate
(/PerlApp/Slim/Utils/Timers.pm line 62)
   frame 3: Slim::Utils::Timers::checkTimers (slimserver.pl line 611)
   frame 4: main::idle (slimserver.pl line 549)
   frame 5: main::main (slimserver.pl line 61)
   frame 6: PerlSvc::Interactive (perlsvc line 1208)
   frame 7: PerlSvc::_interactive (slimserver.pl line 0)
   frame 8: (eval) (slimserver.pl line 0)
Comment 1 Dave Cohen 2005-04-08 12:15:50 UTC
The problem is a combination of Rss parsing and server prefs parsing.

Some Rss feeds have newlines preceeding title elements.  The Rss news reader,
unfortunately is not trimming those.

When a new feed is added, its title is saved as a pref.  When that title has a
newline preceeding it, the newline is saved to the prefs file.

Next time the server starts up, it sees that newline as the first thing on the
prefs line, and the pref is unset.  That leads to the bug.

The fix is to trim the title in the Rss News reader when it is first read.
Comment 2 Dave Cohen 2005-04-08 12:43:22 UTC
Attaching RssNews.pm with fix.

Also checked in as revision 2913.

Roy, please unresolve the bug if you find this does not solve the problem.  Thanks.
Comment 3 Roy Owen 2005-04-17 03:44:38 UTC
I still get the log entries:

2005-04-17 06:40:19.3850 Requiring Plugins::Picks plugin.
2005-04-17 06:40:19.4193 Requiring Plugins::Rescan plugin.
2005-04-17 06:40:19.4480 Requiring Plugins::MusicMagic::Plugin plugin.
2005-04-17 06:40:19.4976 Requiring Plugins::Visualizer plugin.
2005-04-17 06:40:19.5232 Requiring Plugins::ShoutcastBrowser plugin.
2005-04-17 06:40:19.6099 Requiring Plugins::AlarmPlugin plugin.
2005-04-17 06:40:19.6482 Requiring Plugins::DateTime::Plugin plugin.
2005-04-17 06:40:19.6713 Requiring Plugins::RadioIO plugin.
2005-04-17 06:40:19.6971 Requiring Plugins::RadioIO::Plugin plugin.
Subroutine new redefined at C:/Program
Files/SlimServer/server/Plugins/RadioIO/Plugin.pm line 198.
2005-04-17 06:40:19.7220 Requiring Plugins::Podcast::Plugin plugin.
2005-04-17 06:40:19.8699 Requiring Plugins::SavePlaylist plugin.
2005-04-17 06:40:19.9071 Requiring Plugins::AlarmPlugin2 plugin.
2005-04-17 06:40:19.9518 Requiring Plugins::SlimTris plugin.
2005-04-17 06:40:19.9805 Requiring Plugins::MoodLogic::Plugin plugin.
2005-04-17 06:40:20.0599 Requiring Plugins::Picks::Plugin plugin.
2005-04-17 06:40:20.0886 Requiring Plugins::iTunes plugin.
2005-04-17 06:40:20.1337 Requiring Plugins::RssNews plugin.
2005-04-17 06:40:20.1877 Requiring Plugins::Shooter plugin.
2005-04-17 06:40:20.2011 Can't load plugin Plugins::Shooter - not 6.0+ compatible.
2005-04-17 06:40:20.2014 Requiring Plugins::Live365 plugin.
2005-04-17 06:40:20.2747 Requiring Plugins::ShoutcastBrowser::Plugin plugin.
2005-04-17 06:40:20.3643 PLUGINS does not exist. creating...
2005-04-17 06:40:20.3646 Adding Picks to menu: RADIO
2005-04-17 06:40:20.3647 RADIO does not exist. creating...
2005-04-17 06:40:20.3651 Adding ShoutcastBrowser to menu: RADIO
2005-04-17 06:40:20.3655 Adding RadioIO to menu: RADIO
2005-04-17 06:40:20.3657 Adding RadioIO::Plugin to menu: RADIO
2005-04-17 06:40:20.3662 Adding Picks::Plugin to menu: RADIO
2005-04-17 06:40:20.3666 SCREENSAVERS does not exist. creating...
2005-04-17 06:40:20.3667 Adding RssNews to menu: PLUGINS
2005-04-17 06:40:20.3669 Adding Live365 to menu: RADIO
2005-04-17 06:40:20.3672 Adding ShoutcastBrowser::Plugin to menu: RADIO
2005-04-17 06:40:20.3753 Registering screensaver PLUGIN_SCREENSAVER_DATETIME
2005-04-17 06:40:20.3761 Registering screensaver PLUGIN_RSSNEWS_SCREENSAVER
2005-04-17 06:40:20.3953 Podcast Plugin initializing.
2005-04-17 06:40:20.3960 Podcast Feed Info:
2005-04-17 06:40:20.3962 Amplified, http://feeds.feedburner.com/amplified
2005-04-17 06:40:20.3962 Vinyl, http://vinyl.codyhanson.com/wp-rss2.php
2005-04-17 06:40:20.3963 
2005-04-17 06:40:20.3969 RSS Feed Info:
2005-04-17 06:40:20.3970 , http://www.nws.noaa.gov/data/current_obs/KIPT.rss 
2005-04-17 06:40:20.3971 
2005-04-17 06:40:23.2339 RssNews: display_current not set!
2005-04-17 06:40:23.2341 RssNews: feed order:

2005-04-17 06:40:23.2343 RssNews: display_current not set!
2005-04-17 06:40:23.2344 RssNews: feed order:

2005-04-17 06:40:23.2345 RssNews: getting feed from
http://www.nws.noaa.gov/data/current_obs/KIPT.rss
2005-04-17 06:40:23.2349 Opening connection to
http://www.nws.noaa.gov/data/current_obs/KIPT.rss: [www.nws.noaa.gov on port 80
with path /data/current_obs/KIPT.rss with timeout 5]
2005-04-17 06:40:23.4494 Request: GET /data/current_obs/KIPT.rss HTTP/1.0

Host: www.nws.noaa.gov

User-Agent: iTunes/3.0 (MSWin32; SlimServer 6.1.0)

Accept: */*

Cache-Control: no-cache

Connection: close

Icy-MetaData:1



2005-04-17 06:40:23.5245 Response: HTTP/1.0 200 OK

2005-04-17 06:40:23.5258 header: Server: Apache/2.0.46 (Red Hat)

2005-04-17 06:40:23.5272 header: Last-Modified: Sun, 17 Apr 2005 10:40:24 GMT

2005-04-17 06:40:23.5281 header: ETag: "80338-4c6-80b77600"

2005-04-17 06:40:23.5289 header: Content-Type: text/xml

2005-04-17 06:40:23.5296 header: Vary: User-Agent

2005-04-17 06:40:23.5306 header: Expires: Sun, 17 Apr 2005 10:40:26 GMT

2005-04-17 06:40:23.5315 header: Cache-Control: max-age=0, no-cache

2005-04-17 06:40:23.5322 header: Pragma: no-cache

2005-04-17 06:40:23.5332 header: Date: Sun, 17 Apr 2005 10:40:26 GMT

2005-04-17 06:40:23.5343 header: Content-Length: 1222

2005-04-17 06:40:23.5350 header: Connection: close

2005-04-17 06:40:23.5355 header: 

2005-04-17 06:40:23.5356 Recieved final blank line...
2005-04-17 06:40:23.5357 opened stream!
2005-04-17 06:40:23.5463 current rss feed not set
2005-04-17 06:40:23.5568 Backtrace:

   frame 0: Slim::Utils::Misc::assert (C:/Program
Files/SlimServer/server/Plugins/RssNews.pm line 641)
   frame 1: Plugins::RssNews::lines (C:/Program
Files/SlimServer/server/Plugins/RssNews.pm line 616)
   frame 2: Plugins::RssNews::autoScrollTimer (C:/Program
Files/SlimServer/server/Plugins/RssNews.pm line 779)
   frame 3: Plugins::RssNews::setScreensaverRssNewsMode
(/PerlApp/Slim/Buttons/Common.pm line 1048)
   frame 4: Slim::Buttons::Common::pushMode
(/PerlApp/Slim/Buttons/ScreenSaver.pm line 107)
   frame 5: Slim::Buttons::ScreenSaver::screenSaver
(/PerlApp/Slim/Utils/Timers.pm line 100)
   frame 6: Slim::Utils::Timers::checkTimers (slimserver.pl line 627)
   frame 7: main::idle (slimserver.pl line 565)
   frame 8: main::main (slimserver.pl line 61)
   frame 9: PerlSvc::Interactive (perlsvc line 1208)
   frame 10: PerlSvc::_interactive (slimserver.pl line 0)
   frame 11: (eval) (slimserver.pl line 0)

Here's the problem. C:/Program Files/SlimServer/server/Plugins/RssNews.pm, line 641:

631	}
632	
633	sub lines {
634	    #This returns the 2 lines to display on the unit 
635	    my $client = shift;
636	    my $lineref;
637	    my $now = time();
638	
639		# the current RSS feed
640		my $display_current = $client->param('PLUGIN.RssNews.display_current');
641		assert($display_current, "current rss feed not set\n");
642	
643		# the current item within each feed.
644		my $display_current_items =
$client->param('PLUGIN.RssNews.display_current_items');
645	
646		#remember which item in feed we are currently showing
647		# this will be stored on a per-client basis
648		if (!defined ($display_current_items)) {
649			$display_current_items = {$display_current => {'next_item' => 0}};
650		} elsif (!defined($display_current_items->{$display_current})) {
651			$display_current_items->{$display_current} = {'next_item' => 0};

2005-04-17 06:40:23.5596 current rss feed not set
2005-04-17 06:40:23.5699 Backtrace:

   frame 0: Slim::Utils::Misc::assert (C:/Program
Files/SlimServer/server/Plugins/RssNews.pm line 641)
   frame 1: Plugins::RssNews::lines (/PerlApp/Slim/Display/Display.pm line 120)
   frame 2: Slim::Display::Display::curLines
(/PerlApp/Slim/Player/SqueezeboxG.pm line 147)
   frame 3: Slim::Player::SqueezeboxG::update
(/PerlApp/Slim/Buttons/ScreenSaver.pm line 113)
   frame 4: Slim::Buttons::ScreenSaver::screenSaver
(/PerlApp/Slim/Utils/Timers.pm line 100)
   frame 5: Slim::Utils::Timers::checkTimers (slimserver.pl line 627)
   frame 6: main::idle (slimserver.pl line 565)
   frame 7: main::main (slimserver.pl line 61)
   frame 8: PerlSvc::Interactive (perlsvc line 1208)
   frame 9: PerlSvc::_interactive (slimserver.pl line 0)
   frame 10: (eval) (slimserver.pl line 0)

Here's the problem. C:/Program Files/SlimServer/server/Plugins/RssNews.pm, line 641:

631	}
632	
633	sub lines {
634	    #This returns the 2 lines to display on the unit 
635	    my $client = shift;
636	    my $lineref;
637	    my $now = time();
638	
639		# the current RSS feed
640		my $display_current = $client->param('PLUGIN.RssNews.display_current');
641		assert($display_current, "current rss feed not set\n");
642	
643		# the current item within each feed.
644		my $display_current_items =
$client->param('PLUGIN.RssNews.display_current_items');
645	
646		#remember which item in feed we are currently showing
647		# this will be stored on a per-client basis
648		if (!defined ($display_current_items)) {
649			$display_current_items = {$display_current => {'next_item' => 0}};
650		} elsif (!defined($display_current_items->{$display_current})) {
651			$display_current_items->{$display_current} = {'next_item' => 0};

2005-04-17 06:40:24.2345 current rss feed not set
Comment 4 Dave Cohen 2005-04-18 13:37:55 UTC
Roy,

The bug caused bad values to be written to your .slimserver.pref file.  I
believe if you edit your rss feeds with the new plugin installed the problem
will be corrected.  Please go to server->settings->plugins, select the URL for
your one news feed and cut it from the form field its in, then paste it into the
form field below (essentially deleting it then adding it again - the user
interface leaves something to be desired here).  Press the change button and
hopefully your prefs file will be corrected (the prefs are cached in memory, it
may take a minute to see the changes written to the file).

If that does not solve the problem, please send your .slimservice.prefs file again.

Sorry about this.
Comment 5 Chris Owens 2008-03-11 11:28:09 UTC
This bug was marked resolved in Slimserver 6.1, which is several versions ago.  If you're still seeing this bug, please re-open it.  Thanks!