Bug 1167 - Plugins show up on player even when disabled
: Plugins show up on player even when disabled
Status: RESOLVED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Plugin
: 6.0.0
: PC All
: P2 normal (vote)
: ---
Assigned To: KDF
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-03-22 23:59 UTC by Michael Herger
Modified: 2008-08-18 10:54 UTC (History)
1 user (show)

See Also:
Category: ---


Attachments
refresh plugins, removing from menus (2.89 KB, patch)
2005-03-23 03:17 UTC, KDF
Details | Diff
read_plugins on postchange (3.68 KB, patch)
2005-03-23 20:26 UTC, KDF
Details | Diff
remove plugin links, basic attempt (3.42 KB, patch)
2005-03-23 23:57 UTC, KDF
Details | Diff
update (4.18 KB, patch)
2005-03-24 01:08 UTC, KDF
Details | Diff
remove empty Plugins menu from web page (4.80 KB, patch)
2005-04-05 00:07 UTC, Michael Herger
Details | Diff
remove blank submenus (with debugging) (4.18 KB, patch)
2005-04-06 00:48 UTC, KDF
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Herger 2005-03-22 23:59:54 UTC
I've disabled a bunch of plugins in the server settings. But they show up on the players anyway. Most 
interesting: the Visualizer screensaver on SliMP3 :-). It does not work, but I can select it. And it will disable 
the previous screensaver.

They are not listed in the web interface's player settings area, though.
Comment 1 KDF 2005-03-23 03:17:45 UTC
Created attachment 365 [details]
refresh plugins, removing from menus

I've added a few debug messages to help see what is going on.  Also, refresh
the menus when pluginitems are changed.  Let me know if this helps sort things
out.
Comment 2 Michael Herger 2005-03-23 03:53:59 UTC
Ok, applied the patch. I started with almost all plugins enabled:

2005-03-23 12:39:57.3247 Registering screensaver Es läuft gerade... (beim Aufwachen 
zurückspringen)
2005-03-23 12:40:01.1264 Requiring Plugins::Picks plugin.
2005-03-23 12:40:01.2025 Requiring Plugins::Rescan plugin.
2005-03-23 12:40:01.2619 Requiring Plugins::MusicMagic::Plugin plugin.
2005-03-23 12:40:01.4820 Requiring Plugins::Visualizer plugin.
2005-03-23 12:40:01.6045 Requiring Plugins::ShoutcastBrowser plugin.
2005-03-23 12:40:01.7161 Requiring Plugins::DateTime::Plugin plugin.
2005-03-23 12:40:01.7246 Requiring Plugins::RadioIO plugin.
2005-03-23 12:40:01.7346 Requiring Plugins::SavePlaylist plugin.
2005-03-23 12:40:01.8918 Requiring Plugins::SlimTris plugin.
2005-03-23 12:40:01.9546 Requiring Plugins::iTunes plugin.
2005-03-23 12:40:02.0265 Requiring Plugins::RssNews plugin.
2005-03-23 12:40:02.1092 Requiring Plugins::Shooter plugin.
2005-03-23 12:40:02.1177 Requiring Plugins::Live365 plugin.
2005-03-23 12:40:02.2263 Adding Picks to menu: RADIO
2005-03-23 12:40:02.2274 Removing MusicMagic::Plugin from menu.
2005-03-23 12:40:02.2283 Adding ShoutcastBrowser to menu: RADIO
2005-03-23 12:40:02.2292 Adding RadioIO to menu: RADIO
2005-03-23 12:40:02.2301 Adding SlimTris to menu: GAMES
2005-03-23 12:40:02.2310 Removing iTunes from menu.
2005-03-23 12:40:02.2316 Removing RssNews from menu.
2005-03-23 12:40:02.2322 Removing RssNews from menu: PLUGINS
2005-03-23 12:40:02.2329 Adding Shooter to menu: GAMES
2005-03-23 12:40:02.2336 Adding Live365 to menu: RADIO
2005-03-23 12:40:02.2382 Registering screensaver 
PLUGIN_SCREENSAVER_VISUALIZER_SPECTRUM_ANALYZER
2005-03-23 12:40:02.2390 Registering screensaver 
PLUGIN_SCREENSAVER_VISUALIZER_ANALOG_VUMETER
2005-03-23 12:40:02.2394 Registering screensaver 
PLUGIN_SCREENSAVER_VISUALIZER_DIGITAL_VUMETER
2005-03-23 12:40:02.2405 Registering screensaver PLUGIN_SCREENSAVER_DATETIME

I then disabled Live365:

