![]() |
|
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 |
#1241
|
|||
|
|||
It looks great - I love the animated dropdown menus, and it is great to be able to get SJQ info via the web. How do I inject my own menu items?
__________________
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 |
#1242
|
|||
|
|||
I updated SJQ and now I have a script failing from SJQ - however this script runs fine from the SageGroovyConsole. Perhaps something in the new version of Groovy is causing the problem as I assume that the SageGroovyConsole has not been updated.The script attempts to send an email with today's recordings. Here is the error:
Code:
===== Mon Oct 22 00:25:26 EDT 2012 ===== LOG4J: Configured Logging for: sagex-api using file: sagex-api.log4j.properties ----- error ----- javax.script.ScriptException: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: Script1.groovy: 27: The class 'EmailSettings' has an incorrect modifier private. @ line 27, column 1. private class EmailSettings { ^ 1 error at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:138) at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:124) at com.google.code.sagetvaddons.sjq.agent.ScriptRunner.exec(ScriptRunner.java:114) at com.google.code.sagetvaddons.sjq.agent.ScriptRunner.main(ScriptRunner.java:175) Caused by: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: Script1.groovy: 27: The class 'EmailSettings' has an incorrect modifier private. @ line 27, column 1. private class EmailSettings { ^ 1 error at org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollector.java:309) at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:1054) at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:564) at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:542) at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:519) at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:279) at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:258) at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:244) at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:202) at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.getScriptClass(GroovyScriptEngineImpl.java:354) at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:130) ... 3 more ------------------ ============================== Code:
private class EmailSettings { static def sendMail = true // Set this to false to just dump the alert msg to stdout instead of emailing it static def host = 'smtp.gmail.com' static def user = 'wayner@gmail.com' static def pwd = '****' static def port = '465' static def subj = 'Sage Recordings for Today' static def from = user // Gmail will reject mail via SMTP if the from addr != user id so no point in changing this static def to = 'wayner@gmail.com' // Sometimes Gmail won't send an email addressed to yourself, try a plus address at the end; YMMV static def ssl = 'true' // Gmail requires SSL, other SMTP servers may or may not; this is a STRING setting! } def sendMail(def msg) { def ant = new AntBuilder() ant.mail(mailhost: EmailSettings.host, mailport: EmailSettings.port, subject: EmailSettings.subj, user: EmailSettings.user, password: EmailSettings.pwd, ssl: "true") { from(address: EmailSettings.from) to(address: EmailSettings.to) message(msg) } }
__________________
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 |
#1243
|
|||
|
|||
Yup, I touched on this a few posts back, but Groovy 2.0 does not allow the use of private fields, methods, nor classes in top level scripts. The fix is as simple as removing the private key word from the class definition.
__________________
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... |
#1244
|
|||
|
|||
Quote:
https://code.google.com/p/sagetv-add...sIntoWebUIMenu Beware of the bug I describe at the bottom of that page. Just discovered that now while writing that doc. Basically, only injections of new top level menus currently works, the mechanism described to inject items into existing menus does not work. I'm in no hurry to go fixing that bug unless enough people express the desire to actually use the functionality.
__________________
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... |
#1245
|
|||
|
|||
A new build of SageGroovy has been uploaded to Google Code that upgrades Groovy to 2.0.5.
__________________
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... |
#1246
|
|||
|
|||
I know we are getting into a lot of Sage Web server discussion in the SJQ thread, but one thing that should really be added to the Sage Web home page is the Java Heap status - there is a bunch of other status type of info but for some reason this is missing.
__________________
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 |
#1247
|
|||
|
|||
Great, thanks Slugger. If users come up with a bunch of useful additional items would it be possible to bundle these into the core product? Two things that I would like to add to the system are the ability to restart the SageTVService, and a Client/Extender status report.
__________________
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 |
#1248
|
|||
|
|||
Quote:
![]() Quote:
And now we are way off topic here, please take any follow ups from this over to the web UI thread. Thanks.
__________________
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... |
#1249
|
|||
|
|||
To get back to SJQ - would it be possible to add other events that would trigger SJQ tasks. Items like Client/Context connected/disconnected, SageTV service start, etc. The SageAlert list of Events would even be a good starting point.
I guess I could trigger a Process Executor from SageAlert that kicks off a Groovy script, but it would likely be cleaner to do everything within SJQ.
__________________
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 |
#1250
|
|||
|
|||
Quote:
Quote:
![]() One of the major things still preventing me from upgrading to SJQ v4 is the lack of a web ui... Sounds like i might need to carve out an evening or 2 to upgrade...
__________________
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 |
#1251
|
|||
|
|||
I imagine Slugger will chime in on this, but here is my recollection...
About a year or more ago Slugger added the capability to use Groovy scripts to develop your own Sage web pages. I believe he did this to facilitate addin a web UI to SJQv4, amont other things, and he created the SJQ code for it at that time but it was kind of undocumented and hidden away although if you knew the path you could get to it. Due to the declining interest in Sage, and his lack of time he kind of stepped back from enhancing these plugins. You can use it to browse the Queue, browse clients, enter all of the arguments for a task, I think pretty much everything you could do in the previous versions of SJQ. And now you can write tasks that can be linked to web pages - like just hitting a web page to cause a restart of your Sage service.
__________________
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 Last edited by wayner; 10-22-2012 at 01:58 PM. |
#1252
|
|||
|
|||
Quote:
![]() Is it possible? Yes. Is it likely... hmmmmm... probably not. ![]() The various updates and builds of other things over the weekend only happened because I need/want to upgrade to Groovy 2.0 for the EPG plugin. The initial web server build was a necessity to fix the Groovy support in the web ui that Groovy 2.0 would have broken with no update. The other couple builds were a bonus because I already had the code open, wanted the plugin manager fix and since you asked nicely I threw in the new menu as well (which, I'll admit, is also something I certainly didn't mind having). Even that didn't get released bug free (can't inject into existing menus as planned). But I have no desire to do another build just to fix that - until I actually want to inject into existing menus (or there's an overwhelming cry from the masses to fix it). Quote:
And, as always, I gladly accept and will build user supplied patches. ![]()
__________________
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... |
#1253
|
|||
|
|||
Quote:
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... |
#1254
|
|||
|
|||
Quote:
Your plugins have made Sage hugely more useful and I use them all on a many times per day basis. I get Tweets and emails from SageAlert several times per day, SJQ processes all of my recordings, I get a daily email listing my recordings that uses Groovy and I use the Sage Web Server all the time. And if and when hockey ever starts up again I will get to use the most brilliant of all, SRE.
__________________
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 |
#1255
|
|||
|
|||
My system just just filled up due to lobs.db entries. Do these come from SJQ or another plugin.
The logs were filled with this: Code:
===== Wed Nov 07 21:37:20 EST 2012 ===== LOG4J: Configured Logging for: sagex-api using file: sagex-api.log4j.properties ----- stdout ----- ERROR: Invalid environment data passed to scritpt! ------------------
__________________
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 |
#1256
|
|||
|
|||
Yeah... likely a job was added to the queue and the media file for that object was deleted or somehow invalidated and the job got caught in an infinite loop of running, being sent back to the queue, retrying, back to the queue, retrying, etc. This issue was fixed long ago, but it seems you've found another code path to the issue.
The fix: Inspect your SJQ job queue and remove either 1) everything or 2) if you can spot the culprit then just remove that job. You'll also want to cleanup the H2 lobs cache. Unfortunately, unless you can pin point exactly what's causing it (and ideally reproduce it), I don't plan on investigating too deeply at this point (re: project EOL) unless you get lucky enough and I encounter the same issue in my environment at some point. In that case, I'm likely to dig deep into it and try to fix it. But the cause and fix I outline above is your next plan of attack.
__________________
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... |
#1257
|
|||
|
|||
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... |
#1258
|
|||
|
|||
There was nothing WAITING or RUNNING but I did delete all FAILED tasks. I then restarted the SageTV service. I will keep an eye on it to see what happens now.
__________________
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 |
#1259
|
||||
|
||||
I'm trying to get comskip working with SJQ4 now and, thanks to Slugger's help with code repurposed from (I think) wayner. I'm using the SJQ service so that I understand everything going on in the UI and because it's what I was using with SJQ3. Anyhow, I want to see if I understood the guide correctly.
This is from the guide: Code:
task.mytask.exe=C:/bin/mytask.exe # task.mytask.args=/f /g /t task.mytask.test=C:/scripts/mytask_precheck.groovy # task.mytask.testargs= # task.mytask.schedule=* * * * * # task.mytask.resources=100 # task.mytask.maxprocs=1 # task.mytask.rcmin=0 # task.mytask.rcmax=0 Code:
task.mytask.exe=C:/comskip/comskip.exe # task.mytask.args=/f /g /t task.mytask.test=C:/scripts/comskip.groovy # task.mytask.testargs= # task.mytask.schedule=* * * * * task.mytask.resources=33 task.mytask.maxprocs=3 # task.mytask.rcmin=0 # task.mytask.rcmax=0 Also, with how I have the resources set, is setting the maxprocs redundant? Well, I guess it wouldn't be if I had a task which required only 1 resource, right? I think I'm starting to understand this. ![]() Is that everything? Is the only other step to register the task client and then assign the task to each of my favorites? Ouch... that's going to take some time with nearly 100 of them... ![]()
__________________
Server: XP, SuperMicro X9SAE-V, i7 3770T, Thermalright Archon SB-E, 32GB Corsair DDR3, 2 x IBM M1015, Corsair HX1000W PSU, CoolerMaster CM Storm Stryker case Storage: 2 x Addonics 5-in-3 3.5" bays, 1 x Addonics 4-in-1 2.5" bay, 24TB Client: Windows 7 64-bit, Foxconn G9657MA-8EKRS2H, Core2Duo E6600, Zalman CNPS7500, 2GB Corsair, 320GB, HIS ATI 4650, Antec Fusion Tuners: 2 x HD-PVR (HTTP tuning), 2 x HDHR, USB-UIRT Software: SageTV 7 |
#1260
|
|||
|
|||
Quote:
Quote:
Quote:
What would I do? I'd write a groovy script that assigns the tasks to my favs in bulk and get SJQ to run it for me. (Actually, I'd do it slightly different, but since you've got SJQ setup, this is probably the easiest route to take.) Quick, off the cuff example (which may not exactly work, I didn't test it, but should show you what you're trying to do). Code:
// Attach the 'COMSKIP' task to every fav I have FavoriteAPI.GetFavorites().each { FavoriteAPI.SetFavoriteProperty(it, 'SJQ4_RecordingStopped', 'COMSKIP') } ![]() Of course, you probably want to only apply comskip to certain favs -- ones not recording from HBO, etc. It wouldn't be much fun if I wrote everything, so I leave that as an exercise for the reader. ![]() Happy scripting...
__________________
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... |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
![]() |
||||
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 |