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 07-18-2009, 07:32 AM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
Remedial Help Needed

So after using Sage for a while I have decided to brush off the (very rusty) programming skills and dive into Studio. I've read the manual several times and worked through all of the tutorials - very useful stuff.

I have some very basic questions:

1. To create an STVi (for the default STV) do I just start with the default STV, edit as needed, and then use Tools->STV UID Difference to save the STVi file?

2. If I do this how do ensure compatibility with other STVi's?

3. If I want to edit an existing STVi I am assuming I start with the default STV, import the STVi, edit, save the new STVi. Correct?

4. And what does "UID File Difference" really mean (as opposed to Lexical File Difference)?

Sorry for the simplistic questions but my coding background is in UNIX device drivers and not this high level / UI / Java type coding. So far I think "talking to the hardware" is a lot easier than "talking to the user"
__________________

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 07-18-2009, 08:36 AM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
Quote:
Originally Posted by tmiranda View Post
So after using Sage for a while I have decided to brush off the (very rusty) programming skills and dive into Studio. I've read the manual several times and worked through all of the tutorials - very useful stuff.

I have some very basic questions:

1. To create an STVi (for the default STV) do I just start with the default STV, edit as needed, and then use Tools->STV UID Difference to save the STVi file?

2. If I do this how do ensure compatibility with other STVi's?

3. If I want to edit an existing STVi I am assuming I start with the default STV, import the STVi, edit, save the new STVi. Correct?

4. And what does "UID File Difference" really mean (as opposed to Lexical File Difference)?

Sorry for the simplistic questions but my coding background is in UNIX device drivers and not this high level / UI / Java type coding. So far I think "talking to the hardware" is a lot easier than "talking to the user"

Hey welcome.

