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
  #21  
Old 08-19-2010, 08:59 PM
GKusnick's Avatar
GKusnick GKusnick is offline
SageTVaholic
 
Join Date: Dec 2005
Posts: 5,083
Quote:
Originally Posted by chrishallowell View Post
My STVI Configurator menu is not in bold or in italics.
And the action items all have a yellow square. (Screen shot attached)
That's normal. As mentioned earlier, that code is invoked from Java via ExecuteWidgetChain, and not by any direct reference in the STV. The menu itself doesn't actually do anything; it's just a placeholder for the code underneath it.

Are you having some problem that you think is traceable to this?
__________________
-- Greg
Reply With Quote
  #22  
Old 08-19-2010, 10:01 PM
chrishallowell chrishallowell is offline
Sage Advanced User
 
Join Date: Jan 2008
Posts: 169
Well, I'm having some kind of a problem.

1. I load SageTV7.xml into Studio
2. I disable all plugins except STVI Configurator
3. See Screenshot 1 (Looks fine)
4. I save as StockAndSTVIConfig.xml
5. Screenshot 2 and 2-1 (Duplicates the menu and adds the children nodes of the menu to the root node)
6. So I manually delete those added nodes but then when it does the compare I don't think it works because there are a lot more changes than just the few nodes I added.

Edit: I think I got by this by just copying the XML files and then adding my config nodes.
Attached Images
File Type: jpg ScreenShot001.jpg (21.7 KB, 153 views)
File Type: jpg ScreenShot002.jpg (26.2 KB, 159 views)
File Type: jpg ScreenShot002-1.jpg (421.8 KB, 153 views)

Last edited by chrishallowell; 08-19-2010 at 10:27 PM.
Reply With Quote
  #23  
Old 08-19-2010, 10:39 PM
chrishallowell chrishallowell is offline
Sage Advanced User
 
Join Date: Jan 2008
Posts: 169
Ok, next problem

Ok, I'm getting an object and a string when I test the config lines manually.
So now I switched back to the stock STV and reenabled all of the plugins.

Expression Evaluator to get the MD5Sum:
CalculateMD5Sum("C:\\Program Files\\SageTV\\SageTV\\STVs\\Development\\HelloTable - ConfigOnly.zip")

I'm trying to install the plugin but I get this message:
Code:
Plugin Install Progress: Done - FAILED - Resource Download http://hallowell.googlecode.com/files/HelloTable - ConfigOnly.zip
I've tested that URL and it works just fine in a browser.

Does it matter if I saved the STVi as an XML file? Does it matter what name I give the XML file(Does it need to match the plugin id)?

Last edited by chrishallowell; 08-19-2010 at 10:45 PM.
Reply With Quote
  #24  
Old 08-19-2010, 10:48 PM
GKusnick's Avatar
GKusnick GKusnick is offline
SageTVaholic
 
Join Date: Dec 2005
Posts: 5,083
Quote:
Originally Posted by chrishallowell View Post
4. I save as StockAndSTVIConfig.xml
Did you save using the Save As command, or Save a Copy As? Save a Copy is what you want to use to save a copy. Using Save As does much more than just saving a copy; it also sets the saved file as your base STV and then reimports all active STVIs into it, which is why you're getting duplicates.

Quote:
Originally Posted by chrishallowell View Post
I'm trying to install the plugin but I get this message:
Code:
Plugin Install Progress: Done - FAILED - Resource Download http://hallowell.googlecode.com/files/HelloTable - ConfigOnly.zip
I've tested that URL and it works just fine in a browser.
Just guessing here, but try it without spaces in the filename.

Quote:
Originally Posted by chrishallowell View Post
Does it matter if I saved the STVi as an XML file?
It's always an XML file. Doesn't matter whether the filename extension is .stvi or .xml. (I prefer .xml.)

Quote:
Originally Posted by chrishallowell View Post
Does it matter what name I give the XML file(Does it need to match the plugin id)?
It can be any name you like, but from a user-friendliness perspective it's nice if there's some obvious connection to the plugin name.
__________________
-- Greg
Reply With Quote
  #25  
Old 08-20-2010, 10:44 AM
chrishallowell chrishallowell is offline
Sage Advanced User
 
Join Date: Jan 2008
Posts: 169
Ok, good to learn the difference between Save As and Save a Copy As.