2005-03-23 12:41:05.9924 Resetting plugins
2005-03-23 12:41:05.9987 Adding Picks to menu: RADIO
2005-03-23 12:41:06.0035 Removing MusicMagic::Plugin from menu.
2005-03-23 12:41:06.0045 Adding ShoutcastBrowser to menu: RADIO
2005-03-23 12:41:06.0048 Adding RadioIO to menu: RADIO
2005-03-23 12:41:06.0050 Adding SlimTris to menu: GAMES
2005-03-23 12:41:06.0052 Removing iTunes from menu.
2005-03-23 12:41:06.0053 Removing RssNews from menu.
2005-03-23 12:41:06.0054 Removing RssNews from menu: PLUGINS
2005-03-23 12:41:06.0056 Adding Shooter to menu: GAMES
2005-03-23 12:41:06.0058 Adding Live365 to menu: RADIO
2005-03-23 12:41:06.0086 Registering screensaver 
PLUGIN_SCREENSAVER_VISUALIZER_SPECTRUM_ANALYZER
2005-03-23 12:41:06.0088 Registering screensaver 
PLUGIN_SCREENSAVER_VISUALIZER_ANALOG_VUMETER
2005-03-23 12:41:06.0089 Registering screensaver PLUGIN_SCREENSAVER_VISUALIZER_DIGITAL_VUMETER
2005-03-23 12:41:06.0095 Registering screensaver PLUGIN_SCREENSAVER_DATETIME

Yep, it was _not_ removed. One more try: disable visualizer

2005-03-23 12:42:00.4460 Resetting plugins
2005-03-23 12:42:00.4573 Adding Picks to menu: RADIO
2005-03-23 12:42:00.4583 Removing MusicMagic::Plugin from menu.
2005-03-23 12:42:00.4585 Adding ShoutcastBrowser to menu: RADIO
2005-03-23 12:42:00.4590 Adding RadioIO to menu: RADIO
2005-03-23 12:42:00.4592 Adding SlimTris to menu: GAMES
2005-03-23 12:42:00.4594 Removing iTunes from menu.
2005-03-23 12:42:00.4595 Removing RssNews from menu.
2005-03-23 12:42:00.4597 Removing RssNews from menu: PLUGINS
2005-03-23 12:42:00.4600 Adding Shooter to menu: GAMES
2005-03-23 12:42:00.4602 Removing Live365 from menu.
2005-03-23 12:42:00.4603 Removing Live365 from menu: RADIO
2005-03-23 12:42:00.4664 Registering screensaver 
PLUGIN_SCREENSAVER_VISUALIZER_SPECTRUM_ANALYZER
2005-03-23 12:42:00.4666 Registering screensaver 
PLUGIN_SCREENSAVER_VISUALIZER_ANALOG_VUMETER
2005-03-23 12:42:00.4668 Registering screensaver 
PLUGIN_SCREENSAVER_VISUALIZER_DIGITAL_VUMETER
2005-03-23 12:42:00.4671 Registering screensaver PLUGIN_SCREENSAVER_DATETIME

Now Live365 has been removed, but not the visualizer.

The change only seems to take effect when there's one more change applied.
Comment 3 Blackketter Dean 2005-03-23 13:55:13 UTC
So, there are two bugs, right?  One is that there are plugins visible for players that can't do them.  But 
there's also a bug with disabling, right?  

KDF: which does your fix do?
Comment 4 KDF 2005-03-23 14:21:29 UTC
1) disabling plugins doesn't remove from menus

2) disabling screensavers doesn't remove from menu OR remove the screensaver

3) plugins that are not enabled for certain players, well...hard to sort that
given a server plugin. for screensavers, we'll probably have to add a playertype
param to that

4) web pages, once added, are stuck there. 

It's all starting to get us back to the old "must restart after messing with
plugins" thing.

The current fix is only dealing with menus for now.  The one here now doesn't
work becuase it does the refresh too early. Moving the following to teh end of
the postChange should solve that part:

				Slim::Buttons::Plugins::addWebPages();
				Slim::Buttons::Plugins::addMenus();
				Slim::Buttons::Plugins::addScreensavers();
				
				# call addSetupGroups last, since it sets a flag to say we're done
refreshing plugins.
				Slim::Buttons::Plugins::addSetupGroups();

 
Comment 5 KDF 2005-03-23 20:26:47 UTC
Created attachment 366 [details]
read_plugins on postchange

