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 12-12-2010, 11:35 AM
Nutball Nutball is offline
Sage User
 
Join Date: Mar 2008
Posts: 36
Rookie Advise

Let me first apologize for the ridiculously simple question.

I am new to Studio and am just trying to get my feet wet with very simple UI changes before doing anything significant. The first thing I want to do is simply get rid of some of the nearly static images on the header and footer since they are trying their best to burn in my plasma.

In particular I want to ditch the clock and weather notifications in the header and the "Options" menu from the footer. So, I pulled up studio and found the notifications area and simply deleted the clock and weather sections from "Notifications and clock". I did something similar for the "options" menu in the footer.

Everything seems to work fine while in Sage but I have noticed that pulling up studio while using my newly modified STV can take a long time (sometimes over 5 minutes before for the spinning circles to stop). In addition, selecting different sections of the "UI components" window will often retrigger the spinning circles and I have to wait several more minutes. If I revert back to the original STV, this issue goes away.

So obviously I am doing something improperly. Is there a better way to remove these items? Should I have found a way to turn off the display of the items and not completely delete them out of the STV?

Thanks for any advise,
Nutball
Reply With Quote
  #2  
Old 12-12-2010, 01:35 PM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
My guess is that you deleted widgets that are needed in other parts of the STV. If the widget is (was) black, it means other widgets in the STV reference it and you should not delete it.

Instead you should find out where it is referenced, make one of theose references the primary reference, and then go back and delete. (Widgets in italics are references and can be deleted without causing a problem.)

If you do not have GKusnick's Studio Tools installed, you should do that immediately. It will save you time and grief.

Welcome to Studio.
__________________

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
  #3  
Old 12-12-2010, 01:37 PM
GKusnick's Avatar
GKusnick GKusnick is offline
SageTVaholic
 
Join Date: Dec 2005
Posts: 5,083
Note that when deleting code in Studio, it's not enough to delete the topmost widget at the point of attachment; that will leave orphaned widgets in the file. You must select all of the widgets you want to remove (and only those widgets) before pressing Delete.

