|
SageTV v7 Customizations This forums is for discussing and sharing user-created modifications for the SageTV version 7 application created by using the SageTV Studio or through the use of external plugins. Use this forum to discuss plugins for SageTV version 7 and newer. |
|
Thread Tools | Search this Thread | Display Modes |
#821
|
||||
|
||||
Try to learn this groovy but coming from 0 prior experience so a lot of trial/error adn guess work from other examples. Coming hard.
Wanting to have a test script to check if MF is currently being watched. Found where MediaHelpers isBeingWatched would get me the value but no matter the umpteen different variations of trying to get that value, still getting errors. Below is just 1 of my attempts. Will continue trial/error or someone helps show me the way out of this wilderness Code:
/* Pretest if MediaFile is currently being Watched */ String fileName = SJQ4_METADATA.get("SJQ4_LAST_SEGMENT"); boolean Watching = MediaFileHelpers.isBeingViewed(fileName); if(Watching) { println("Is Being Viewed; return task to queue!") return 2 } else { println("Is not being Viewed: executing the task now") } return 2 |
#822
|
||||
|
||||
ok...got past the errors but not getting correct results
import of the MediaHelpers resolved the errors Code:
/* Pretest if MediaFile is currently being Watched */ import com.google.code.sagetvaddons.groovy.api.MediaFileHelpers String fileName = SJQ4_METADATA.get("SJQ4_LAST_SEGMENT"); if( MediaFileHelpers.isBeingViewed(fileName) ) { println(" is being viewed; Return task to queue!") return 1 } else { println(" is not being viewed: executing the task now") } return 2 on an HD300, I assign the task to that same show. The test gives me " is not being viewed: executing the task now" instead of the expected " is being viewed; Return task to queue!" <sigh> |
#823
|
||||
|
||||
Got it to work. Boy this is going to be a bit more of a learning curve than V3 was. But eventually will get it I guess. Code:
/* Pretest if MediaFile is currently being Watched */ import com.google.code.sagetvaddons.groovy.api.MediaFileHelpers String id = SJQ4_METADATA.get("SJQ4_ID"); String fileName = SJQ4_METADATA.get("SJQ4_LAST_SEGMENT"); Object mediaFile = MediaFileAPI.GetMediaFileForID(id.toInteger()); println( MediaFileHelpers.isBeingViewed(mediaFile) ); println( fileName ) ; return 2 |
#824
|
||||
|
||||
ok...next question and I haven't found the docs on the Class yet.
Code:
ServerClient sc = new ServerClient(); sc.scheduleMediaScan(); Or is there a way to have a Task kick off when a scheduleMediaScan completes? Also, where is the javadocs for Tools class? Code:
Tools.setTaskResources Tools.setExeArgs Last edited by graywolf; 06-04-2011 at 04:41 PM. |
#825
|
|||
|
|||
Quote:
Quote:
Code:
Global.RunLibraryImportScan(true) Quote:
__________________
Twitter: @ddb_db Server: Intel i5-4570 Quad Core, 16GB RAM, 1 x 128GB OS SSD (Win7 Pro x64 SP1), 1 x 2TB media drive Capture: 2 x Colossus STB Controller: 1 x USB-UIRT Software:Java 1.7.0_71; SageTV 7.1.9 Clients: 1 x HD300, 2 x HD200, 1 x SageClient, 1 x PlaceShifter Plugins: Too many to list now... |
#826
|
||||
|
||||
Excellent. Got a logical flow of how the mods I want for the mv_media, just need to figure out the rest.
Just need to figure out how to get the new ID for the moved show once the Scan completes for post-move processing. I'm assuming the SJQ4 metadata values would no longer be valid after the move/scan. Well I'm starting to understand a little about the javadocs and how to read them...at least I hope so. |
#827
|
|||
|
|||
Quote:
MediaFileAPI.GetMediaFileForFilePath() Just create a new File object representing the new path of the moved file and pass that to the above method. It will return the new media file object. This only works if you wait until the media scan is complete.
__________________
Twitter: @ddb_db Server: Intel i5-4570 Quad Core, 16GB RAM, 1 x 128GB OS SSD (Win7 Pro x64 SP1), 1 x 2TB media drive Capture: 2 x Colossus STB Controller: 1 x USB-UIRT Software:Java 1.7.0_71; SageTV 7.1.9 Clients: 1 x HD300, 2 x HD200, 1 x SageClient, 1 x PlaceShifter Plugins: Too many to list now... |
#828
|
||||
|
||||
wonderful wonderful wonderful...you have helped save my blurry eyes.
that is exactly my intention. |
#829
|
|||
|
|||
New thread to share SJQv4 Ideas and code
I created a new thread, separate from this one, for sharing SJQv4 ideas and code. This thread rocks, but is more nuts and bolts. I am hoping my new thread will be for sharing ideas for SJQv4. Hopefully it takes off!
http://forums.sagetv.com/forums/showthread.php?p=501009
__________________
HP m9040n Quad Core 2.4Ghz, Windows7 Ultimate, Ceton 4 tuner CableCard with SageDCT, 2 HDHomeRun QAM, Netgear 24 Port GiGE Switch, Linksys WRT600N Router, 3 HD200 Extenders, 2 SageTV Clients Server: SageTV 7 |
#830
|
|||
|
|||
Can't Access SJQ Through Web Apps
I am having an issue and am looking for some help. Some time ago I installed SJQ and played around a bit before uninstalling. Recently (yesterday), I decided to purchase a license for Slugger's plugins and want to give SJQ another spin. After installing the plugin from the Sage plugin manager, I went to web apps to begin to configure it. I see an app called "sjq" with version # 4.0.0.1426 and when I click on it, it gives me a "HTTP ERROR: 503 Problem accessing /sjq/. Reason: SERVICE_UNAVAILABLE" error. I tried restarting Sage and that did not fix it. I tried uninstalling and reinstalling SJQ and I still get the same results. When I click on "Configure Plugin" from the GUI, it tells me that the plugin is "Licensed". Anyone have any idea on what is going on here or how to fix it? Thanks.
__________________
Server: SageTV Media Center 7.1.19, Windows 7 Home Premium x64, Pentium Core2Duo, 4GB RAM, (1) Hauppauge HVR-2250, (1) Hauppauge HVR-1600, 1.5 TB of recording space Android MiniClient: Nvidia Shield TV (16GB) HDMI out to Samsung LN46C630 46" LCD Extender: STP-HD300, beta firmware "20110506-0", HDMI out to LG 37LD450 37" LCD |
#831
|
|||
|
|||
Quote:
__________________
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 |
#832
|
|||
|
|||
Quote:
__________________
Server: SageTV Media Center 7.1.19, Windows 7 Home Premium x64, Pentium Core2Duo, 4GB RAM, (1) Hauppauge HVR-2250, (1) Hauppauge HVR-1600, 1.5 TB of recording space Android MiniClient: Nvidia Shield TV (16GB) HDMI out to Samsung LN46C630 46" LCD Extender: STP-HD300, beta firmware "20110506-0", HDMI out to LG 37LD450 37" LCD |
#833
|
|||
|
|||
Updated task client and SageGroovy builds available
Updated task client and SageGroovy builds are now available. This update simply updates the upstream jars used in these apps. Of significance, is the update to the gtools jar. This update adds many new extender device features that you can use from your Groovy scripts. Namely, there are now methods available to power on, power off, reboot and query the status of extender devices. These features were tested on HD100 and HD200 devices. I don't have HD300s nor MediaMVPs to test against. Rumour has it, the HD300s should work fine and the MediaMVPs probably not so much.
If someone needs/wants support for MediaMVP devices, they simply have to provide me telnet access to the device for an hour or two so I can test and tweak the code. Same for HD300 support, if it doesn't work. A quick example of what you can now do in Groovy with this update: Code:
import com.google.code.sagetvaddons.groovy.api.GlobalHelpers println GlobalHelpers.powerOnExtenderHost('192.168.0.30') Code:
true Happy scripting! EDIT: In case I haven't mentioned this before, the gtools.jar file can be used in Java code as well, since I compile that library to byte code. To use gtools.jar in Java, you simply include the jar on your classpath along with the groovy-all-1.7.10.jar plus the other dependencies my library code uses (sagex-api, commons-net, commons-lang). This library provides a lot of nice convenience methods, though if writing pure Java, the dependency on Groovy might be a little heavy for some devs (but well worth it if you like the convenience).
__________________
Twitter: @ddb_db Server: Intel i5-4570 Quad Core, 16GB RAM, 1 x 128GB OS SSD (Win7 Pro x64 SP1), 1 x 2TB media drive Capture: 2 x Colossus STB Controller: 1 x USB-UIRT Software:Java 1.7.0_71; SageTV 7.1.9 Clients: 1 x HD300, 2 x HD200, 1 x SageClient, 1 x PlaceShifter Plugins: Too many to list now... Last edited by Slugger; 06-11-2011 at 10:15 AM. |
#834
|
||||
|
||||
Have you issued the new licenses yet?
|
#835
|
|||
|
|||
__________________
Twitter: @ddb_db Server: Intel i5-4570 Quad Core, 16GB RAM, 1 x 128GB OS SSD (Win7 Pro x64 SP1), 1 x 2TB media drive Capture: 2 x Colossus STB Controller: 1 x USB-UIRT Software:Java 1.7.0_71; SageTV 7.1.9 Clients: 1 x HD300, 2 x HD200, 1 x SageClient, 1 x PlaceShifter Plugins: Too many to list now... |
#836
|
||||
|
||||
Quote:
I've got an MVP and an HD300. Let me know if you want to test against them and I'll set it up for you. (Can't be today, I'm about the leave the house.) 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. |
#837
|
|||
|
|||
Yeah, I'll email you some evening this week. I'm pretty sure the HD300 will work with zero code changes. The MVPs will need some tweaking, I'm sure.
__________________
Twitter: @ddb_db Server: Intel i5-4570 Quad Core, 16GB RAM, 1 x 128GB OS SSD (Win7 Pro x64 SP1), 1 x 2TB media drive Capture: 2 x Colossus STB Controller: 1 x USB-UIRT Software:Java 1.7.0_71; SageTV 7.1.9 Clients: 1 x HD300, 2 x HD200, 1 x SageClient, 1 x PlaceShifter Plugins: Too many to list now... |
#838
|
|||
|
|||
Help! Can't delete or modify a client
I am not able to delete or modify a client. I have changed the IP address of the client in question (made it static), but I can't update it in SageTV. If I try to delete it, the GUI (on the server) hangs when I click yes to the delete it prompt.
If I try to modify it and enter the new ip address, after making the change in the pop up, and then trying to commit the changes, I get this error "Internal Error Creating new AgentClientClient" On a possibly related side note, I am not able to SRE overrides in the GUI either, and get an error when I do that too. Something is awry in my Slugger world of awesome plugs. I checked the logs, and dont see any errors in the logs.
__________________
HP m9040n Quad Core 2.4Ghz, Windows7 Ultimate, Ceton 4 tuner CableCard with SageDCT, 2 HDHomeRun QAM, Netgear 24 Port GiGE Switch, Linksys WRT600N Router, 3 HD200 Extenders, 2 SageTV Clients Server: SageTV 7 |
#839
|
|||
|
|||
Quote:
An alternative would be to directly edit the database to make these changes. If you're unsure what you're editing in there, then stop and ask otherwise you'll foobar the SJQv4 db, but it's pretty straightforward. You'll want to edit the client table when you get in there. Quote:
__________________
Twitter: @ddb_db Server: Intel i5-4570 Quad Core, 16GB RAM, 1 x 128GB OS SSD (Win7 Pro x64 SP1), 1 x 2TB media drive Capture: 2 x Colossus STB Controller: 1 x USB-UIRT Software:Java 1.7.0_71; SageTV 7.1.9 Clients: 1 x HD300, 2 x HD200, 1 x SageClient, 1 x PlaceShifter Plugins: Too many to list now... |
#840
|
|||
|
|||
The Web UI for SRE works fine, so I will follow up with Tom for the SRE and SJQ issues.
I was finally able to delete and re-add my client (not sure why, but a reboot did the trick!), which I did before I saw your post, but thanks for the "Edit DB" trick.
__________________
HP m9040n Quad Core 2.4Ghz, Windows7 Ultimate, Ceton 4 tuner CableCard with SageDCT, 2 HDHomeRun QAM, Netgear 24 Port GiGE Switch, Linksys WRT600N Router, 3 HD200 Extenders, 2 SageTV Clients Server: SageTV 7 |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Plugin: MizookLCD (Alternate SageTV LCDSmartie Plugin) | cslatt | SageTV Customizations | 48 | 06-11-2012 10:44 AM |
SJQv4: Technology Preview | Slugger | SageTV v7 Customizations | 39 | 12-17-2010 01:17 PM |
SageTV Plugin Developers: Any way to see stats for your plugin? | mkanet | SageTV Software | 4 | 12-12-2010 10:33 PM |
MediaPlayer Plugin/STV Import: Winamp Media Player Plugin | deria | SageTV Customizations | 447 | 12-11-2010 07:38 PM |
SJQv4: Design Discussion | Slugger | SageTV v7 Customizations | 26 | 10-18-2010 08:22 AM |