![]() |
|
Register | Forum Rules | FAQs | Members List | Social Groups | Downloads | Search | Today's Posts | Mark Forums Read |
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. |
![]() |
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
||||
|
||||
![]()
Version 6.4 of the default STV has a Custom STV Mode that custom STVs can use for configuration options, such as setting up recording sources, or for use of any other menu in the default STV. This makes sure that users are always using the most up to date setup code and the custom STV authors do not need to worry about that code at all.
I believe SageMC does something like that already, but it provides a customized version of the default STV which could get out of date since the default STV's setup code gets modified often. To use the default STV in Custom STV Mode, a custom STV would set these global variables: Code:
AddGlobalContext("gCurCustomSTVFilePath", GetCurrentSTVFile()) Optional variable to reload the custom STV w/o confirmation, set to true or false, default false: AddGlobalContext("gReloadCustomSTVWithoutConfirm", true) Optional variable to set name of menu to jump to, default null: AddGlobalContext("gTargetMenuName", "<name of menu widget>") Optional variable to use the Home command to return to the custom STV, set to true or false, default false: AddGlobalContext("gReloadCustomSTVOnHome", true) Optional variables used to call a custom init method - set gCustomSTVInit to the name of the method to call and gCustomSTVInitParams are the parameters: AddGlobalContext("gCustomSTVInit", <name of method to call> ) AddGlobalContext("gCustomSTVInitParams", <parameters> ) Use the GetDefaultSTVFile() API call to load the default STV: LoadSTVFile(GetDefaultSTVFile()) Optional variable to reload the custom STV after entering the playback menu, set to true or false, default false: AddGlobalContext("gReloadCustomSTVOnPlayback", true) If gReloadCustomSTVWithoutConfirm has been set to true, then the custom STV is reloaded w/o asking the user to confirm that step. If gTargetMenuName has been set, then the default STV will attempt to jump directly to the menu widget with the specified name. If the name doesn't exist, then the Main Menu will be used. If this variable is null, the Setup Menu will be loaded. If gReloadCustomSTVOnHome has been set to true, then the default STV will reload the custom STV when the Home command is used. Use the gReloadCustomSTVWithoutConfirm variable to control whether the action is confirmed or not. If gReloadCustomSTVOnPlayback has been set to true, then the default STV will reload the custom STV after entering the playback menu. If gCustomSTVInit has been set to the name of a method to call, then this function is called after the default STV has been loaded and its initial settings are configured -- it gets called as one of the last things to be done in the Main Menu's AfterMenuLoad hook, but before the jump to another menu. gCustomSTVInitParams is sent as the array of parameters. This is done via a call to: sage_SageTV_apiUI( GetUIContextName(), gCustomSTVInit, gCustomSTVInitParams ) Code:
Custom Java code: package CustomCode; public class CustomInit { public static void initialize(String arg1, String arg2) throws InvocationTargetException { [...] } } Custom STV: AddGlobalContext("gCustomSTVInit", "CustomCode_CustomInit_initialize" ) AddGlobalContext("gCustomSTVInitParams", CreateArray(param1,param2,...) ) Note: These global variables are cleared before reloading the custom STV. If the custom STV needs to do anything specific when it is reloaded, it should set its own custom global variables before loading the default STV. I'm looking for comments from custom STV authors regarding anything else they think would be needed. Nothing else jumps out at me and I don't think the default STV needs to look for or set any other global variables to talk to the custom STV, because the custom STV could set those before loading the default STV so it knows Custom STV Mode was just exited when it gets reloaded. See the attached STV for sample code used to test jumping between the default & sample STV. - Andy
__________________
SageTV Open Source v9 is available. - Read the SageTV FAQ. Older PDF User's Guides mostly still apply: SageTV V7.0 & SageTV Studio v7.1. - Hauppauge remote help: 1) Basics/Extending it 2) Replace it 3) Use it w/o needing focus - HD Extenders: A) FAQs B) URC MX-700 remote setup Note: This is a users' forum; see the Rules. For official tech support fill out a Support Request. |
#2
|
|||
|
|||
Quote:
![]() ![]() ![]() One thing less to worry about. Awesome... ![]() Dirk |
#3
|
||||
|
||||
I figured you would like that one.
![]() ![]() Are you doing anything else in your customized default STV? Have you run into usability issues that should be considered? ... it doesn't seem too difficult to me: when done, choose "Exit Setup Mode" and confirm. ![]() - Andy
__________________
SageTV Open Source v9 is available. - Read the SageTV FAQ. Older PDF User's Guides mostly still apply: SageTV V7.0 & SageTV Studio v7.1. - Hauppauge remote help: 1) Basics/Extending it 2) Replace it 3) Use it w/o needing focus - HD Extenders: A) FAQs B) URC MX-700 remote setup Note: This is a users' forum; see the Rules. For official tech support fill out a Support Request. |
#4
|
||||
|
||||
One other feature is that 'Back' and 'Home' both return you to SageMC.
__________________
"Everything doesn't exist. I'm thirsty." ...later... "No, it's real!!! I'm full." - Nikolaus (4yrs old) |
#5
|
||||
|
||||
Not an author, but this sounds awesome. If I am reading this right it will give us a way to keep the original STV "pure" and independent, not have to worry about SageTV3-2, then 3-3, 3-4, etc. Is this true?
|
#6
|
||||
|
||||
I've been doing something like this in my own (unreleased) custom STV for some time. In my case I use more than just the Setup menu; I also have menu items that jump into the stock Video Browser and Music Browser screens (since I didn't feel like duplicating that functionality in my STV).
Basically what my code does is this: 1. Remember the name of the currently loaded STV. 2. Load the target STV. 3. Set the STV property in the properties file to the calling STV (so if the user quits and restarts Sage, that's the one that will be loaded). 4. Search for the Standby item on the Main Menu in the target STV. 5. Replace it with a "Return to caller" menu item that reloads the original STV. 6. Jump to the target menu by name. The interesting thing is that steps 3-6 continue to execute even after the target STV has been loaded, even though the code for those steps is defined in the STV that has just been unloaded. I guess we have Java garbage collection to thank for that.
__________________
-- Greg |
#7
|
||||
|
||||
Quote:
Quote:
Quote:
![]() - Andy
__________________
SageTV Open Source v9 is available. - Read the SageTV FAQ. Older PDF User's Guides mostly still apply: SageTV V7.0 & SageTV Studio v7.1. - Hauppauge remote help: 1) Basics/Extending it 2) Replace it 3) Use it w/o needing focus - HD Extenders: A) FAQs B) URC MX-700 remote setup Note: This is a users' forum; see the Rules. For official tech support fill out a Support Request. |
#8
|
||||
|
||||
Quote:
The same thing applies to any forked threads -- they will continue until they hit an exit point... I think I have one to double check for stopping itself when the STV changes. ![]() - Andy
__________________
SageTV Open Source v9 is available. - Read the SageTV FAQ. Older PDF User's Guides mostly still apply: SageTV V7.0 & SageTV Studio v7.1. - Hauppauge remote help: 1) Basics/Extending it 2) Replace it 3) Use it w/o needing focus - HD Extenders: A) FAQs B) URC MX-700 remote setup Note: This is a users' forum; see the Rules. For official tech support fill out a Support Request. |
#9
|
||||
|
||||
Quote:
I've now set the STV property as you mentioned. I also added a check for an optional variable named "gExitSetupWithoutConfirm", which will change the exit button so that when selected, the user immediately returns to the custom STV instead of being asked whether to return. (First post has been modified.) - Andy
__________________
SageTV Open Source v9 is available. - Read the SageTV FAQ. Older PDF User's Guides mostly still apply: SageTV V7.0 & SageTV Studio v7.1. - Hauppauge remote help: 1) Basics/Extending it 2) Replace it 3) Use it w/o needing focus - HD Extenders: A) FAQs B) URC MX-700 remote setup Note: This is a users' forum; see the Rules. For official tech support fill out a Support Request. |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
How To: Add custom online video feed definitions (default STV; v7.0+) | Opus4 | SageTV v7 Customizations | 14 | 04-18-2015 07:06 AM |
How To: Add custom online video feed definitions (default STV; v6.4+) | Opus4 | SageTV Customizations | 69 | 08-15-2010 10:13 AM |
How To: Add custom online video feed definitions (default STV; v6.3.10) | Opus4 | SageTV Customizations | 34 | 06-04-2008 08:11 PM |
Custom STV: My ShowLogos STV working in Linux | laurenglenn | SageTV Linux | 0 | 02-19-2006 05:49 PM |