|
SageTV v7 Customizations This forums is for discussing and sharing user-created modifications for the SageTV version 7 application created by using the SageTV Studio or through the use of external plugins. Use this forum to discuss plugins for SageTV version 7 and newer. |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
Plugin installation and restart
I'm in a bit of a fix.
I need to do some one time only setting of Sage.properties during my plugin installation. As there is no enabled/disable call back I have had to piggy back this setup on the start() method testing a property to see if the one time setup is required. This works ok but once the settings are there the only way I can see SageTV will pick them up is via another restart. Is there any cool way to reshow that "restart now/later" dialog that pops up after the plugin install? Michael |
#2
|
||||
|
||||
What properties are you setting that require a restart to pick them up? If you set them via SetProperty, they should be accessible immediately via GetProperty.
__________________
-- Greg |
#3
|
|||
|
|||
Quote:
Michael |
#4
|
|||
|
|||
Can anyone help here please.
Its a bit of a sticking point. I can add server properties for a new tuner - but a restart is needed before it appears in the list of available tuners. I can just do a server restart without asking - but that seems a bit unfriendly. I can raise a java swing dialog first- but I'm not sure that would work in all client contexts or work with the remote control. What would be great would be if there was an easy way to raise a Sage style dialog with a message and OK cancel buttons. Perfect would be to be able to set the plugin status so it still looks like a restart is required and the existing "restart now/later" dialog is raised. Can anyone help? Michael |
#5
|
||||
|
||||
Michael,
There is probably a better way, but you can create a button (CONFIG_BUTTON) in the plugin framework that does the restart. The button description could say something along the lines of "Restart" and the button itself could say "Not Needed" until the user added the property. After adding the property you could make the button say "Restart Now". You could use the HelpText to give more info to the user. You don't get a pop-up confirmation, but the user does have to proactively select restart. When the user presses the button the setConfigValue (I may have the method name wrong) plugin method is called and you can put the restart code in there. The button text that is displayed is controlled by the getConfigValue method. (You probably knew that already.) I'm interested in what others have to say about this because I've been fooling around with a plugin that does various actions based on button presses within the plugin manager framework as well. Tom
__________________
Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders. |
#6
|
||||
|
||||
One klugey solution might be to create a dummy Library plugin that you can install and uninstall via the PluginAPI during your one-time initialization in order to fake the server into thinking it needs to be restarted and trigger the built-in Restart prompt.
__________________
-- Greg |
#7
|
|||
|
|||
Quote:
Seems to work. Michael |
#8
|
|||
|
|||
Quote:
Michael |
#9
|
||||
|
||||
I'm not clear on exactly what you did to cause that. Maybe seeing some code would help.
But if you're saying that you're calling InstallPlugin() on a plugin that's already installed (and is not a version upgrade), then my guess is that you're doing something that the PluginAPI wasn't designed to handle and it's getting confused about whether JAR files need to be removed or added. (In a normal plugin upgrade, old JARs are removed and new ones are added unless their checksums haven't changed.) This could perhaps be construed as a bug in the PluginAPI, but if you're going to submit a bug report, then you might as well explain what you're really trying to do (i.e. set the Restart Needed flag) and ask for a way to do it directly without klugery.
__________________
-- Greg |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Restart PC Button? | Nick_W | SageMC Custom Interface | 7 | 02-28-2009 10:04 PM |
Anyone have a script tp restart client ? | brewston | SageTV Software | 3 | 09-16-2008 08:02 AM |
Scheduled Windows Restart / Reboot (Shutdown -r) and Sage doesn't restart | dealsdyker | SageTV Software | 8 | 03-09-2007 04:24 PM |