|
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 |
#1201
|
||||
|
||||
Hey all, long story short, I just restored my Sage PC from an image and then restored my SageTV setup from a backup and now I am unable to get SJQ (server/plugin) to start, it keeps reporting as Failed in the SageTV plugin manager. This reminds me of the trouble I had where SJQ and Squeezebox server would conflict with each other, so I wonder if it's a port issue now that I have the Windows Firewall enabled for SageDCT. So anyone have any ideas on any ports I need to make sure are enabled for SJQ or anything else to check to get it running again?
|
#1202
|
|||
|
|||
Check the sagetv_0.txt log file... if the plugin failed to start, the exception that caused the failure should be logged there.
__________________
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... |
#1203
|
||||
|
||||
I'm not seeing anything obvious in the logs, though right now the plugin itself shows as enabled but the UI hangs whenever I try and do anything with SJQ. Which IIRC is exactly like when I had Squeezecenter installed and they had conflicting ports.
|
#1204
|
|||
|
|||
If that's the case then change the port that the H2 Database plugin listens on - that's the plugin/port that conflicts with the squeezebox server.
__________________
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... |
#1205
|
||||
|
||||
Except I don't have squeezebox server installed anymore. I tried adding 9092 to the firewall as an allowed port but that didn't make any difference.
|
#1206
|
|||
|
|||
Any clues in the sjq log files? SageTV\plugins\sjq4\*.log
If it's just the Sage UI for SJQ that's failing then it might be having problems of its own. I believe all of that is logged to the sage tv debug log, but I can't remember (tmiranda would be able to confirm). You can isolate it to a Sage UI only issue by installed the web UI addition for SJQ and seeing if that loads data from the sjq db, if it does then SJQ is working properly and you can focus on the UI plugin.
__________________
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... |
#1207
|
||||
|
||||
You know what it was, apparently (probably due to hooking up my HVR1950) Windows decided to add a "Microsoft TV/Video Connection" and it seem SJQ/H2 was binding to that instead of my real nic.
http://support.microsoft.com/kb/303302 Magically restarting (which I thought I'd done, but maybe not) seems to have fixed it. |
#1208
|
|||
|
|||
Oh Microsoft...
__________________
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... |
#1209
|
||||
|
||||
Switching to Cable, getting a cablecard tuner and trying to get SageDCT to work is turning out to be one of the bigger mistakes I've ever made in my system.
|
#1210
|
||||
|
||||
I'm planning to move to SJQ4 when I migrate to my VM of SageTV. Since I only have limited time to work on that (production system, swapping removable OS drives), I'd like to get as much info in advance as possible for next weekend's efforts. I haven't installed any SJQ in the VM yet, but I have read through the user guide, the metadata doc, the comskip tutorial, and even the comskip_test.groovy example. As proof, I offer up this minor typo from the script example:
Code:
println "ERROR: Invalid environment data passed to scritpt!" As I prepare to jump into this next weekend, is there a script or something I could reference for calling comskip based on the channel it's recorded on? From what I've read so far, it would appear that I'll need a separate groovy script for each channel I want to comskip. I suspect I will probably need to modify this code to do the channel check, correct? Code:
if(checkRecordingType && fileType != null && fileType.length() > 0 && !fileName.endsWith("." + fileType)) { println "Recording is not of specified type '${fileType}', skipping comskip!" return 2 } For comskip.exe, this will also require calling a unique comskip.ini file for each channel and that's where I'm getting lost, as I don't see any ini file being called in the example groovy script. I suspect that may be because the writer of the tutorial was actually using Show Analyzer, yes? Or, could I just append the correct comskip.ini to either the "Executable" or "Executable Arguments" lines in the UI? As the tutorial only references variables from the SJQ4metadata doc, I wasn't sure if those were the only variables acceptable on the Executable Arguments line. Thanks!
__________________
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 |
#1211
|
|||
|
|||
Here is my code for doing Show Analyzer and Comskip. I am going to be transitioning to using Comskip so things are a little confusing. However, you can see how I handle channel filtering.
Code:
Object mediaFile = MediaFileAPI.GetMediaFileForID(SJQ4_METADATA.get("SJQ4_ID").toInteger()) String channel = AiringAPI.GetAiringChannelName(mediaFile) /*String file = Tools.mapDir(SJQ4_METADATA.get("SJQ4_PATH") + "\\") + SJQ4_METADATA.get("SJQ4_LAST_SEGMENT")*/ String file = SJQ4_METADATA.get("SJQ4_PATH") + SJQ4_METADATA.get("SJQ4_LAST_SEGMENT") String fileType = SJQ4_METADATA.get("SJQ4_LAST_SEGMENT_TYPE") if(fileType == "mpg") { if(channel ==~ /KETA.*/) { println "Doesn't need comercials detected" } /*else if(channel ==~ /KFOR|KFORDT/) { println "Running SAKFOR" println file def command = "\"C:/Program Files (x86)/Dragon Global/ShowAnalyzer/ShowAnalyzer.exe\" -channelnumber 704 \"${file}\"".execute() command.consumeProcessOutput() command.waitFor() if (command.exitValue()) { return 1 } else { return 0 } }*/ else { println "Running Comskip" println file /*def command = "\"C:/Program Files (x86)/Dragon Global/ShowAnalyzer/ShowAnalyzer.exe\" \"${file}\"".execute()*/ def command = "\"C:/comskip/old/comskip.exe\" \"${file}\"".execute() command.consumeProcessOutput() command.waitFor() if (command.exitValue()) { //return 1 return 0 } else { //return 0 return 1 } } } if(fileType == "ts") { if(channel ==~ /KETA.*|ENC.*|EPIX|EPIXHD|TCM/) { println "Doesn't need commercials detected" return 0 } else if(channel ==~ /KFOR|KFORDT/) { println "Running SAV1KFOR" println file def command = "\"C:/Program Files (x86)/Dragon Global/ShowAnalyzerSuite/ShowAnalyzerEngine.exe\" --profile kfor \"${file}\"".execute() command.consumeProcessOutput() command.waitFor() if (command.exitValue()) { return 1 } else { return 0 } } else { println "Running Comskip" println file def command = "\"C:/Program Files (x86)/Dragon Global/ShowAnalyzerSuite/ShowAnalyzerEngine.exe\" \"${file}\"".execute() /*def command = "\"C:/comskip/comskip.exe\" \"${file}\"".execute()*/ command.consumeProcessOutput() command.waitFor() if (command.exitValue()) { return 1 //return 0 } else { return 0 //return 1 } } }
__________________
Server: i5 8400, ASUS Prime H370M-Plus/CSM, 16GB RAM, 15TB drive array + 500GB cache, 2 HDHR's, SageTV 9, unRAID 6.6.3 Client 1: HD300 (latest FW), HDMI to an Insignia 65" 1080p LCD and optical SPDIF to a Sony Receiver Client 2: HD200 (latest FW), HDMI to an Insignia NS-LCD42HD-09 1080p LCD |
#1212
|
||||
|
||||
Actually, even with my admittedly "hobbyist" programming experience, that's making pretty good sense to me. Thanks for that! I'll examine it a little more closely and see what I can do with it.
__________________
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 |
#1213
|
|||
|
|||
Quote:
|
#1214
|
|||
|
|||
I know of at least one other SageTV user who lives in Oklahoma. There aren't many.
__________________
Server: i5 8400, ASUS Prime H370M-Plus/CSM, 16GB RAM, 15TB drive array + 500GB cache, 2 HDHR's, SageTV 9, unRAID 6.6.3 Client 1: HD300 (latest FW), HDMI to an Insignia 65" 1080p LCD and optical SPDIF to a Sony Receiver Client 2: HD200 (latest FW), HDMI to an Insignia NS-LCD42HD-09 1080p LCD |
#1215
|
||||
|
||||
I took my first stab at this code and came up with some of my own, but then I compared it to the code here and noticed quite a bit more work being done in the test script. Was this just a portion of your code and I need to incorporate it into the test script? This probably sounds like a really dumb question, doesn't it?
I think I'm just missing how your code fits in with this tutorial.
__________________
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 |
#1216
|
|||
|
|||
Quote:
Code:
/* Title: Comskip Tester for SJQv4 Author: Derek Battams <derek AT battams DOT ca> Last Updated: 31 May 2011 Use this groovy script as the test for your SJQv4 comskip tasks. This version of the script allows you to skip running comskip if: * The recording file extension does not match the first command line argument passed to this script * If an edl (or equivalent) already exists in the same directory as the recording You can also configure this script to delay starting of comskip until the recording is completed. All of these settings are configured in the block below. Do not edit below the line specified unless you know what you're doing (and if you do then send me your bug fix patches, please). */ /*************** CONFIGURE VALUES IN THIS BLOCK ONLY! ***************/ def checkRecordingType = false // Check the recording is of the type specified on the command line (i.e. only process mpg recordings) def checkForEdl = true // If true, mark the task as skipped if an edl already exists def edlType = "edl" // The edl extension (i.e. some people use .txt comskip files instead of .edl files) def comskipLive = true // If false, this test will push the task back to the queue while the recording is in progress def ignoreLiveTv = false // If true, live tv recordings will never be added to the queue /********************************************************************/ /************************* DO NOT EDIT BELOW!! **********************/ // But if you do edit below to fix a bug, then email me the patch! ;) def idStr = SJQ4_METADATA.get("SJQ4_ID") if(!(idStr ==~ /\d+/)) { println "SJQ4_ID is not present in metadata; marking task as SKIPPED!" return 2 } def objType = SJQ4_METADATA.get("SJQ4_TYPE") if(objType != "MediaFile") { println "This script expects to run on a MediaFile object, but received '$objType'; marking task as SKIPPED!" return 2 } def mf = MediaFileAPI.GetMediaFileForID(Integer.parseInt(idStr)) def path = new File(SJQ4_METADATA.get("SJQ4_PATH")) def fileName = SJQ4_METADATA.get("SJQ4_LAST_SEGMENT") def fileType if(SJQ4_ARGS.length > 0) fileType = SJQ4_ARGS[0] else fileType = null if(mf == null || path == null || path.getAbsolutePath().length() == 0 || fileName == null || fileName.length() == 0) { println "ERROR: Invalid environment data passed to scritpt!" return 2 } def edl = fileName.substring(0, fileName.lastIndexOf('.')) + ".${edlType}" def edlFile = new File(path, edl) if(edlFile.exists()) { println "An edl already exists for this recording, skipping comskip!" println "Found '${edlFile.getAbsolutePath()}'" return 2 } if(checkRecordingType && fileType != null && fileType.length() > 0 && !fileName.endsWith("." + fileType)) { println "Recording is not of specified type '${fileType}', skipping comskip!" return 2 } if(ignoreLiveTv && AiringAPI.IsNotManualOrFavorite(mf)) { println "Recording is live TV or IR recording, skipping comskip!" return 2 } if(!comskipLive && MediaFileAPI.IsFileCurrentlyRecording(mf)) { println "Recording in progress, waiting..." return 1 } return 0
__________________
Server: i5 8400, ASUS Prime H370M-Plus/CSM, 16GB RAM, 15TB drive array + 500GB cache, 2 HDHR's, SageTV 9, unRAID 6.6.3 Client 1: HD300 (latest FW), HDMI to an Insignia 65" 1080p LCD and optical SPDIF to a Sony Receiver Client 2: HD200 (latest FW), HDMI to an Insignia NS-LCD42HD-09 1080p LCD |
#1217
|
||||
|
||||
Let me try asking the question differently. How does the script you provided in this thread get used by SJQ? Is this called via the "Test Script" parameter shown in the "Edit SJQ Task" screenshot of the guide, where the screenshot shows "//sagetv/SharedDocs/SageScripts/comskip_test.groovy"? In other words, your code would need to be in that folder and named "comskip_test.groovy", right?
Assuming that's correct, I also assume that all your favorites would simply have this groovy code assigned to them (manually?*)? In this way, you only need a single piece of code, which does all the work for you (checking channels & file types) and no need to mess with multiple groovy files. Still correct? Additionally, there's no need to check for an edl file, since this would only be triggered either when the recording starts or stops, unlike with SJQ3, whose "rules" could potentially be triggered during every run of the queue loader. Hopefully, I'm still on the right track here. Thanks for the patience! *Is there a way to get this to be automatically set for all recordings, whether they be manual recordings or favorites?
__________________
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 |
#1218
|
|||
|
|||
In no way is this manual for me. It all works automatically and is run for each and every recording.
The second script is the test script. The first script is the executable. The executable script It's run by adding "script:" before the path to the file. The test script only needs the path and filename of the script. Basically, the test script compares a set of attributes of each recording to make sure they match before proceeding to execute. Once you have the task created you go to Assign Tasks To Events. I have my "SAUNIFIED" task assigned to RecordingStarted. That way every time a recording begins it automatically begins detecting ads. If live detection is not your thing you assign the task to Recording Stopped.
__________________
Server: i5 8400, ASUS Prime H370M-Plus/CSM, 16GB RAM, 15TB drive array + 500GB cache, 2 HDHR's, SageTV 9, unRAID 6.6.3 Client 1: HD300 (latest FW), HDMI to an Insignia 65" 1080p LCD and optical SPDIF to a Sony Receiver Client 2: HD200 (latest FW), HDMI to an Insignia NS-LCD42HD-09 1080p LCD |
#1219
|
|||
|
|||
I do this a little differently. I run the media_file_scanner.groovy script every five minutes to see if anything needs to be run through comskip. The script has places in there to check channel names, (e.g. ignore HBO, etc.), and other things. If it finds a file that needs to be run through comskip, it triggers the following separate comskip.groovy script:
Code:
def cmd = "C:\\comskip\\comskip.exe" def failed = false for (int i = 0; i <= SJQ4_METADATA["SJQ4_MAX_SEGMENT_INDEX"].toInteger(); ++i) { def segment = SJQ4_METADATA["SJQ4_PATH"] + "/" + SJQ4_METADATA["SJQ4_SEGMENT_${i}"] def exe = [cmd, segment] def p = exe.execute() p.consumeProcessOutput(System.out, System.err) p.waitFor() def rc = p.exitValue() if(rc < 0 || rc > 1) // Task failed, but run against the rest of the segments anyways... failed = true } return failed ? 1 : 0
__________________
Home Network: https://karylstein.com/technology.html |
#1220
|
||||
|
||||
Quote:
Quote:
__________________
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 |
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 |