|
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 |
#1021
|
||||
|
||||
Quote:
Code:
POST_INFO_MSG // If true, post Info msg so you know the script ran. POST_SYS_MSG must be true for this to have any effect DaysToCheck CHECK_CHAN section changed if to use DaysToCheck parm if(start > now && start <= now + (86400000L * DaysToCheck) ) { Added ChannelNumber so that msg has both Channel Name - ChannelNumber Modified preamble to include value of DaysToCheck parm PostSystemMessage section Added code so that "all EPG data found" Success msg (info) can be sent (sanity check that script ran successfully) |
#1022
|
|||
|
|||
Sometimes I have recordings that get missed and will import the video from other sources, but SageTV will still try and record that episode that was imported. Is there any way to flag Sage that the recording isn't needed anymore?
__________________
Sage Server: i5-2500K 8 GB DDR, 6000gb HDD, 4xHD-PVR < 4xBell 6141, Win7 x64 Client 1: HD-200, Panasonic 42PX75 Client 2: HD-300, Samsung LCD Client 3: HD-300, Samsung PN50C550 Client 4: MS Surface Pro |
#1023
|
|||
|
|||
Quote:
Probably just be easier to identify these recordings as they pop up in the upcoming recording schedule and manually mark them as watched. However, if you wanted to try to automate it, the process in the above paragraph is probably a good starting point as to what you'd have to do to achieve the end goal. You could probably just match off of title/episode name instead of title + season/episode numbers, but then the reliability drops, imho.
__________________
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... |
#1024
|
||||
|
||||
Finally getting around to set up a separate client on v4. Had one running previously. But I'm running into this error:
2011-11-23 11:37:16,882 INFO [ProcessRunner]: Converted '"$SJQ4_PATH\$SJQ4_LAST_SEGMENT"' to '"\\SAGETV-SERVER\Recordings\Parenthood-MrHonesty-12134166-0.ts"' 2011-11-23 11:37:17,069 INFO[ListenerClient]: Disconnected from 10.0.1.35:23347 2011-11-23 11:37:17,069 ERROR [10_0_1_35-23347-732]: IOError java.io.IOException: Cannot run program "c:\scripts\handbrake-sjq960.groovy": CreateProcess error=193, %1 is not a valid Win32 application at java.lang.ProcessBuilder.start(Unknown Source) at java.lang.Runtime.exec(Unknown Source) at org.apache.commons.exec.launcher.Java13CommandLauncher.exec(Java13CommandLauncher.java:58) at org.apache.commons.exec.DefaultExecutor.launch(DefaultExecutor.java:246) at org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExecutor.java:302) at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:149) at com.google.code.sagetvaddons.sjq.agent.ProcessRunner.runExternalExe(ProcessRunner.java:317) at com.google.code.sagetvaddons.sjq.agent.ProcessRunner.runExe(ProcessRunner.java:206) at com.google.code.sagetvaddons.sjq.agent.ProcessRunner.run(ProcessRunner.java:168) at java.lang.Thread.run(Unknown Source) Caused by: java.io.IOException: CreateProcess error=193, %1 is not a valid Win32 application at java.lang.ProcessImpl.create(Native Method) at java.lang.ProcessImpl.<init>(Unknown Source) at java.lang.ProcessImpl.start(Unknown Source) ... 10 more 2011-11-23 11:37:17,882 INFO[ListenerClient]: Disconnected from 10.0.1.35:23347 Is this due to my NOT using mapdir? All my recording paths are UNC so I thought I didn't have to. Also, should my groovy scripts still exist in one place, on the server and I reference them also through UNC? With this particular failure, the script exists on the remote client and I'm using the same script that I use successfully on the server.
__________________
Server: AMD 9600 Phenom on XP, Gigabyte GA-MA78GPM, 2GB RAM, 320+250+500 GB SATA drives, HDHomeRun Prime, HD-PVR x.5.1, Paterson serial Client/Encoder:AMD 3800+ X2, 512 MB RAM, ATI X1650 XT, nMediaPC case, Hauppauge HD-PVR, Cyberlink/ArcSoft decoders, USB-UIRT Client/Encoder: AMD 3800+ X2, 512 MB RAM, 6150 graphics, nMediaPC case, ArcSoft decoders Client: HD300, Asus Pundit P1-AH1, AMD 3800+ X2 CPU, 1 GB RAM, 6150 graphics, ArcSoft decoders Backup: Synology SageTV version: FINAL |
#1025
|
||||
|
||||
What does your task line look like?
is it script:<path/file> ? since it looks like you are trying to execute a groovy script, it needs the script: prefix http://code.google.com/p/sagetv-addo...sk_Executables |
#1026
|
|||
|
|||
When using a groovy script as a task exe, you must prefix it with script: so the SJQ engine knows to pass the script onto the groovy engine instead of passing it to the OS as an exe command.
__________________
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... |
#1027
|
||||
|
||||
Quote:
__________________
Server: AMD 9600 Phenom on XP, Gigabyte GA-MA78GPM, 2GB RAM, 320+250+500 GB SATA drives, HDHomeRun Prime, HD-PVR x.5.1, Paterson serial Client/Encoder:AMD 3800+ X2, 512 MB RAM, ATI X1650 XT, nMediaPC case, Hauppauge HD-PVR, Cyberlink/ArcSoft decoders, USB-UIRT Client/Encoder: AMD 3800+ X2, 512 MB RAM, 6150 graphics, nMediaPC case, ArcSoft decoders Client: HD300, Asus Pundit P1-AH1, AMD 3800+ X2 CPU, 1 GB RAM, 6150 graphics, ArcSoft decoders Backup: Synology SageTV version: FINAL |
#1028
|
||||
|
||||
ok...figured out how to turn extender back on after full_backup script finishes.
It auto connects fine and is at the main menu. Now, I'm trying to figure out how to get it back to Live TV (white noise while sleeping). Tried GLOBAL.SageCommand('Live TV') but that isn't working. Guess the SageCommand isn't directed to the extender. Any thoughts? Direction to look at? |
#1029
|
|||
|
|||
You would need to pass the extender context:
Global.SageCommand('context', 'Live TV') I'm assuming 'Live TV' is the correct command name. Replace 'context' with the UI context name and in the case of an extender, it's the extender's MAC address.
__________________
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... |
#1030
|
||||
|
||||
Excellent. I'll probably give it a try tomorrow if the wife wants me to stay out of the kitchen.
|
#1031
|
||||
|
||||
Quote:
trying to read as a transport stream. Here's an example clip from a failure log: libdvdread: Can't stat \\sagetv-server\sagetv\TopChefTexas-RedHotChiliCookOff-12364030-0.ts No such file or directory. libdvdnav vm: failed to open/read the DVD dvd: not a dvd - trying as a stream/file instead hb_stream_open open: \\sagetv-server\sagetv\TopChefTexas-RedHotChiliCookOff-12364030-0.ts failed scan: unrecognized file type libhb: scan thread found 0 valid title(s) No title found. Handbrake has exited. I've tried two methods of setting up the command and they both fail identically: command = """C:\\Program Files\\Handbrake\\HandBrakeCLI.exe""" + """ -t 1 -c 1 -i "${FullInputFile}" -o "${FullOutputFile}" -f mkv -w 960 --loose-anamorphic -e x264 -q 20 -r 29.97 -a 1,1 -E copy:ac3,faac -6 auto,dpl2 -R Auto,Auto -B auto,160 -D 0.0,0 --subtitle 1 -x cabac=0:ref=2:me=umh:b-pyramid=none:b-adapt=2:weightb=0:trellis=0:weightp=0:vbv-maxrate=9500:vbv-bufsize=9500 --verbose=1"""; and command = ["C:/Windows/system32/cmd.exe", "/C start \"handbrake\" /b /low /wait \"C:/Program Files/Handbrake/HandBrakeCLI.exe\" -t 1 -c 1 -i \"" + FullInputFile + "\" -o \"" + FullOutputFile + "\" -f mkv -w 960 --loose-anamorphic -e x264 -q 20 -r 29.97 -a 1,1 -E copy:ac3,faac -6 auto,dpl2 -R Auto,Auto -B auto,160 -D 0.0,0 --subtitle 1 -x cabac=0:ref=2:me=umh:b-pyramid=none:b-adapt=2:weightb=0:trellis=0:weightp=0:vbv-maxrate=9500:vbv-bufsize=9500 --verbose=1"]; When I run the Handbrake (v9.5) GUI on the same file, it works fine. But I have noticed that the scan step takes forever with HB from the remote client on v9.5. I fell back to v9.4 for fun and it fails the same way. The scan is a lot quicker on 9.4 though. My best guess is it has something to do with escaping characters on the file path as the scan isn't finding any valid titles. Anyone have any ideas? Thanks in advance! |
#1032
|
|||
|
|||
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... |
#1033
|
||||
|
||||
Quote:
... Yep, that was it. (I should have remember this step...). Thanks!!
__________________
Server: AMD 9600 Phenom on XP, Gigabyte GA-MA78GPM, 2GB RAM, 320+250+500 GB SATA drives, HDHomeRun Prime, HD-PVR x.5.1, Paterson serial Client/Encoder:AMD 3800+ X2, 512 MB RAM, ATI X1650 XT, nMediaPC case, Hauppauge HD-PVR, Cyberlink/ArcSoft decoders, USB-UIRT Client/Encoder: AMD 3800+ X2, 512 MB RAM, 6150 graphics, nMediaPC case, ArcSoft decoders Client: HD300, Asus Pundit P1-AH1, AMD 3800+ X2 CPU, 1 GB RAM, 6150 graphics, ArcSoft decoders Backup: Synology SageTV version: FINAL Last edited by phelme; 11-24-2011 at 11:48 PM. |
#1034
|
||||
|
||||
Got it worked out. Working great now. Had to play around with it some since it needed a (UIContext, String) instead of (String, String) for the SageComand
Code:
Object ec = Global.GetUIComponentContext() ; Global.SageCommand(ec,'Live TV') |
#1035
|
||||
|
||||
Question about coding technique - Arrays
Is there a difference (performance or result wise) between the 3 techniques below of working thru an array result?
Any pros/cons between forr loop, .each { object ->, and just .each ?? Code:
Global.GetScheduledRecordingsForTime(now, now + (reqdMins * 60000L)).each { mfAiring -> <cmds to perform within loop> } } Code:
for(Object mediaFile : MediaFileAPI.GetMediaFiles("T")) { <cmds to perform within loop> } Code:
Database.SearchSelectedExactFields('No Data', true, true, false, false, false, false, false, false, false, false, 'T').each { <cmds to perform within loop> } |
#1036
|
|||
|
|||
Not really, closures are said to be slower than a standard for loop, but in reality it's negligible, basically a non-issue. Closures are a bit of a PITA when tracing through the code in a debugger (i.e. Eclipse), but other than that there's really no difference.
There is absolutely zero difference between: Foobar.each { } and Foobar.each { varName -> } The only difference is that the first one will use the default name 'it' to reference the current object in scope where as in the second one, you've simply decided to override the variable name with one of your own (perhaps to aid in code readability). There are cases where the for loop is advantageous in performance by saving unnecessary runs of the loop vs. extra executions of a closure. Let's say you want to loop through your media files and find the first one stored on D:\tv\ With a closure, you'd do it this way: Code:
def match = null MediaFileAPI.GetMediaFiles().each { if(match == null && MediaFileAPI.GetParentDirectory(it).getAbsolutePath().startsWith('D:\tv\')) match = it } Code:
def match = null for(def mf : MediaFileAPI.GetMediaFiles()) { if(MediaFileAPI.GetParentDirectory(mf).getAbsolutePath().startsWith('D:\tv\')) { match = mf break } } So be careful about using closures in the case where you may want to break out of the loop early, in that case a for loop is better suited. If you're going to process every element in the list anyway, then there's not much of a difference between closures and loops, use whatever is most comfortable for you. I prefer closures when it makes sense, I like the syntax a little better, but it really doesn't matter.
__________________
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... |
#1037
|
|||
|
|||
i need some help with setting up SJQ. i'd like to have it move recordings from the sage recordings directory (D:\ in my case) to a sub-directory with the show name ( i.e. D:\6pm news). i'm having some trouble getting through the installation. i've downloaded the two mv_media scripts from here http://sagetv-addons.googlecode.com/...nk/SJQScripts/i've also followed the user guide up to the "Configuring sjqagent.properties" section. i'm not certain what i need to do to the properties file if anything. my sage machine is standalone and will not have any other task clients connecting to it for now. can anyone tell me where i go from here?
|
#1038
|
|||
|
|||
Quote:
Note, however, that the move scripts you've copied don't move based on separate title based dirs, etc. They just move from one static location to another - you will have to modify those scripts to do the kind of title-specific folder moving you want to do. So that's why I say just get a task fully configured and working with SJQ first then worry about getting the move task tweaked to your liking.
__________________
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... |
#1039
|
||||
|
||||
Is there any way to jump to or otherwise examine the end of an executable's log file captured by SJQ? I'm trying to figure out why a task that use's Handbrake on a remote client is failing. The Handbrake run is apparently working fine (the mkv is correctly created), but something else at the end of the script must not be happy running on a remote client. Handbrake spews out an enormous amount of data because SJQ captures every line of output from the encoding process (even with verbose mode off); this includes the percentage encoding. That's a lot of data to scroll through.
- just using a log file now. never mind. Last edited by phelme; 11-25-2011 at 03:58 PM. |
#1040
|
||||
|
||||
PostSystemMessage weirdness
OK...in some of my scripts, I use PostSystemMessage so that I know the script ran and if no issues it is Info, if issues then it is higher.
I noticed now after I implemented the full_backup script that after sage has shutdown and restarted, that those system messages are now messed up and I get some totally blank (12/31) messages also. I ran some test where I post the message, then do a manual shutdown, restart of sage tv and it happens, so it isn't the full_backup script that I'm aware of. I use the following in my scripts: Code:
SystemMessageAPI.PostSystemMessage(1204, 1, output.toString(), null) Example: The 7:40am on is from the full_backup and that msg is fine. 1:30am is from another script (EPG_NoData_check) and should say "No channels are missing data within the next 7 Days:" which it does anytime prior to restarting SageTV. Also found this (sagetvmsgs.log) Code:
pri=1;type=1204;time=1322289010426; pri=0;type=0;time=0; pri=0;type=0;time=0; pri=1;type=1204;time=1322311256297;msg=Backup was Successful; Last edited by graywolf; 11-26-2011 at 09:03 AM. |
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 |