|
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 |
#1321
|
||||
|
||||
Yes. Can easily live with that. Greatly appreciated
|
#1322
|
||||
|
||||
QQ. How do you specify within Groovy which SageTV Server to use?
Since I have multiple SageTV Servers running |
#1323
|
|||
|
|||
Grab the javadocs for sagex and lookup SageAPI.setProvider(); you'll want to pass it an instance of RMISageAPI with the host or IP of the Sage server you want to force sagex to connect to.
__________________
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... |
#1324
|
|||
|
|||
I just reinstalled sage onto windows 8. I copied over my stuff from before to do comskip, but I'd like to have restart the service nightly and also do backups. Before I had batch files/windows scheduled tasks to do that.
One thing I see is that even with UAC off and the account an administrator, I cannot launch a batch file with elevated privileges...it won't let me start/stop the sage tv service. How do you guys get around that? And would anyone be willing to share or point me to where I could find some examples for the restart and for the backup? |
#1325
|
|||
|
|||
Quote:
https://sagetv-addons.googlecode.com...up_test.groovy https://sagetv-addons.googlecode.com..._backup.groovy The first is the test script to determine if it's "safe" to shutdown Sage. The second script is the actual backup script. Read the comments in both carefully.
__________________
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... |
#1326
|
|||
|
|||
Quote:
Also one issue I had with the test script is that I may have extenders connected but not doing anything...so simply testing for connection is going to keep it from running. Does anyone have an example on how to test if an extender is actually playing something? |
#1327
|
|||
|
|||
Quote:
Quote:
Specifically, the isMediaPlaying() method is probably what you're looking for.
__________________
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... |
#1328
|
|||
|
|||
Quote:
|
#1329
|
|||
|
|||
Quote:
script:C:/path/to/script/full_backup.groovy
__________________
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... |
#1330
|
|||
|
|||
Quote:
|
#1331
|
|||
|
|||
Well I must be doing something obviously wrong, but I am not sure what it is...
if (Global.isMediaPlaying()) { println "Something is playing" return 1 } Gives this: Caused by: groovy.lang.MissingMethodException: No signature of method: sagex.api.Global.isMediaPlaying() is applicable for argument types: () values: [] |
#1332
|
|||
|
|||
Quote:
At the top: com.google.code.sagetvaddons.groovy.api.GlobalHelpers You're calling it incorrectly. You need to import the GlobalHelpers class and then call: GlobalHelpers.isMediaPlaying()
__________________
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... |
#1333
|
|||
|
|||
Quote:
import com.google.code.sagetvaddons.groovy.api.GlobalHelpers; Now the test passes but the other script fails with this: javax.script.ScriptException: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: Script1.groovy: 179: The class 'BackupMatcher' has an incorrect modifier private I changed the class to public and it works...but not sure why it didn't work from the original example |
#1334
|
|||
|
|||
The example was written against Groovy 1.x. Recently, Groovy was upgraded to 2.0 and private members are no longer valid in groovy scripts. Changing it to public is the fix. The (generic) issue/fix was discussed somewhere in this thread when the upgrade to Groovy 2.0 was done.
__________________
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... |
#1335
|
|||
|
|||
Quote:
|
#1336
|
||||
|
||||
Quote:
Code:
/* SageTV backup tool tester (i.e. is it "safe" to stop and backup SageTV?) Last Modification: 2011-11-21 Original Author: Derek Battams <derek AT battams DOT ca> Use this script as the test for the full_backup.groovy script. Basically this script just checks a bunch of conditions to determine if it is "safe" to shutdown SageTV and perform the app dir backup. Remove/add/modify conditions to your needs below. Remember, return 1 to push the task back to the queue, 0 to tell SJQ to run the backup script or 2 to tell SJQ to skip the backup. */ def now = System.currentTimeMillis() def reqdMins = 45L int ScheduledRecording = 0 ; println " "; Global.GetScheduledRecordingsForTime(now, now + (reqdMins * 60000L)).each { mfAiring -> if( AiringAPI.IsNotManualOrFavorite(mfAiring) ) { println (ShowAPI.GetShowTitle(mfAiring) + " is LiveTV - no issue"); } else { ScheduledRecording = ScheduledRecording + 1 ; println ( ShowAPI.GetShowTitle(mfAiring) + " is Scheduled to record within $reqdMins minutes") ; } } if ( ScheduledRecording > 0 ) { // Scheduled Recording upcoming, Return for when it is safe println ( "Returned to Queue until safe to process"); sleep 900000 return 1 } else { // Looks to be safe, let's do this!! println ("Safe to kick off Backup job. No recordings scheduled within $reqdMins minutes"); return 0 } |
#1337
|
||||
|
||||
Quote:
Just need to find some "downtime" to work on it without breaking anything. |
#1338
|
|||
|
|||
Quote:
__________________
New Server - Sage9 on unRAID 2xHD-PVR, HDHR for OTA Old Server - Sage7 on Win7Pro-i660CPU with 4.6TB, HD-PVR, HDHR OTA, HVR-1850 OTA Clients - 2xHD-300, 8xHD-200 Extenders, Client+2xPlaceshifter and a WHS which acts as a backup Sage server |
#1339
|
|||
|
|||
Quote:
Directly connect to the H2 database and clean up the queue. I've never been able to pinpoint the cause of this situation as I've never experienced it myself, but there's obviously a condition that occurs that results in multiple (copies?) of jobs being added to the queue and constantly rerun.
__________________
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... |
#1340
|
|||
|
|||
How do I connect to the H2 database? I read this but it doesn't really see to apply?
https://code.google.com/p/sagetv-add...ki/H2LobsCache D I follow the instructions from here https://code.google.com/p/sagetv-add...ModifyDatabase
__________________
New Server - Sage9 on unRAID 2xHD-PVR, HDHR for OTA Old Server - Sage7 on Win7Pro-i660CPU with 4.6TB, HD-PVR, HDHR OTA, HVR-1850 OTA Clients - 2xHD-300, 8xHD-200 Extenders, Client+2xPlaceshifter and a WHS which acts as a backup Sage server |
Currently Active Users Viewing This Thread: 4 (0 members and 4 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 |