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 02-19-2010, 06:51 PM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
Advanced STVi Importing Techniques

Is there a way to detect if another import has been imported before yours? I am trying to figure out how to handle two different scenarios:

1. An import is dependent on another import being installed first. In this case I want to abort the whole import process if the dependency is not met.

2. An import needs to modify certain portions of the STV only if another import has been imported first. In this case I want to apply updates to the STV code that I know is there (i.e. included in SageTV3.xml) and apply updates to other code only if it is there (i.e. was installed by another STVi)

I have been using the STV UID File Difference tool to create my STVi's and up until now it has worked just fine. I am wondering if Greg's tools handle the cases I've outlined above?

Thanks,

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
  #2  
Old 02-19-2010, 09:48 PM
GKusnick's Avatar
GKusnick GKusnick is offline
SageTVaholic
 
Join Date: Dec 2005
Posts: 5,083
Case #2 should just fall out. If the widgets you're inserting under don't exist, then obviously the insertion won't happen and the code that would have been inserted will be unreachable and therefore inactive. But I haven't actually tried it so I can't swear there aren't any bad side effects.

Case #1 is doable but requires some extra work on your part no matter how you do it. You'd need to write some code to inspect the widget tree to see if the target code is present and either proceed or not on that basis. Using my tools, you can put this code in a hook before exporting the STVI. Using the built-in STVI generator, you'd need to open up the generated STVI and insert the extra code manually.
__________________
-- Greg
Reply With Quote
  #3  
Old 02-20-2010, 08:08 AM
razrsharpe razrsharpe is offline
Sage Icon
 
Join Date: Sep 2008
Location: Boston, MA
Posts: 2,111
Quote:
Originally Posted by GKusnick View Post
Case #2 should just fall out. If the widgets you're inserting under don't exist, then obviously the insertion won't happen and the code that would have been inserted will be unreachable and therefore inactive. But I haven't actually tried it so I can't swear there aren't any bad side effects.
the only side effect i have seen is if you are linking to a UIComponent (like a button or the contents of a button) is you will see a <<<REFBlahblah>>> where the button should be... i think perhaps in studio you will also see something similar but i havent gone looking for it in studio... this is with your tools not sure what happens with the built in stvi generator...
__________________
Server 2003 r2 32bit, SageTV9 (finally!)
2x Dual HDHR (OTA), 1x HD-PVR (Comcast), 1x HDHR-3CC via SageDCT (Comcast)
2x HD300, 1x SageClient (Win10 Test/Development)
Check out TVExplorer
Reply With Quote
  #4  
Old 02-20-2010, 10:28 AM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
With the built in STVi generator Widgets that can't be placed properly are left as orphans at the same level of the Widget hierarchy as the Menu widgets. So strictly speaking they do not do any harm, but it is really ugly to see all of those widgets scattered in the STV.

I'd love to see one of the gurus make a proper installer so we could check for dependencies and do other things necessary to make sure the install process is easier for the users and more fool proof.

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
  #5  
Old 02-20-2010, 10:48 AM
Tiki's Avatar
Tiki Tiki is offline
Sage Icon
 
Join Date: Feb 2005
Location: Southwest Florida, USA
Posts: 2,009
Greg's tools will not automatically check for the existence of other imports, but they make it possible for you to manually do so...

The built in STVi generator is very easy to use, and for simple imports (or even moderately complex ones), it basically takes just two clicks to create a functioning import. The downside is that it is very difficult to do anything fancy like checking for imports. Also, the STVi that is generated is not really human-readable. It is just a big flat file with most of the tree structure of your code no longer visible.

When using Greg's tools to create an import, it is no simple 2-click process. You have to do a lot of manual work to get a functioning import. But, you have a lot of control over how the import process will work. The STVi you create can be opened on its own in Studio and viewed and edited in a logical manner.

One nice thing about STVi's generated with Greg's tools is that if you have created an STVi and then realize there is a minor bug that you can fix by just changing 1 or 2 lines of code, you can open the STVi directly and just edit those two lines and you are done. If you created your STVi using the built-in Studio tools, you probably need to start by setting up your original creation environment (usually the default STV with all other imports removed and just your custom code added), make your changes, and re-generate the STVi.

Anyway, it may be worthwhile for you to go through the process of creating a simple import using Greg's tools just so you have a feel for what is possible and whether or not it is worth the extra effort for your particular import.
__________________
Server: Ryzen 2400G with integrated graphics, ASRock X470 Taichi Motherboard, HDMI output to Vizio 1080p LCD, Win10-64Bit (Professional), 16GB RAM
Capture Devices (7 tuners): Colossus (x1), HDHR Prime (x2)
,USBUIRT (multi-zone)
Source:
Comcast/Xfinity X1 Cable
Primary Client: Server Other Clients: (1) HD200, (1) HD300
Retired Equipment: MediaMVP, PVR150 (x2), PVR150MCE,
HDHR, HVR-2250, HD-PVR
Reply With Quote
  #6  
Old 02-20-2010, 04:33 PM
Fuzzy's Avatar
Fuzzy Fuzzy is offline
SageTVaholic
 
Join Date: Sep 2005
Location: Jurupa Valley, CA
Posts: 9,957
I'd like to start compiling a list of features the 'guru's and others would WANT in an installer. After some brainstroming, it probably wouldn't end up being THAT hard to pre-check for dependencies and such, and even auto-download those dependencies. I'd build it myself, but since I've never really gotten into any significant imports, I'm not really sure what is really required by the dev community. That, and I'm most happy coding in .net, which I'm sure other's would complain about (everyone here is so Java centric it seems).
__________________
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
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- Advanced Fanart Tools AFT R1.00 PLUCKYHD SageMC Custom Interface 18 11-09-2009 09:03 AM
Help importing STVI Belgrath SageTV Customizations 2 08-08-2009 07:59 PM
Trouble importing STVi in Placeshifter for Mac karljayne SageTV Customizations 2 07-08-2008 11:12 PM
importing stvi/xml question Chroner SageTV Customizations 7 12-03-2006 10:46 AM


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


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