So my guess is that you may have deleted too little (leaving a lot of orphaned widgets) or too much (leaving malformed code that's throwing a lot of exceptions). To check for orphaned widgets, scroll down to the bottom of the file and look for random widgets that don't belong at top level. Also check for a "Circular dependencies" item, which would be a sign that you deleted the entry point of a loop without deleting the loop body.

To check for exceptions, look in your debug logs, or try running with a console window open (see p. 230 of the V7 manual).

There's a command in my Studio Tools plugin called Select Safe Subtree that makes deleting code simpler, if that's of interest to you.

But you're probably right that just putting an "If false" above the code you want to suppress is a simpler and safer way to go.

All of that said, you're really going about this the wrong way by changing a few widgets and then saving the entire STV to a new file. What you want to do is a UID File Difference against the stock STV and save just your changes in STVI form. Then you can package that STVI as a UI Mod plugin that will be automatically applied every time the stock STV is loaded. This way you're not duplicating any code, and your changes will automatically carry over to updated versions of the stock STV, so you won't have to keep merging them back manually.
__________________
-- Greg
Reply With Quote
  #4  
Old 12-12-2010, 04:42 PM
Nutball Nutball is offline
Sage User
 
Join Date: Mar 2008
Posts: 36
Thanks

Thanks all for the quick advice. I did delete a couple of black colored widgets and it did leave a mess of orphaned files. I have downloaded Studio Tools and will give things another go this week in a more careful manner. I will also try the UID file difference and create a STVi.

-Nutball
Reply With Quote
  #5  
Old 12-12-2010, 05:50 PM
Fuzzy's Avatar
Fuzzy Fuzzy is offline
SageTVaholic
 
Join Date: Sep 2005
Location: Jurupa Valley, CA
Posts: 9,957
For something like this, you may be better off looking for a point in the STV that has a conditional that could be changed to check a property. (like Nutball/HideClock=true). This will actually limit the overall changes done in the STV, make the import itself smaller, and have less impact on other imports that may come along.
__________________
Buy Fuzzy a beer! (Fuzzy likes beer)

unRAID Server: i7-6700, 32GB RAM, Dual 128GB SSD cache and 13TB pool, with SageTVv9, openDCT, Logitech Media Server and Plex Media Server each in Dockers.
Sources: HRHR Prime with Charter CableCard. HDHR-US for OTA.
Primary Client: HD-300 through XBoxOne in Living Room, Samsung HLT-6189S
Other Clients: Mi Box in Master Bedroom, HD-200 in kids room
Reply With Quote
  #6  
Old 12-21-2010, 12:45 PM
Nutball Nutball is offline
Sage User
 
Join Date: Mar 2008
Posts: 36
general coding practices advice

Quote:
Originally Posted by Fuzzy View Post
For something like this, you may be better off looking for a point in the STV that has a conditional that could be changed to check a property. (like Nutball/HideClock=true). This will actually limit the overall changes done in the STV, make the import itself smaller, and have less impact on other imports that may come along.
Fuzzy,

Is it generally better to modify an existing conditional by adding an AND statement with a check to my "Nutball/HideClock" property or should I simply add a extra conditional level in hierarchy tree?
i.e.
if (existing conditional && Nutball/HideClock)
display clock...

vs.

if (existing conditional)
if (Nutball/HideClock)
display clock...

Which method is better as far as compatibility with other plugins?

By the way, thanks all for the advice, I was able to get generate a STVI and implement it via the plugin system without any significant issues. (should have tried it earlier).

Last question, I am currently implementing a local SageTVPluginsDev.xml file for the plugin manifest while i tweak things. This is working fine but I can't seem to find a way to have two different plugins within SageTVPluginsDev.xml file. Only the first plugin in the manifest shows up in the available plugin list within sage. Is this a limit to the Dev manifest or have I simply messed up the syntax. (I am not at home so I cant attach a copy of my SageTVPluginsDev.xml file)

Thanks,
Nutball
Reply With Quote
  #7  
Old 12-21-2010, 01:21 PM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
Quote:
Originally Posted by Nutball View Post
Fuzzy,

Is it generally better to modify an existing conditional by adding an AND statement with a check to my "Nutball/HideClock" property or should I simply add a extra conditional level in hierarchy tree?
i.e.
if (existing conditional && Nutball/HideClock)
display clock...

vs.

if (existing conditional)
if (Nutball/HideClock)
display clock...

Which method is better as far as compatibility with other plugins?
Option 2 add a condition changing the existing will effect other plugins who may not want to rely on your extra condition.

Quote:
Originally Posted by Nutball View Post

Last question, I am currently implementing a local SageTVPluginsDev.xml file for the plugin manifest while i tweak things. This is working fine but I can't seem to find a way to have two different plugins within SageTVPluginsDev.xml file. Only the first plugin in the manifest shows up in the available plugin list within sage. Is this a limit to the Dev manifest or have I simply messed up the syntax. (I am not at home so I cant attach a copy of my SageTVPluginsDev.xml file)

Thanks,
Nutball
Must be a syntax error are you enclosing the whole thing correctly? You can have multiples in a single dev xml.

the entire xml needs to be encased in
Code:
<PluginRepository version="1.0.672">
</PluginRepository>
With each plugin encased in
Code:
<SageTVPlugin>
</SageTVPlugin>
Check your server log if you are having errors it will print out if there is a parsing error. My guess is your second is outside the </PluginRepository> tag

Last edited by PLUCKYHD; 12-21-2010 at 01:24 PM.
Reply With Quote
  #8  
Old 12-21-2010, 04:39 PM
Fuzzy's Avatar
Fuzzy Fuzzy is offline
SageTVaholic
 
Join Date: Sep 2005
Location: Jurupa Valley, CA
Posts: 9,957
It may actually be that he doens't HAVE a <PluginRepository> tag. I think some of the early examples floating around didn't include it, just having a single <SageTVPlugin> element, and this actually seems to work (for only one element, obviously).
__________________
Buy Fuzzy a beer! (Fuzzy likes beer)

unRAID Server: i7-6700, 32GB RAM, Dual 128GB SSD cache and 13TB pool, with SageTVv9, openDCT, Logitech Media Server and Plex Media Server each in Dockers.
Sources: HRHR Prime with Charter CableCard. HDHR-US for OTA.
Primary Client: HD-300 through XBoxOne in Living Room, Samsung HLT-6189S
Other Clients: Mi Box in Master Bedroom, HD-200 in kids room
Reply With Quote
  #9  
Old 12-21-2010, 09:44 PM
Nutball Nutball is offline
Sage User
 
Join Date: Mar 2008
Posts: 36
didn't have the </PluginRepository> tag

Tag team help is a great thing...

Plucky, I was hoping Option 2 was the better approach since that is what I have working right now.

Fuzzy, you were right, I had neither the <PluginRepository> nor the </PluginRepository> tags. Everything still worked fine with only a single plugin but Sage won't recognize anything beyond the first plugin without the <PluginRepository> tags.

Thanks,
Nut
Reply With Quote
  #10  
Old 12-21-2010, 11:24 PM
GKusnick's Avatar
GKusnick GKusnick is offline
SageTVaholic
 
Join Date: Dec 2005
Posts: 5,083
By definition a well-formed XML file has a single root element. Adding a second SageTVPlugin element without an enclosing parent element makes it bad XML.
__________________
-- 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
Really basic, rookie question oldmike60 SageTV Placeshifter 3 10-06-2010 08:36 AM
Rookie User with Dish Network RonGee General Discussion 8 10-17-2008 08:38 AM
Rookie question - display problems Jukin SageTV Software 5 04-25-2008 12:43 PM
Can anyone advise leswilkinson SageTV Software 0 07-20-2004 12:47 PM


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


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