1. yes and no I always recomend making a new menu item if you are editing a existing copy it to your new item. The best way to ensure capability is when import your import and run lexiccal file difference there should only be your menu item and any additional references you might have to add in the defualt stv. (perferbably for beginers it is best to keep all secondary references to the default stv in your menu so you don't screw anything up outside your menu.

as for exporting and importing your stvi I highly recomend gkunsicks tools at the sticky at the to of this forum for exporting and importing much better results than the default UID in my honest opinion

cheers
Reply With Quote
  #3  
Old 07-18-2009, 12:07 PM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
Plucky,

Thanks for pointing me at those tools. I installed them but am still missing "the big picture" on STVi generation. The instructions say to put all new or modified code in its own menu then add a reference to that in the existing menu. How does this work? How would I do something really simple, like change the text in the main menu in the tutorials?

If I create a new menu, and all it contains is the modified text, how do I get the main menu to display it?

I also tried:
- editing the main menu
- selecting it and exporting it
- reloading the original tutorial.xml
- importing the STVi
and that gave me two main menus. Probably not a good idea.

I'm obviously missing something very basic. Thanks for helping.

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
  #4  
Old 07-18-2009, 01:23 PM
GKusnick's Avatar
GKusnick GKusnick is offline
SageTVaholic
 
Join Date: Dec 2005
Posts: 5,083
Quote:
Originally Posted by tmiranda View Post
1. To create an STVi (for the default STV) do I just start with the default STV, edit as needed, and then use Tools->STV UID Difference to save the STVi file?
Yes. For simple changes by Studio newbies, this is (in my opinion) a simpler and more reliable technique than using my STVI generator.

Quote:
Originally Posted by tmiranda View Post
2. If I do this how do ensure compatibility with other STVi's?
What sort of compatibility are you looking for? If your STVI deletes some code that another STVI depends on, then obviously the two aren't going to work together. But if you're both just (say) inserting new items into existing menus, then they should be able to coexist peacefully.

The trickiest issue is if your STVI needs to create new hooks or listeners, and another STVI wants to create those same hooks or listeners. The built-in STVI generator doesn't handle this case very well, but my generator has special code to avoid duplication of hooks and listeners (assuming both STVIs use my generator).

Quote:
Originally Posted by tmiranda View Post
3. If I want to edit an existing STVi I am assuming I start with the default STV, import the STVi, edit, save the new STVi. Correct?
If you're talking about creating a new version of your STVI, then yes, that will work. Another option is to make your edits to the stock STV and then save the result as a complete STV before generating the STVI. Then you cen just reload that saved STV and continue editing without having to reimport. (Of course if there's a new release of the stock STV in the meantime, then you'll need to reimport anyway.)

If you're talking about creating an STVI that modifies the behavior of somebody else's STVI, that's a different story. In that case you should first import the other STVI, save the result as an STV, make your edits, and then do a UID compare against the saved intermediate STV to capture just your changes in STVI form.

Quote:
Originally Posted by tmiranda View Post
4. And what does "UID File Difference" really mean (as opposed to Lexical File Difference)?
Since about version 6, every widget has a unique widget ID (aka widget symbol) that's assigned when that widget is first created in Studio and persists across releases of the product. UID File Difference uses these unique IDs to detect edits to the STV at the widget level, so it can tell new code from pre-existing code and how exactly the connections between widgets have changed.

The older Lexical File Difference is more like a textual file compare. It has no notion of persistent widget identity or editing history, but simply does a node-by-node lexical (i.e. textual) comparison of the two widget trees to attempt to deduce the differences between them. It always produces a result that can transform one tree into the other, but does not always do a very good job of capturing the actual changes you made, and so is not useful for generating STVIs.
__________________
-- Greg
Reply With Quote
  #5  
Old 07-18-2009, 01:54 PM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
Thanks Greg,

I'll take your advice and forgo your STVi generator for now. Better learn to crawl before I run.

I just plan on "tweaking" some existing functionality for now which will entail changing some option menus. (I think.)

I also wanted to fix the music interface to eliminate some annoyances like the artists being case sensitive, but it looks as if it's not a simple fix since the case sensitivity is in he core....

Regards,

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
  #6  
Old 07-18-2009, 03:02 PM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
scratch this i didn't see gk answer above

as for the music interface allot of that is in the core I am working on a music interface for sagemc and it will require custom code/jars to change some of the default.
Reply With Quote
  #7  
Old 07-19-2009, 04:58 AM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
I can't get this work I must be making this a lot harder than it's supposed to be.

Here is what I did:
1 Opened tutorials.xml
2 Changed the Main Menu text to "Changed"
3 Saved the file to tutorials-edited.xml (left it loaded after the save)
4 Selected Tools->STV UID File difference...
5 Selected tutorials.xml
6 Clicked "Generate STVi"
7 Saved the file as test.stvi
8 Opened the original tutorials.xml
9 Imported test.stvi

The result is that I get two "main menus" (the original and the edited version) and everything else is duplicated.

I must be doing something fundamentally wrong.
__________________

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
  #8  
Old 07-19-2009, 06:00 AM
wado1971's Avatar
wado1971 wado1971 is offline
Sage Aficionado
 
Join Date: Feb 2006
Location: Stamford, CT
Posts: 345
Quote:
Originally Posted by tmiranda View Post
2 Changed the Main Menu text to "Changed"
Did you change the menu widget name or a text widget within the menu?

Quote:
Originally Posted by tmiranda View Post
9 Imported test.stvi
I think this is wrong (Edit: If you did File->Import from the studio menu). You did not import an stvi.... you simply imported the contents of one file into another. This action will just "add" without any logic behind it. You want to "Import an stvi" from the setup menu inside the UI. You might want to get out of the tutorial and try your simple mod to the real sagetv UI and use the manage imports in the setup menu to add your stvi.

Hang in there. My first successful stvi took me a week of

Last edited by wado1971; 07-19-2009 at 06:15 AM.
Reply With Quote
  #9  
Old 07-19-2009, 06:29 AM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
Quote:
Originally Posted by wado1971 View Post
Did you change the menu widget name or a text widget within the menu?


I think this is wrong (Edit: If you did File->Import from the studio menu). You did not import an stvi.... you simply imported the contents of one file into another. This action will just "add" without any logic behind it. You want to "Import an stvi" from the setup menu inside the UI. You might want to get out of the tutorial and try your simple mod to the real sagetv UI and use the manage imports in the setup menu to add your stvi.

Hang in there. My first successful stvi took me a week of
I just changed the text within the the menu. I did not change the widget name.

I tried importing using File->Import AND I tried Plugins->STVI Tools->Import STVi (from Greg's tools.) Same result for both methods.

When I select Tools->STV UID File Difference which STV should I have loaded, the "modified" STV or the original STV? I have been doing this with the modified STV loaded. Is that right?

I'll try experimenting with the "real" STV to see if I have any luck there.
__________________

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
  #10  
Old 07-19-2009, 07:41 AM
wado1971's Avatar
wado1971 wado1971 is offline
Sage Aficionado
 
Join Date: Feb 2006
Location: Stamford, CT
Posts: 345
Quote:
Originally Posted by tmiranda View Post
I tried importing using File->Import AND I tried Plugins->STVI Tools->Import STVi (from Greg's tools.) Same result for both methods.
I understand why the File->Import method did not work... not sure why Greg's tools did not work. Maybe because the stvi was not created with his tools. Greg will need to comment.

Quote:
Originally Posted by tmiranda View Post
When I select Tools->STV UID File Difference which STV should I have loaded, the "modified" STV or the original STV? I have been doing this with the modified STV loaded. Is that right?
I believe this is correct. You compare your loaded modified version with the "original"
Reply With Quote
  #11  
Old 07-19-2009, 08:08 AM
razrsharpe razrsharpe is offline
Sage Icon
 
Join Date: Sep 2008
Location: Boston, MA
Posts: 2,111
First welcome to the wonderful world of studio programming

Quote:
Originally Posted by tmiranda View Post
When I select Tools->STV UID File Difference which STV should I have loaded, the "modified" STV or the original STV? I have been doing this with the modified STV loaded. Is that right?
Yes you should have the modified STV loaded and compare it to the original. This will make an xml to make the original STV like the modified one.

Quote:
I'll try experimenting with the "real" STV to see if I have any luck there.
Ya i believe you'll have better luck with that I believe wado is correct with the File -> import not being a real STVi import (it is a shame that its not... unless I'm missing something major). And i also believe that Greg's STVi import tools only work when you used his export tools. As a side note... when modifying the original STV, the first thing i always do is save a copy of it so i dont mess up the clean one (and in fact i keep 2 original copies, one that i never touch... so i know its clean)

back to what i believe is one of your original goals...
Quote:
Originally Posted by tmiranda View Post
I also wanted to fix the music interface to eliminate some annoyances like the artists being case sensitive, but it looks as if it's not a simple fix since the case sensitivity is in he core....
I have a jar (that SMW uses and my upcoming TVExplorer uses) that includes some useful api calls you may interested in. Mainly, it takes as input a MediaObject (think song) and returns the AlbumArtist fully lowercase and with leading "the", "a", and "an" stripped away. For example, "The Beatles" are returned as "beatles". So these calls can be used in grouping and sorting methods to make sure that everything is sorted/grouped appropriately. I haven't uploaded it yet to the forum on its own... but plan too after i fully document it.. it has what i think are some other really useful metadata api calls ... if you want it sooner send me a pm and ill email it to you.
__________________
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
  #12  
Old 07-19-2009, 01:02 PM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
Thank you all for the help. I did get it working. The problem seems to have been caused by using the tutorials.xml file. When I started using the "real" STV all worked well. I have no idea why it didn't work with the tutorials and I certainly do not know enough at this point to figure it out.

I'm now reading through all the code to see how it works and why the Artist list behaves like it does. The good news is that I am starting to grasp the logic and see how the Artist list is being built up and use. The bad news is that I don't yet have a plan of attack to fix it.

razrsharpe - Thanks for the offer. PM on the way....
__________________

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
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
Advice needed! pjpjpjpj The SageTV Community 18 07-29-2009 09:49 AM
Nvidea help needed. pawn Hardware Support 3 05-31-2007 08:47 PM
Software needed cheesie SageTV Software 3 03-03-2007 10:52 PM
How much memory is really needed? Dekard General Discussion 27 02-05-2006 04:41 AM
Confused On What Is Needed! sagetogo Hardware Support 1 11-20-2003 03:19 PM


All times are GMT -6. The time now is 02:27 AM.


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