|
SageTV Customizations This forums is for discussing and sharing user-created modifications for the SageTV application created by using the SageTV Studio or through the use of external plugins. Use this forum to discuss customizations for SageTV version 6 and earlier, or for the SageTV3 UI. |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
STV Import: Alon24Utils 0.2.5 (last edited 08/19/06)
I have updated my first STVI in the download section
This STVI is for the regular SageStv, it assumes you have enabled the Unofficial secrets (in the the system information screen). another prerequisit: Nielms dynamic menu. 0.2.5 is out - 08/19/06 New significant change is the new commands in Stvutils: suggestLinkCommand - create a text file with a suggest set of commands that will gurentee linking to the spot where the widget is.
If you add an Action widget with the name: alon24_Stvutils_suggestLinkCommand() and then evaluate it, it will create a txt file with the following:
Utils changes:
New Toolkit, allows to add An action to the imported widdget with the location to link to. Before using the functions you must call init() When done with the Import Actions, and work related to the toolkit, please call finish(). static void init(java.lang.Object[] existing, java.lang.Object imported) Initalize so that the util can start working finish() - Call to do final cleanup deleteWidgetTree(java.lang.Object widget) - Delete the tree of widgets, starting from widget. deleteWidgetTree(java.lang.Object parent, java.lang.String pathToDelete, java.lang.String type) Delete the tree of widgets, starting from pathToDelete. forceEPGUpdate() - Utility function to force an EPG update getChild(java.lang.Object widget, java.lang.Integer index) Giet the widget's child at location index. getChildren(java.lang.Object widget) - Return the widgets children getElementatIndex(java.lang.Object arr, java.lang.String index) Get the element from an array of arrays Useful in a case when getting an array of arrays in return to a query. static java.util.HashSet getImportActionsByID(java.lang.Integer id) Retrieve a list of ImportedActions based on the id given to them by the user. getImportedMenu(java.lang.String menuName) Search in the list of Imported widgets and return a Menu by name. static java.lang.Object[] getImportedWidgetByUniquePath(java.lang.String path, java.lang.String type) Get the Widget by a stating a unique path (does not have to start at from the root of the menus). Searches in the Imported Items. getLocationInChildren(java.lang.Object parent, java.lang.Object child) Search for the location of a widget in a parent. Usefull for adding widgets after another one, when the parent is known. getName(java.lang.Object widget) - Return the widget's name static java.lang.Object[] getParents(java.lang.Object widget) Get an array of the widget\s children. static java.lang.Object[] getWidgetsByUniquePath(java.lang.Object widgets, java.lang.String path, java.lang.String type) Get a widget based on a path (seperated by /) Can be a path not stemming from the Main Menu. For instance if we know that our unique path is simple, and a small part can represent it, we do not have to give that as a paramater, only the small part. static void handleAllLinkOperation() Iterate over all the Import Actions, and act on them. static void handleLinkOperation(java.lang.Integer id) Search for all the ImportActions by ID, and act on them. static java.lang.Object linkMe(java.lang.Object linkWidget, java.lang.String linkLocationPath, java.lang.String linkLocationType) Link the widget to the widget at the end of the location path, and of type LinkLocationType. After this, remove the child-parent connection of the widget from its previous parent. static java.lang.Object[] linkWidgetToLocation(java.lang.Object linkWidget, java.lang.String linkLocationPath, java.lang.String linkLocationType) Link the linkWidget to the parent in the ExistingWidgets static java.lang.Object[] linkWidgetToLocation(java.lang.String linkWidgetPath, java.lang.String linkWidgetLocationType, java.lang.String linkLocationPath, java.lang.String linkLocationType) Link the linkWidget from importedWidgets to the parent in ExistingWidgets. static void log(java.lang.String msg) static java.lang.String pathToString(java.lang.Object[] path) Run on the path of Objects and crate a String repesentation, seperated byt a coma. static void printChildren(java.lang.Object parent) Log print the a list of the widget's children. static java.lang.Object renameExistingWidget(java.lang.String path, java.lang.String type, java.lang.String newName) Rename the widget static java.lang.Object renameImportWidget(java.lang.String path, java.lang.String type, java.lang.String newName) Rename the widget void setDebugState(boolean state) State the debug state, static java.lang.Object[] superLinkWidget(java.lang.Object linkWidget, java.lang.String linkLocationPath, java.lang.String linkLocationType, java.lang.String where) static java.lang.Object[] superLinkWidget(java.lang.String linkWidgetPath, java.lang.String linkWidgetType, java.lang.String linkLocationPath, java.lang.String linkLocationType, java.lang.String where) Link linkWidget to linkLocation following these rules: The new thing is that you are able to give the path to the widget and type instead of having to find it in the first place. 2. you always get a return value either only the widget, or all the widgets leading to the widget. 3.Automatic handling of Imported Actions which are there to make life easier. 0.2.3 07/19/06 changed code so that user can add multipule widgets with different id to the same parent, so that, the user can select wether to run this or that id if he needs to compily say with MCE or Regular STV. (java doc explains better)... 0.2.2 07/18/06 1.Added support for "On The Fly" file searching in the Video Folders View, just go there and start typing, and look at the choices deplete. This is usefull if you are like me and have everything together and its just a mess. 2.Now support a new ToolKit to help write STVi's in a much nicer way. Please read the Javadocs. 3.forceEPGUpdate changed case (used to be ForceEPGYpdate) 0.1 Benefits:
Edit: I just wanted to thank all the people that wrote all the utils and previous STVI, from which I shamelessly copy code
__________________
Server SageTv 6.3.5, Core2Duo 6300 ,2Gigs ,Saphire x1650, PVR250, 2*320GB + 160GB, java 1.6.1 Client SageTV Client 6.3.5 , AMD 3000, 1024Mb, Saphire x1600Pro256HDMI, java 1.6.1 Using Nielm's Web server 2.22 Last edited by alon24; 08-19-2006 at 02:43 AM. |
#2
|
||||
|
||||
What are you doing with video redo? Cutting out commericals?
__________________
Clients: 1xHD200 Connected to 50" TH-50PZ750U Plasma Server : Shuttle SFF SSH55J2 w/ Win7 Home, SageTV v7, Core i3 540, 2GB RAM, 30GB SSD for OS, 1.5TB+2x1TB WDGP for Recordings, BluRay, 2xHDHR, 1xFirewire SageTV : PlayOn, SJQ, MediaShrink, Comskip, Jetty, Web Client, BMT Having a problem? Don't forget to include a log! (Instructions for: PlayOn For SageTV v1.5, MediaShrink) |
#3
|
|||
|
|||
I am cutting the begining and ending of the file (I do it manually), because I record 2 mins before and 2 after.
I would be adding support for Joining the files (if you have multipul parts). After that I compress the files to XVId and archive them others to view on a regular Divx, DVD.
__________________
Server SageTv 6.3.5, Core2Duo 6300 ,2Gigs ,Saphire x1650, PVR250, 2*320GB + 160GB, java 1.6.1 Client SageTV Client 6.3.5 , AMD 3000, 1024Mb, Saphire x1600Pro256HDMI, java 1.6.1 Using Nielm's Web server 2.22 |
#4
|
|||
|
|||
Quote:
Thanks. |
#5
|
|||
|
|||
if you install my STVI you will get all the current features.
If you look at the stvi you will see I just listen for the Custom2 event which you can send to sage using sthe sendEvent mechnizem (read the sage.pdf). and then I progrematicly do 1.get channels, deactivate all channels, reactivate chhannels, home) this code tells sage to refresh (its in the jar), its baisiclly a copy from nielms force EPG update code from the Server.
__________________
Server SageTv 6.3.5, Core2Duo 6300 ,2Gigs ,Saphire x1650, PVR250, 2*320GB + 160GB, java 1.6.1 Client SageTV Client 6.3.5 , AMD 3000, 1024Mb, Saphire x1600Pro256HDMI, java 1.6.1 Using Nielm's Web server 2.22 |
#6
|
|||
|
|||
Quote:
|
#7
|
||||
|
||||
Can you explain how you did the Video Redo button. I want to add this option for SageMC and I have no idea where to even start.
|
#8
|
|||
|
|||
I will be publishiing my own toolkit which will help doing regular linking between widgets with its ownset of functions.
This set of functions is inspired by the one that flachbar wrote (http://forums.sagetv.com/forums/showthread.php?t=17063) but with a few tweaks of my own (all new code), so this should help with actually linking the widgets. Now for the VideoReDo, I got the name of the show that is currently highlighted, got how many parts and basicly run the VideoReDo prog. I may not understand your question fully, so please take a look at the STVI in Studio and ask a more specific question. I will be happy to answer...
__________________
Server SageTv 6.3.5, Core2Duo 6300 ,2Gigs ,Saphire x1650, PVR250, 2*320GB + 160GB, java 1.6.1 Client SageTV Client 6.3.5 , AMD 3000, 1024Mb, Saphire x1600Pro256HDMI, java 1.6.1 Using Nielm's Web server 2.22 Last edited by alon24; 06-25-2006 at 05:30 AM. |
#9
|
||||
|
||||
Am I understanding this correctly?...
I have yet to install Sagetv v5.x due to having to rebuild XP before doing so. (So at this time cannot do any testing) But am curious about your STV, alon24. If I had Sagetv v5.x, your stvi, and videoredo (currently have this)... that I can somehow click on a video and have the commercials automatically removed without further input from myself? One reason I ask is that, having videoredo to test with, I cannot seem to get it to "automatically" (without additional input) remove commercials, even when I use the batch manager, which I thought was supposed to automate the process but it just creates a *.prj file that I have to manually open and process. (because if this is true, I just might have to take off work to rebuild XP and start using this stvi!)
__________________
HTPC HW: Gigabyte GA-EP45-UD3P, Intel Q9400, 2GB Corsair RAM, PNY Nvidia GT210 vid card, 3 HVR2250s, 2 PVR250s, USB-UIRT (2 STBs), Internal FireWire/Dual IDE Converter (IFC-1) HTPC SW: XP Pro/SP 2, SageTV v7.1.5.252 Beta, Java v1.6.0_10, PVR drivers v1.18.21.23257, HVR drivers 7.6.1.27118 HD100 Extender: 2 (server is just a server) Future plans: 1 more HVR2250, 1 Ceton CC 4-way tuner, 10TB diskspace Issues: 1 PVR250 not working, system board? |
#10
|
|||
|
|||
Sorry my stvi currently does not allow for this.
what it does is just load the video re do on the current file, no more There shouldn't be a problem doing automatic scanning for commercials, but 2 things come to mind 1. you need to have an stv that supports the resulting files (projects) and will show in sage that output. Or do you mean just cut the file, and replace it automatically? if you chose opt1, then why not go the comskip and dir mon route???
__________________
Server SageTv 6.3.5, Core2Duo 6300 ,2Gigs ,Saphire x1650, PVR250, 2*320GB + 160GB, java 1.6.1 Client SageTV Client 6.3.5 , AMD 3000, 1024Mb, Saphire x1600Pro256HDMI, java 1.6.1 Using Nielm's Web server 2.22 |
#11
|
||||
|
||||
Quote:
Another question... is there a way to have videoredo "just cut and replace" video files? if so, I have been unsuccessful in finding this option. I don't mind jumping out of sage to implement this. I just started with videoredo, and every file I have thrown at it in testing has been accurately "commercial free"!!! It's awesome.
__________________
HTPC HW: Gigabyte GA-EP45-UD3P, Intel Q9400, 2GB Corsair RAM, PNY Nvidia GT210 vid card, 3 HVR2250s, 2 PVR250s, USB-UIRT (2 STBs), Internal FireWire/Dual IDE Converter (IFC-1) HTPC SW: XP Pro/SP 2, SageTV v7.1.5.252 Beta, Java v1.6.0_10, PVR drivers v1.18.21.23257, HVR drivers 7.6.1.27118 HD100 Extender: 2 (server is just a server) Future plans: 1 more HVR2250, 1 Ceton CC 4-way tuner, 10TB diskspace Issues: 1 PVR250 not working, system board? |
#12
|
|||
|
|||
well videoredo employes a script file in its installation directory.
check that file out. Just create a simple script (like when u add to a batch job for instance), that will cut the commercials, delete the original and copy the new one. save that to c:\redo.bat. I am pretty sure that this should do the trick for now, but sage will still show the old length (with commerical) but should play ok. Try it out (on an irrelevent file first) and see if it works
__________________
Server SageTv 6.3.5, Core2Duo 6300 ,2Gigs ,Saphire x1650, PVR250, 2*320GB + 160GB, java 1.6.1 Client SageTV Client 6.3.5 , AMD 3000, 1024Mb, Saphire x1600Pro256HDMI, java 1.6.1 Using Nielm's Web server 2.22 |
#13
|
|||
|
|||
new version is out
I have posted a new version 0.2.2.
now added a new toolkit and lots of functions., Also added, search on the fly for video files in video libray. Check out the first message and please let me know if things do not work, or your opininon. alon24
__________________
Server SageTv 6.3.5, Core2Duo 6300 ,2Gigs ,Saphire x1650, PVR250, 2*320GB + 160GB, java 1.6.1 Client SageTV Client 6.3.5 , AMD 3000, 1024Mb, Saphire x1600Pro256HDMI, java 1.6.1 Using Nielm's Web server 2.22 |
#14
|
|||
|
|||
I added a new version 0.2.3 which now gives a way to handle more difficult scenarios where the STVi needs to do x if import for say MCE STV and another for Regular STV.
Check out the download and my example there, and the Javadocs.
__________________
Server SageTv 6.3.5, Core2Duo 6300 ,2Gigs ,Saphire x1650, PVR250, 2*320GB + 160GB, java 1.6.1 Client SageTV Client 6.3.5 , AMD 3000, 1024Mb, Saphire x1600Pro256HDMI, java 1.6.1 Using Nielm's Web server 2.22 |
#15
|
|||
|
|||
0.2.5 is out - 08/19/06
New significant change is the new commands in Stvutils: suggestLinkCommand - create a text file with a suggest set of commands that will gurentee linking to the spot where the widget is. doesWidgetExist - help you to determine if the wisget path you have specified is legal. isCommandLeagal - helps to identify f the command you want to add is legal(a legal alon24Utils command that is placed in the imported widgets) What these options allow you is to ease the transfer from code in the stv into an stvi. If you add an Action widget with the name: alon24_Stvutils_suggestLinkCommand() and then evaluate it, it will create a txt file with the following: Full path - so that you know where you are (and not have to start coping) Full path beutified - if you do not want to use the new automatic commands, then there are rules for beutifications, the important thing is: You do not need to remember them!!! Suggestions for commands - These are suggestions for automatic commands linkMe - Add this to your import and then when you run the automatic commands, the widget will change and a link to the existing widget will replace it. LinkParent - Use this to insert your code to a specific place (to, before or after an existing widget) Also check out parentsChildren command - This command will link all the children of the parent to the specified location. This is usefull for adding LIsteners,Hooks and such to a location of your choosing (so look at the STVI and handleLinkOperation and handleAllLinkOperation. Utils changes: * renameExistingWidget - rename a widget from the existing widgets pool * renameImportWidget - rename a widget from the imported widgets pool * handleReplaceTheams - Replace all the themes starting with ReplaceMe with the appropriate theme. *Many bug fixes STV changes: **NTE search for Video library **Added option to Recorded programs screen (malor) to change the name and subtitle of the program (usefull if you did a time recording, or want to give an episode name). As always check the javadoc for help. P.S Look at the first post for more details.
__________________
Server SageTv 6.3.5, Core2Duo 6300 ,2Gigs ,Saphire x1650, PVR250, 2*320GB + 160GB, java 1.6.1 Client SageTV Client 6.3.5 , AMD 3000, 1024Mb, Saphire x1600Pro256HDMI, java 1.6.1 Using Nielm's Web server 2.22 Last edited by alon24; 08-19-2006 at 02:53 AM. |
#16
|
|||
|
|||
I see people are downloading this, but nobody is writing...
Does anyone have anything to comment on this toolkit I built?
__________________
Server SageTv 6.3.5, Core2Duo 6300 ,2Gigs ,Saphire x1650, PVR250, 2*320GB + 160GB, java 1.6.1 Client SageTV Client 6.3.5 , AMD 3000, 1024Mb, Saphire x1600Pro256HDMI, java 1.6.1 Using Nielm's Web server 2.22 |
#17
|
||||
|
||||
Quote:
What is a widget? I have been looking for a way to add options to the recordings screen, specifically I would like to be able to add options that allow Sage to pass the filename of a show to a batch file for some external processing. Kind of like your VideoRedo button. One thing that comes to mind is a button that you could click to delete the comskip txt and edl files for a show so that it could be re-comskipped. Will this toolkit allow me to add buttons like that? |
#18
|
|||
|
|||
First I refer you to the studio documention, there you will learn all about widgets. http://forums.sage.tv/forums/showthread.php?t=13677
The toolkit gives you api, for us in building a STVi. It is not a end user interface, but rather a simplification of some very tedius tasks, you had to do by hand, in order to build an STVi of your own. The main problem with building an STVi is getting all your stuff into the correct place, on everybodys current STV. During that, you have to find where to add widgets, find the widgets that you are importing, and link them, u will need to delte and replace, and many other things that are in use by stuido. I also refer you to Nielms dynamic menu STVi, so that you can add menues at will, very simply. http://forums.sage.tv/forums/showthread.php?t=13527
__________________
Server SageTv 6.3.5, Core2Duo 6300 ,2Gigs ,Saphire x1650, PVR250, 2*320GB + 160GB, java 1.6.1 Client SageTV Client 6.3.5 , AMD 3000, 1024Mb, Saphire x1600Pro256HDMI, java 1.6.1 Using Nielm's Web server 2.22 |
#19
|
||||
|
||||
I loaded your STVi, but I do not see any of the buttons you describe - E.G. EPG Update, Video Redo, etc.
Do I need to configure something to get it to work? |
#20
|
|||
|
|||
did u happen to see the prerequisits:
This STVI is for the regular SageStv, it assumes you have enabled the Unofficial secrets (in the the system information screen). another prerequisit: Nielms dynamic menu. btw, I will be putting out a version soon that does not need these pre requisits, but currently, they are needed.
__________________
Server SageTv 6.3.5, Core2Duo 6300 ,2Gigs ,Saphire x1650, PVR250, 2*320GB + 160GB, java 1.6.1 Client SageTV Client 6.3.5 , AMD 3000, 1024Mb, Saphire x1600Pro256HDMI, java 1.6.1 Using Nielm's Web server 2.22 |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|