Quote:
Just guessing here, but try it without spaces in the filename.
I think you are right. I looked at all of the other SageTV projects in code.google and none of them have spaces in their file names. Thanks for the help. I'll do this when I get home tonight.

Thanks again for all of your help Greg. You are the best. There is no way I would figure all of this stuff out on my own. I'm starting to know enough to be dangerous .
Reply With Quote
  #26  
Old 08-20-2010, 06:11 PM
chrishallowell chrishallowell is offline
Sage Advanced User
 
Join Date: Jan 2008
Posts: 169
Ok, the zip file without spaces did the trick. It downloaded the file and asked to reboot the UI. So I said "yes". Went back to the plugin and it's disabled. I can't enable it.

I looked in the log file: sagetv_0.txt but it didn't give me an error messages in regards to that plugin. Not sure where to go from here. All I can think is that the Studio can't find the ConfigDefs.xml file. (Edit: I copied "plugins\Hallowell\HelloTable\ConfigDefs.xml" all over the place and still won't enable.)

C:\Program Files\SageTV\SageTV\plugins\Hallowell\HelloTable\ConfigDefs.xml
Code:
<config>
   <setting name="CallName" type="Text">
      <label>Call name:</label>
      <helptext>This will be the call name used.</helptext>
      <property>Hallowell/HelloTable/CallName</property>
   </setting>
   <setting name="AgeOfUser" type="Integer">
      <label>Age:</label>
      <helptext>Enter your age.</helptext>
      <property>Hallowell/HelloTable/AgeOfUser</property>
   </setting>
</config>

C:\Program Files\SageTV\SageTV\SageTVPluginsDev.xml
Code:
<SageTVPlugin>
  <Name>HelloTable</Name>
  <Identifier>hallowell_hellotable</Identifier>
  <Description>Displays Hello Table Config Options.</Description>
  <Author>chrishallowell</Author>
  <CreationDate>2010.08.16</CreationDate>
  <ModificationDate>2010.05.25</ModificationDate>
  <Version beta="true">2010.0</Version>
  <ReleaseNotes>2010.0 Initial release</ReleaseNotes>
  <Desktop>false</Desktop>
  <PluginType>STVI</PluginType>
  <Dependency>
    <STV>STVI Configurator</STV>
    <MinVersion>1.0.8</MinVersion>
  </Dependency>

  <Package>
    <PackageType>STVI</PackageType>
    <Location>http://hallowell.googlecode.com/files/HelloTable.zip</Location>
    <MD5>A3654B1090A611862DD441D7A3738CA9</MD5>
    <Overwrite>true</Overwrite>
  </Package>

</SageTVPlugin>
(Studio trees are attached)
Attached Images
File Type: jpg HelloTable-AddGlobalContext.jpg (151.0 KB, 151 views)
File Type: jpg HelloTable-SettingMethodTree.jpg (309.4 KB, 156 views)

Last edited by chrishallowell; 08-20-2010 at 06:16 PM.
Reply With Quote
  #27  
Old 08-20-2010, 06:42 PM
GKusnick's Avatar
GKusnick GKusnick is offline
SageTVaholic
 
Join Date: Dec 2005
Posts: 5,083
A plugin's enable/disable state has nothing to do with its config settings. Plugins with no configuration options at all can still be enabled and disabled, and missing config info would not cause the plugin to be disabled.

Looking at your manifest, I see two issues:

1. You have not declared an STV dependency on SageTV7:

Code:
<Dependency><STV>SageTV7</STV><MinVersion>7.0.15</MinVersion></Dependency>
Without this dependency, Sage has no way of knowing which UI your UI Mod is meant to modify (and which version(s) of that UI it's compatible with), and will try to import it into whatever UI happens to be loaded, usually with nonsensical results if it's not the intended target UI.

In your particular case this isn't fatal, since you depend on STVI Configurator, which in turn does depend on SageTV7.xml. So the right thing will happen in this case, i.e. Sage won't try to load your STVI unless STVI Configurator has been successfully loaded first (which won't happen unless SageTV7.xml is loaded). Nevertheless, if your STVI depends directly on SageTV7.xml due to changes or additions you've made to menus in the stock UI (in addition to your STVI Config changes), then you should declare that dependency explicitly.

2. There's no STVImport tag in your manifest.

Code:
<STVImport>HelloTable.stvi</STVImport>
That tag is how you tell Sage the name of your STVI file, and without it Sage won't know what file to import. (The fact that there might be a .stvi or .xml file in the zip is irrelevant; Sage doesn't interpret the contents of zip files; it just extracts them to the appropriate target directories.)

However since I see your changes in your Studio screenshots, I assume those screenshots were taken during your Studio editing session, before you packaged and installed your plugin. So presumably you remembered to revert to the unmodified stock STV before testing your plugin install. Otherwise you would have been installing your STVI into an STV that already included your changes (which would be nonsensical).
__________________
-- Greg
Reply With Quote
  #28  
Old 08-20-2010, 07:37 PM
chrishallowell chrishallowell is offline
Sage Advanced User
 
Join Date: Jan 2008
Posts: 169
Ok, plug-in installed successfully .... but no config button for the plugin . (Yes, I remembered to revert back to the stock STV)

I'm still not sure I'm creating my copy of stockAndSTVIConfigAndHelloTable.xml correctly. It seems like I'm still getting a duplicate STVi Config menu whenever I open it...

1. I open SageTV7.xml and do a save a copy as to StockAndSTVIConfig.xml.
2. I open StockAndSTVIConfig.xml and I disable all plugins except the ConfigSTVI and do a save.
(so far so good. No duplication.)
3. I do a save a copy as to StockAndSTVIConfigAndHelloTable.xml.
(so far so good. No duplication.)
4. I then open StockAndSTVIConfigAndHelloTable.xml and I see 2 STVI Configurator menus


FYI: Here's what I ended up with for my manifest:
Code:
<SageTVPlugin>
  <Name>HelloTable</Name>
  <Identifier>hallowell_hellotable</Identifier>
  <Version>2010</Version>
  <Description>Displays Hello Table Config Options.</Description>
  <Author>chrishallowell</Author>
  <PluginType>STVI</PluginType>
  <STVImport>HelloTable.xml</STVImport>
  <Dependency>
    <STV>SageTV7</STV>
    <MinVersion>7.0.15</MinVersion>
  </Dependency>

  <Dependency>
    <STV>STVI Configurator</STV>
    <MinVersion>1.0.8</MinVersion>
  </Dependency>

  <Package>
    <PackageType>STVI</PackageType>
    <Location>http://hallowell.googlecode.com/files/HelloTable.zip</Location>
    <MD5>713CC17C530CE3FCE17BB668C7425A6F</MD5>
    <Overwrite>true</Overwrite>
  </Package>

</SageTVPlugin>

Last edited by chrishallowell; 08-20-2010 at 07:40 PM.
Reply With Quote
  #29  
Old 08-20-2010, 07:48 PM
chrishallowell chrishallowell is offline
Sage Advanced User
 
Join Date: Jan 2008
Posts: 169
Doesn't look like my SettingMethods were added to the right spot for some reason... (See attachment)

Edit: Yeap. that's the problem. I move them up where they belong and everything works. I'll have to try and see what I'm doing wrong.
Attached Images
File Type: jpg ScreenShot001.jpg (54.4 KB, 167 views)

Last edited by chrishallowell; 08-20-2010 at 07:51 PM.
Reply With Quote
  #30  
Old 08-20-2010, 08:12 PM
chrishallowell chrishallowell is offline
Sage Advanced User
 
Join Date: Jan 2008
Posts: 169
What does this warning message mean when I save the xml file?

"There are currently STV Import Plugins loaded into this STV, are you sure you want to save it this way?
Reply With Quote
  #31  
Old 08-20-2010, 08:21 PM
GKusnick's Avatar
GKusnick GKusnick is offline
SageTVaholic
 
Join Date: Dec 2005
Posts: 5,083
Quote:
Originally Posted by chrishallowell View Post
1. I open SageTV7.xml and do a save a copy as to StockAndSTVIConfig.xml.
Do you have other STVIs installed besides STVIConfig? If so, and you didn't disable them until after you saved, then they got included in your save.

Quote:
Originally Posted by chrishallowell View Post
2. I open StockAndSTVIConfig.xml and I disable all plugins except the ConfigSTVI and do a save.
(so far so good. No duplication.)
I'm not clear on what you're trying to accomplish by this step. You've already set aside a copy to compare against. By reopening it, you're basically emulating by hand what Save As would have done, i.e. setting the new file as the base STV and reimporting STVIs into it, which sort of defeats the purpose of using Save a Copy instead.

My guess is that in fact you are getting duplication here, but you're just not seeing it due to the Studio display bug mentioned in post #12.

Quote:
Originally Posted by chrishallowell View Post
3. I do a save a copy as to StockAndSTVIConfigAndHelloTable.xml.
(so far so good. No duplication.)
4. I then open StockAndSTVIConfigAndHelloTable.xml and I see 2 STVI Configurator menus
Again, you've just hand-emulated Save As, resulting in yet another duplication. So by my reckoning you now have one visible duplication and one hidden. (Each generation of reload-and-reimport makes the previous hidden duplication visible and adds a new hidden duplication.)

If you're reopening the saved STVs just to see if they got saved properly and have the expected contents, that's fine, so long as you disable all active STVIs (including STVI Config), so that the only widgets present come from the STV file you're trying to verify. Having verified it, I don't really see a reason to then save it again, as you did in step 2.

If your approach to STVI development is to keep everything in STV form, i.e. SageTV7.xml, SageTV7PlusSTVIConfig.xml, SageTV7PlusSTVIConfigPlusMyPlugin.xml, then you must work with all STVIs disabled, so that nothing gets added to those STVs other than what you add by editing.

I personally prefer an alternative approach in which I work with STVIs enabled and save my work in STVI form (by comparing against a saved base STV), but you seem to be leaning toward the pure STV approach, which is fine, so long as you understand that enabling STVIs that you've already saved in STV form will lead to duplication.
__________________
-- Greg
Reply With Quote
  #32  
Old 08-20-2010, 08:28 PM
GKusnick's Avatar
GKusnick GKusnick is offline
SageTVaholic
 
Join Date: Dec 2005
Posts: 5,083
Quote:
Originally Posted by chrishallowell View Post
What does this warning message mean when I save the xml file?

"There are currently STV Import Plugins loaded into this STV, are you sure you want to save it this way?
It means what you're seeing in Studio (or what you should be seeing except for the bug) includes more than just the contents of the currently loaded STV. It also includes the contents of all the currently enabled STVIs. If you save in that state, you will be permanently merging the active STVIs into the saved STV.

This is why I'm urging you to work with STVIs disabled. After you've done that merge once, you don't want to keep redoing it every time you save. That's where your duplications are coming from.
__________________
-- Greg
Reply With Quote
  #33  
Old 08-20-2010, 08:36 PM
chrishallowell chrishallowell is offline
Sage Advanced User
 
Join Date: Jan 2008
Posts: 169
Thanks soooooo much Greg!

Disabling the STVIConfig before I open it back up prevents the duplication. To get the nodes where they belonged, I manually created them instead of copying the examples and changing them. (Not sure if that was the problem or something else I did.)

I think I might lean towards your approach. Now that you have explained both ways. (do a save a copy where you want to branch. Add your stuff, save, and then compare.)

Thanks again for all your help and for this great plugin. I have a new sense of respect for anyone who publishes any kind of plugin. There's a lot of work/knowledge involved.
Reply With Quote
  #34  
Old 08-21-2010, 05:01 AM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
Chris,

Greg gives good advice and has taught me many things.

Here is what I typically do to create/edit/save stvi plugins:

Start with a clean STV by loading the default Sage7 STV and ensuring that ALL plugins are uninstalled. Disabling them is not sufficient. (In some cases it might be sufficient, but I just uninstall them all to make sure.)

If I want to edit an existing STVi, import it through Detailed Setup->Advanced. You can also import it through the plugin manager but then you have to remember to uninstall it after the next step. (Looking at your Studio screen shot you probably forgot to do that.)

In Studio choose Save A Copy As... I found out the hard way that Save As... will NOT work.

If you imported the STVi using the plugin manager go back and uninstall it. If you forget this step you will get very bad results

Now load the .xml that you created when you did Save A Copy As...

A big thing to remember is that the plugin manager will always import the plugins regardless of what STV you are using as your base. It's easy to get the imports loaded twice if you forget that.

Another thing to remember is to NOT update the base STV until you have created your new STVi. You want to do the UID diff on the same STV you started with, not an updated one.

Finally, when you are done keep the original Sage7 STV, your modified STV and the .stvi files somewhere safe (outside of the Sage directory.) You may need to go back to it one day.

Greg, If I forgot something please chime in.

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.
Reply With Quote
  #35  
Old 08-21-2010, 06:42 AM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
You actually don't have to uninstall the ui mod after saving it simply disabling suffices as it won't get loaded if it's disabled so you won't see duplicates.
Reply With Quote
  #36  
Old 08-21-2010, 07:06 AM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
Quote:
Originally Posted by PLUCKYHD View Post
You actually don't have to uninstall the ui mod after saving it simply disabling suffices as it won't get loaded if it's disabled so you won't see duplicates.
Yes, but I uninstall it anyway just to be sure
__________________

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.
Reply With Quote
  #37  
Old 08-21-2010, 09:38 AM
jaminben jaminben is offline
Sage Icon
 
Join Date: Sep 2007
Location: Norwich, UK
Posts: 1,754
Send a message via MSN to jaminben
Quote:
Originally Posted by tmiranda View Post
Yes, but I uninstall it anyway just to be sure
I do the same as Plucky and just disable it via Gregs tool.....its alot easier and quicker.
__________________
Server - Win7 64bit, 2.4Ghz Intel Core 2 Duo, TBS 6284 PCI-E Quad DVB-T2 Tuner, 3 x HD200 & 1 x HD300 extenders
Reply With Quote
  #38  
Old 08-21-2010, 11:38 AM
GKusnick's Avatar
GKusnick GKusnick is offline
SageTVaholic
 
Join Date: Dec 2005
Posts: 5,083
Quote:
Originally Posted by tmiranda View Post
A big thing to remember is that the plugin manager will always import the plugins regardless of what STV you are using as your base.
This is not strictly correct. The plugin manager imports STVIs into STVs that they're compatible with, as determined by STV dependencies in the plugin manifest. So when SageTV7 is loaded, it will not try to import STVIs meant for SageMC, and vice versa.

However when you save a copy of SageTV7 (without or without STVIs), the label that identifies it as SageTV7 gets copied too. So if you load that saved copy, Sage will think it's SageTV7 and try to import STVIs that are compatible with SageTV7, and that's where duplication can happen.

Personally I try to minimize the amount of STV reloading I do. When I save a copy of SageTV7+STVIConfig, for instance, I don't see a need to immediately reload that saved file, since it contains exactly the same widgets as what I already have loaded. I just put the saved copy somewhere safe and carry on working. That way I minimize the risk of accidental duplication, and the STVI enable states are already correct for what I (still) have loaded.

I also agree with the others that uninstalling plugins is overkill for Studio work. Disabling an STVI is sufficient to remove it from the Studio editing equation, and if you know of cases where it's not sufficient, that's a bug in the plugin manager that needs to be addressed.

As Ben mentioned, my Studio Tools include a command that lets you enable and disable STVIs all in one go directly from within Studio.
__________________
-- Greg
Reply With Quote
  #39  
Old 08-23-2010, 12:11 PM
chrishallowell chrishallowell is offline
Sage Advanced User
 
Join Date: Jan 2008
Posts: 169
properties

Greg,
Is there a way I can get the STVi configurator to save to the sage.properties file instead of the client file?

My configuration options are more global in nature and each client and extender will need to read these values.
Reply With Quote
  #40  
Old 08-23-2010, 02:20 PM
GKusnick's Avatar
GKusnick GKusnick is offline
SageTVaholic
 
Join Date: Dec 2005
Posts: 5,083
Quote:
Originally Posted by chrishallowell View Post
Is there a way I can get the STVi configurator to save to the sage.properties file instead of the client file?
STVIConfig doesn't save anything anywhere. All it does is redirect the standard PluginAPI config methods to your widget code, which can in principle save things wherever it wants.

You've chosen to delegate that task to XmlConfig. As I mentioned in your other thread, XmlConfig does not currently have an option for saving properties to the server's properties files. I could add such an option, but before doing so I'd like to hear a concrete example of why you think it's necessary.
__________________
-- Greg
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
STVi Plugin: Phoenix Fanart for Malore Menus tmiranda SageTV v7 Customizations 29 11-28-2015 01:28 PM
MediaPlayer Plugin/STV Import: Winamp Media Player Plugin deria SageTV Customizations 447 12-11-2010 07:38 PM
STVi plugin request: Send TV show detailed info to an email recipient mkanet SageTV Customizations 1 01-22-2006 03:59 PM


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


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