SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV Studio
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

SageTV Studio Discussion related to the SageTV Studio application produced by SageTV. Questions, issues, problems, suggestions, etc. relating to the Studio software application should be posted here.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 05-27-2010, 07:19 AM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
How are you guys handling plugin import

Anyone else have a specific task they would only like to fire in the plugin implementation on initial import of the plugin? How are you doing this? I thought about a properties file but could see that hitting some hitches as I really only want to fire this on initial import and not every time start() is called. Just curious how others were doing it?
Reply With Quote
  #2  
Old 05-27-2010, 07:30 AM
jreichen's Avatar
jreichen jreichen is offline
Sage Icon
 
Join Date: Jul 2004
Posts: 1,192
For Jetty I migrate the properties from JettyStarter.properties to Sage.properties if the JettyStarter.properties file exists and the jetty/jetty.configfiles property doesn't exist in Sage.properties yet. This works fine for me and is probably better because I can retest it just by cleaning out Sage.properties.
__________________
Server: Intel Core i5 760 Quad, Gigabyte GA-H57M-USB3, 4GB RAM, Gigabyte GeForce 210, 120GB SSD (OS), 1TB SATA, HD HomeRun.
Extender: STP-HD300, Harmony 550 Remote,
Netgear MCA1001 Ethernet over Coax.
SageTV: SageTV Server 7.1.8 on Ubuntu Linux 11.04, SageTV Placeshifter for Mac 6.6.2, SageTV Client 7.0.15 for Windows, Linux Placeshifter 7.1.8 on Server and Client
, Java 1.6.
Plugins: Jetty, Nielm's Web Server, Mobile Web Interface.

Reply With Quote
  #3  
Old 05-27-2010, 09:09 AM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
Quote:
Originally Posted by jreichen View Post
For Jetty I migrate the properties from JettyStarter.properties to Sage.properties if the JettyStarter.properties file exists and the jetty/jetty.configfiles property doesn't exist in Sage.properties yet. This works fine for me and is probably better because I can retest it just by cleaning out Sage.properties.
Good idea I can easily check for the existence of a couple of directories in my case on initial startup.
Reply With Quote
  #4  
Old 05-27-2010, 12:00 PM
GKusnick's Avatar
GKusnick GKusnick is offline
SageTVaholic
 
Join Date: Dec 2005
Posts: 5,083
Seems to me that "run once on first install" is the wrong way to look at it. A better way is to ask if any old junk exists, and if so, get rid of it. Then if some of that junk mysteriously reappears for whatever reason (e.g. because the user restored from a backup, or tried to revert to an older version of your plugin), your code knows to get rid of it again, regardless of whether that code has run once already. And it's not like it does any harm to check for old junk every time time start() is called.
__________________
-- Greg
Reply With Quote
  #5  
Old 05-27-2010, 12:29 PM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
Quote:
Originally Posted by GKusnick View Post
Seems to me that "run once on first install" is the wrong way to look at it. A better way is to ask if any old junk exists, and if so, get rid of it. Then if some of that junk mysteriously reappears for whatever reason (e.g. because the user restored from a backup, or tried to revert to an older version of your plugin), your code knows to get rid of it again, regardless of whether that code has run once already. And it's not like it does any harm to check for old junk every time time start() is called.
Well in my case it is just scaling images on the first time start is called the rest of the time it is done on listeners and I really don't want scaling done every time start is gone. So yeah basically I will check if the scaling folders exist already on start.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
MediaPlayer Plugin/STV Import: Winamp Media Player Plugin deria SageTV Customizations 447 12-11-2010 07:38 PM
STV Import: CallerID/Message popup plugin nielm SageTV Customizations 294 08-12-2010 03:16 PM
Import 250+ Programs via Plugin/WebServer automated? Fastrack SageTV Customizations 10 05-23-2007 12:58 PM
EPG import plugin reference goes missing Doubletop SageTV Software 4 05-02-2005 05:57 PM
Updated XMLTV import plugin (mostly for dutch users) koelie SageTV EPG Service 14 05-01-2005 11:46 PM


All times are GMT -6. The time now is 06:08 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.