|
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 |
#1401
|
|||
|
|||
Right... wow it's been so long since I've touched any of my SJQ scripts that I've forgotten how I even implemented this stuff. I think it's more to do with how I wish I had done it and how I would have done it for SJQv5 had that ever seen the light of day.
Anyway, yeah, the API variables are actually injected into the scripts automatically so you don't need to import anything. But you don't prefix with "Global". See here. I actually had to go skim over this to remind myself. So to iterate through the system messages and delete specific ones, I might do something like this (all completely untested): Code:
// Find and delete every system message that contains the word 'Halt' in its message text SystemMessageAPI.GetSystemMessages().findAll { SystemMessageAPI.GetSystemMessageString(it).contains('Halt') }.each { SystemMessageAPI.DeleteSystemMessage(it) }
__________________
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... |
#1402
|
||||
|
||||
Actually, i seemed to have sorted it out as you were typing that it seems. Here's what I ended up with:
Code:
if(SJQ4_METADATA.get("SJQ4_MSG_TYPE")=="Halt Detected in Recording") { if(SJQ4_METADATA.get("SJQ4_TEXT").contains("VIP-211-1")) { if (Integer.parseInt(SJQ4_METADATA.get("SJQ4_COUNT")) == 2) { for ( obj in SystemMessageAPI.GetSystemMessages() ) { if(SystemMessageAPI.GetSystemMessageString(obj)==SJQ4_METADATA.get("SJQ4_TEXT")) { SystemMessageAPI.DeleteSystemMessage(obj); } } SystemMessageAPI.PostSystemMessage(1204,2,"R5000HD Software was reset due to : " + SJQ4_METADATA.get("SJQ4_TEXT"), null); return 0; } else { return 2; } } else { return 2; } } else { return 2; }
__________________
Buy Fuzzy a beer! (Fuzzy likes beer) unRAID Server: i7-6700, 32GB RAM, Dual 128GB SSD cache and 13TB pool, with SageTVv9, openDCT, Logitech Media Server and Plex Media Server each in Dockers. Sources: HRHR Prime with Charter CableCard. HDHR-US for OTA. Primary Client: HD-300 through XBoxOne in Living Room, Samsung HLT-6189S Other Clients: Mi Box in Master Bedroom, HD-200 in kids room |
#1403
|
||||
|
||||
I must have screwed up something unknowingly. I've got a few tasks that simply are stuck. Not active, the associated .exe's aren't running, so I know their are dead, but sjq won't let me delete them and won't go on to do other work. I've tried a restart of sage as well with no luck. Any suggestions on this greatly appreciated, I'm lost.
|
#1404
|
|||
|
|||
You might have to remove the entries from the db manually:
https://code.google.com/p/sagetv-add...ModifyDatabase
__________________
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... |
#1405
|
||||
|
||||
I did try that, just did again hoping for a different outcome. What I get is if I do a query in the console of "SELECT * FROM QUEUE " I get get the full queue list, as expected, so far so good. If I run the various commands from your post #775, such as "DELETE * FROM queue WHERE state = 'WAITING'" I get "DELETE * FROM queue WHERE state = 'WAITING';
Syntax error in SQL statement "DELETE *[*] FROM QUEUE WHERE STATE = 'WAITING' "; expected "identifier"; SQL statement: DELETE * FROM queue WHERE state = 'WAITING' [42001-145] 42001/42001 (Help)" as the output. When I do "DELETE * FROM queue" I get the same sort of output. What I'd really like to do is just clear the queue and remove all tasks and clear the clients assigned tasks. Then I can add back what I want. |
#1406
|
|||
|
|||
Ok, I updated 775, the SQL syntax is wrong.
Drop the * in the queries, then they should work. So DELETE FROM queue WHERE state = 'WAITING'
__________________
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... |
#1407
|
||||
|
||||
Quote:
DELETE FROM queue WHERE state = 'WAITING'; Row not found when trying to delete from index "PUBLIC.FK_CLIENT__QUEUE_INDEX_1: ( /* key:33352 */ 33352, 'CUT', TIMESTAMP '2013-11-04 16:30:27.717', NULL, NULL, 'WAITING', NULL, NULL, FALSE)"; SQL statement: DELETE FROM queue WHERE state = 'WAITING' [90112-145] 90112/90112 (Help) |
#1408
|
|||
|
|||
Your database file is corrupted. If you have a backup, restore it. If not, I'm afraid you're going to have to delete the entire database and start fresh.
__________________
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... |
#1409
|
||||
|
||||
No problem, just the sjq4.h2.db file?
|
#1410
|
|||
|
|||
You must stop SageTV first then go to the following dir and remove the following files and subdir (the .lock.db file probably won't be there, that's ok).
Code:
Directory of C:\Program Files (x86)\SageTV\SageTV\plugins\sjq 11/05/2013 11:05 AM 2,889,728 sjq4.h2.db 11/05/2013 04:12 AM <DIR> sjq4.lobs.db 11/05/2013 03:31 AM 103 sjq4.lock.db
__________________
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... |
#1411
|
||||
|
||||
Thanks again Slugger, that did it! Wonder what happened...glad my backups are working at least!
|
#1412
|
||||
|
||||
I had to reiinstall SAgeTV and I cannot remember how did I set up to use Groovy script to restart SageTV when there no recording going on.
I remember using stand alone Groovy exe and I download it but it giving me a license not found error when I tried to set it up. Is there a new way of restarting SageTV nightly using this script or still need to use stand alone exe? Still struggling trying to make this work again Can anyone here help me out ? Thank you Bill
__________________
HTPC System GIGABYTE GA-MA69GM-S2H AM2 AMD 690G HDMI // AMD Athlon 64 X2 6000+ Windsor 3.0GHz // G.SKILL 6GB (2 x 2GB) 240-Pin DDR2 SDRAM DDR // Hauppauge Colossus HD-PVR // Hauppauge Colossus HD-PVR // Seagate ST3750640AS 750GB SATA-300 16MB // DVD R/W - SAMSUNG Black Media Extenders HD300 HTPC Software Windows 7 Professional 64bits // SageTV 7.1.x // Java 1.7.x |
#1413
|
|||
|
|||
Follow this tutorial, except use the script below instead of the mentioned exe script (you can use the mentioned test script as is).
Code:
Utility.ServerRestart() sleep 300000 return 0
__________________
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... |
#1414
|
||||
|
||||
Quote:
Thank you Bill
__________________
HTPC System GIGABYTE GA-MA69GM-S2H AM2 AMD 690G HDMI // AMD Athlon 64 X2 6000+ Windsor 3.0GHz // G.SKILL 6GB (2 x 2GB) 240-Pin DDR2 SDRAM DDR // Hauppauge Colossus HD-PVR // Hauppauge Colossus HD-PVR // Seagate ST3750640AS 750GB SATA-300 16MB // DVD R/W - SAMSUNG Black Media Extenders HD300 HTPC Software Windows 7 Professional 64bits // SageTV 7.1.x // Java 1.7.x |
#1415
|
||||
|
||||
I started a new thread, but maybe it should be here instead as I'm thinking it's related to sjq pretty directly....http://forums.sagetv.com/forums/showthread.php?t=61004
|
#1416
|
|||
|
|||
The connections from SJQ are normal. They will timeout and clean themselves up based on the TCP settings on your system. This is usually like 5 minutes or so. But that seems like a lot of active connections, but that could be normal based on the number of jobs you have setup in SJQ. If you're running Windows 7 then this may or may not help:
https://www.google.ca/url?sa=t&rct=j...57155469,d.aWM Note: Just a quick google search, I have no idea if that's an issue or is related, etc. Use at your own risk.
__________________
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... |
#1417
|
|||
|
|||
"Normal" meaning that Windows should clean things up in a timely manner. It's probably a bug in the SJQ task client or server code where one side is closing the connection and the other side isn't explicitly acknowledging the close, which is probably why the socket remains open until Windows times it out and cleans it up.
At this stage of the game, a fix is very unlikely (the current code has been out there since June 2011 so it hasn't been a widespread problem/my familiarity with the code at this point is low, to say the least), but if you provide the stack trace of the connection refused errors you're seeing I will try to diagnose the issue and if it's a critical bug then I might release a fix.
__________________
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... |
#1418
|
||||
|
||||
That's helpful, I was starting to go that route, but saw this large number of open ports for sagetv. There are a running (approx) 30 open ports waiting, yes they time out but new ones pop up at the same rate. current task queue shows 2 jobs running, 6 waiting. The completed tasks is closer to 30 though....
I've also noticed that the HD300's keep opening ports related to something else running on the same box, so they also leave lots of open/waiting ports. It's probably a perfect storm of danglers that clears up, but only after the damage is done. Thx. |
#1419
|
||||
|
||||
Quote:
Understood that it's EOL and probably not going to see a fix. But it's possible I'm doing something in my scripts that's exploiting a problem that I can do differently? If I knew how to get any more info related to stack trace I'd be happy to provide, the only think I find via a web search is "Thread .currentThread().getStackTrace()." which I suppose I could throw in a suspect script with a Println which would get it in the task log file, but I'm not sure that's what you mean. Maybe you're suggesting a netsh trace? |
#1420
|
|||
|
|||
You said you were getting connection refused errors. I assume where ever you saw that error would also have a stack trace attached to it. Where are you seeing those errors logged?
And the last SJQ server release was indeed on June 20, 2011; the last task client release was Oct 18, 2011. Boy how time flies.
__________________
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; 12-04-2013 at 01:40 PM. |
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 |