ok, my eyes are starting to wobble from too much d_plugins.  This isn't the
speediest thing in the world, but it should be a lot better.  This removes
items when off, and re-reads plugins post_change to reset just about
everything. I longer term solution would be a way to trigger read_plugin for
just one plugin
Comment 6 Michael Herger 2005-03-23 22:28:51 UTC
Patch works for the device's menu (web interface isn't updated, though). Only the RSS plugin doesn't 
disappear from the screensaver menu. Might be a plugin related problem?
Comment 7 KDF 2005-03-23 22:33:13 UTC
what part of web interface do you mean?  can you provide more specific detail?
screen capture?
Comment 8 Michael Herger 2005-03-23 22:42:44 UTC
I was talking about your problem #4:

> 4) web pages, once added, are stuck there. 

And I confirm this: once added, they're stuck there.
Comment 9 KDF 2005-03-23 23:07:26 UTC
ok thanks. I was originally thinking that you meant the plugin setupgoups.
Comment 10 KDF 2005-03-23 23:57:23 UTC
Created attachment 368 [details]
remove plugin links, basic attempt

this replaces the former patch, crudely removes plugin pages.  I dont have a
way yet to remove the header for Plugins becuase I cant really tell if its the
last one yet.  It's clear that the plugin api needs a lot of work, but it may
take a while to actually make all this clean.  I wonder if restarting isn't
really the proper thing to have to do anyway.  Its the best for memory, and
with the db, shouldn't cause much delay.  however, that's for the future.
Comment 11 Michael Herger 2005-03-24 00:18:15 UTC
Screensavers: with this latest patch I can't see a rule in the screensaver behaviour. This time they're 
added but not removed from the player's plugin menu.

Web interface: the plugin menu is created, but newly added plugins won't work. I just get a white page. 
Plugins that were active at startup can be removed/added with no problem.

Player's sub-menus: the Game, Radio and Screensaver menus in the plugin menu will stay there with an 
empty list.

But as you said: restarting the server doesn't hurt too much any more. And I guess users don't change 
their plugin configuration every day. 
Comment 12 KDF 2005-03-24 01:08:52 UTC
Created attachment 369 [details]
update

somehow I lost bits of the earlier patch.  how odd.  hopefully this has it all
becuase I may need this later when I can get back to this.
Comment 13 KDF 2005-04-04 15:50:29 UTC
michael,

if you have some spare time, can you try attachement 369 and let me know how it
feels for the most critical issues (clearing from player menus when disabled). 
I'm not sure we can do much about web pages outside of what I've attempted here.
 If this handles the major problems, I can put this in for 6.0.1 and do some
cleanup on the minor thigs for 6.0.2 or 6.1.  otherwise, we'll have to move this
post 6.0.1
Comment 14 Michael Herger 2005-04-05 00:07:46 UTC
Created attachment 400 [details]
remove empty Plugins menu from web page

I'm sorry I did not check that patch.

Web interface:
- web pages seem to be added/removed correctly
- the Plugins menu is not removed from the web page if there's no plugin left,
though
- radio's settings page is not removed/added when the plugin is removed/added

Player's menu:
- screensavers are removed/added correctly... 
- ... except RSS, which still refuses to be removed from the screensaver menu 
- as with the Plugins menu in the web interface the game/screensaver/radio
menus won't be removed

The only annoying thing was the empty Plugins menu even after a server restart
due to an empty, but still existing %additionllinks{'plugins'} hash. I added a
line in Slim::Web::Pages::addLinks() to remove it completely if it's empty (see
patch). May be a similar change could fix the problem with empty menus on the
player?
Comment 15 KDF 2005-04-06 00:48:12 UTC
Created attachment 404 [details]
remove blank submenus (with debugging)

this is still a work in progress, but taking you idea, I've managed to remove
menus.	I think eventually the right way to clean this up is to do the same as
the addlinks and use an undef sent to addSubmenu to trigger a removal. I'll
work on this for 6.0.2 in time to have lots of test time before its released.
Comment 16 KDF 2005-04-06 16:20:48 UTC
the problem with rss screensaver sticking around is that the plugin
unconditionally adds itself ignoring its own enable/disabled status.
Comment 17 KDF 2005-04-09 15:29:35 UTC
committed to trunk r2918 for 6.1 builds.  Merging to 6.0.2 will be done later
after this has a few days to hopefully see some testing.
Comment 18 Vidur Apparao 2005-04-21 16:38:05 UTC
Kevin, did this make it into the branch?
Comment 19 KDF 2005-04-21 19:56:08 UTC
change 2978 and change 2980.

I havent' heard even one word of feedback either way, so I guess we can call it
fixed :)