SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV v7 Customizations
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

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.

Reply
 
Thread Tools Search this Thread Display Modes
  #941  
Old 09-19-2011, 02:37 PM
graywolf's Avatar
graywolf graywolf is offline
Sage Icon
 
Join Date: Oct 2009
Location: NC
Posts: 1,389
ok. Got it figured out. Had to add 3hrs (and 15mins) to the END time.

Since I happen to have both East and WEST coast feeds of ABC (old old legacy deal), it appears that the East Coast value was getting ignored.

After I changed to
Code:
start < midnight + 94500000
it showed up for KABC (LA west coast channel) but not for WABC (NY) or WSOC (local).

Possibly due to K coming before W?
Reply With Quote
  #942  
Old 09-19-2011, 03:11 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Quote:
Originally Posted by graywolf View Post
ok. Got it figured out. Had to add 3hrs (and 15mins) to the END time.

Since I happen to have both East and WEST coast feeds of ABC (old old legacy deal), it appears that the East Coast value was getting ignored.

After I changed to
Code:
start < midnight + 94500000
it showed up for KABC (LA west coast channel) but not for WABC (NY) or WSOC (local).

Possibly due to K coming before W?
No, no, no. Ks and Ws aren't going to mess that up, my guess is that you're cutting too much of the time window such that the east coast airing is not being considered. Change it back to midnight to midnight and the east coast one probably gets picked up. It's not obvious to me exactly what's wrong (code looks ok), but it's definitely something to do with the time adjustments you've made and nothing to do with Ks and Ws.
__________________
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...
Reply With Quote
  #943  
Old 09-19-2011, 03:20 PM
graywolf's Avatar
graywolf graywolf is offline
Sage Icon
 
Join Date: Oct 2009
Location: NC
Posts: 1,389
Quote:
Originally Posted by Slugger View Post
No, no, no. Ks and Ws aren't going to mess that up, my guess is that you're cutting too much of the time window such that the east coast airing is not being considered. Change it back to midnight to midnight and the east coast one probably gets picked up. It's not obvious to me exactly what's wrong (code looks ok), but it's definitely something to do with the time adjustments you've made and nothing to do with Ks and Ws.
Code:
    if(shows.add(id) && id.startsWith('EP') && start >= midnight && start < midnight + 86400000) {
No Castle

Code:
    if(shows.add(id) && id.startsWith('EP') && start >= midnight && start < midnight + 94500000) {
Get Castle

94500000 = 26.25 hrs

71900000 = 19.972 hrs

Code:
    if(shows.add(id) && id.startsWith('EP') && start >= midnight + 71900000 && start < midnight + 94500000)
Get Castle

Last edited by graywolf; 09-19-2011 at 03:24 PM.
Reply With Quote
  #944  
Old 09-19-2011, 03:40 PM
graywolf's Avatar
graywolf graywolf is offline
Sage Icon
 
Join Date: Oct 2009
Location: NC
Posts: 1,389
Quote:
Originally Posted by Jason View Post
OMG! Success! I cannot tell you how much I appreciate this!

I had to comment out a few portions to match my requisites, but so far, I tested it on an existing recording and... success!

Considering that I have it set for 'recording started', it should now move and re-link the file for all future recordings.

Is there a way to trigger a script on everything, since the cron does not gather any input? I reviewed the posts in the thread, but I did not find that specific answer...

Again... your help was so much appreciated, I cannot begin to thank you enough!

-Jason
use the find_tv_to_archive.groovy in Slugger's repository

and set that up for cron
Reply With Quote
  #945  
Old 09-19-2011, 07:39 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Quote:
Originally Posted by graywolf View Post
Code:
    if(shows.add(id) && id.startsWith('EP') && start >= midnight && start < midnight + 86400000) {
No Castle

Code:
    if(shows.add(id) && id.startsWith('EP') && start >= midnight && start < midnight + 94500000) {
Get Castle

94500000 = 26.25 hrs

71900000 = 19.972 hrs

Code:
    if(shows.add(id) && id.startsWith('EP') && start >= midnight + 71900000 && start < midnight + 94500000)
Get Castle
Does the east feed airing have the "Season Premiere" in its extra info? That's about all I've got as far as why it won't pick it up.
__________________
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...
Reply With Quote
  #946  
Old 09-20-2011, 04:24 AM
gdippel gdippel is offline
Sage Aficionado
 
Join Date: Oct 2003
Location: Bayside, New York
Posts: 301
Premiere Alert script problem

I'm still having a problem with this script. When it didn't connect to my smtp server using port 456, I changed the script to use port 25 (used by my email, i.e. Outlook), however the log shows it is still trying to connect using port 465. I tried shutting down the service and restarting with the edited script, same problem. I've attached the email portion of the groovy script (user ID and Password omitted, of course) and a screen shot of the log.
Attached Images
File Type: jpg Premiere Alert script log.jpg (107.9 KB, 119 views)
Attached Files
File Type: txt script segment.txt (756 Bytes, 128 views)
Reply With Quote
  #947  
Old 09-20-2011, 06:45 AM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Quote:
Originally Posted by gdippel View Post
I'm still having a problem with this script. When it didn't connect to my smtp server using port 456, I changed the script to use port 25 (used by my email, i.e. Outlook), however the log shows it is still trying to connect using port 465. I tried shutting down the service and restarting with the edited script, same problem. I've attached the email portion of the groovy script (user ID and Password omitted, of course) and a screen shot of the log.
Couple of things:

1) If you're using port 25 then you should change ssl setting to 'false'. It is unlikely, though not impossible, that an SMTP server listening on port 25 is using SSL. The use of SSL is probably what's overriding the port number.

2) Are you sure you need a user/password to connect to the SMTP server? Again, this is unusual, though not impossible, for SMTP servers listening on port 25. Usually ISP servers simply go by the IP address of the connection to ensure that you are allowed to use the server. I'd try setting the user and password to '' (empty string) and then change the from address to your email address.

Unfortunately, you're finding out why I tend not to release my scripts that send email - there are just so many email configuration possibilities that it's impossible to make it "plug 'n play" for most users. With some perseverance, you'll get it working.
__________________
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...
Reply With Quote
  #948  
Old 09-20-2011, 07:09 AM
gdippel gdippel is offline
Sage Aficionado
 
Join Date: Oct 2003
Location: Bayside, New York
Posts: 301
Quote:
Originally Posted by Slugger View Post
Couple of things:
1) If you're using port 25 then you should change ssl setting to 'false'. It is unlikely, though not impossible, that an SMTP server listening on port 25 is using SSL. The use of SSL is probably what's overriding the port number.
Setting SSL to false did the trick, it's working, thanks.
Reply With Quote
  #949  
Old 09-28-2011, 03:19 PM
Taddeusz Taddeusz is offline
SageTVaholic
 
Join Date: Nov 2004
Location: Yukon, OK
Posts: 3,919
Don't really have time to go hunting through this thread. Not familiar with Groovy. I'm upgrading from v3 to v4 and I suppose I need to create test scripts for each of my tasks based on the rules I had created in v3.

Basically I need to create test scripts to look at the channel name of the recording and the extension on the file to determine which task, if any, should run.

How do I get started?
__________________
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
Reply With Quote
  #950  
Old 09-28-2011, 03:36 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Quote:
Originally Posted by Taddeusz View Post
Don't really have time to go hunting through this thread. Not familiar with Groovy. I'm upgrading from v3 to v4 and I suppose I need to create test scripts for each of my tasks based on the rules I had created in v3.

Basically I need to create test scripts to look at the channel name of the recording and the extension on the file to determine which task, if any, should run.

How do I get started?
Welcome aboard...

You're going to learn rather quickly that v4 is nothing like v3. Lots of changes to get used to. What I suggest is to pick one task, say comskip, and get it working using this tutorial.

That tutorial assumes you've familiarized yourself with the basics (task client install, plugin install, task setup, etc.). You may want to start here.

There's no magic bullet or cookie cutter solution to setting up everything - each user's environment is too unique. But if you pick one task and get it working to perfection in your env, that should provide the building blocks required to get the rest of your tasks setup. Reference your v3 rulesets as far as the desired logic, but you'll quickly learn that the actual code is no good - everything's done in Groovy script now.

Good luck and ask questions as necessary, but please start with the user guide and tutorial as your starting point.
__________________
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...
Reply With Quote
  #951  
Old 09-28-2011, 03:45 PM
Taddeusz Taddeusz is offline
SageTVaholic
 
Join Date: Nov 2004
Location: Yukon, OK
Posts: 3,919
I saw a script that seems to show that you can use a groovy script as the actual executable? How does that work and what does the file extension need to be?

I use both SA and SAV1 depending on whether it is a HDHR or HDPVR recording. It would greatly simplify things to have a single task for commercial detection and then have the executed groovy script determine which to run. Rather than creating 4 tasks for each of the test cases and using the test scripts to determine which should run.
__________________
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
Reply With Quote
  #952  
Old 09-28-2011, 03:54 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Quote:
Originally Posted by Taddeusz View Post
I saw a script that seems to show that you can use a groovy script as the actual executable? How does that work and what does the file extension need to be?
http://code.google.com/p/sagetv-addo...sk_Executables

Please read through the user guide along with all the linked to wiki docs from it (found from the left side menu), there is a lot of info to be absorbed from those docs.

Quote:
I use both SA and SAV1 depending on whether it is a HDHR or HDPVR recording. It would greatly simplify things to have a single task for commercial detection and then have the executed groovy script determine which to run. Rather than creating 4 tasks for each of the test cases and using the test scripts to determine which should run.
This is what I do, sort of. The tutorial was how I first setup my comskip when developing SJQv4, I then later refined my setup to a single COMSKIP task that inspects the type of file and adjusts the required resources, etc. I don't call SA vs. comskip vs. SAV1, etc., but that's easily doable. Look at my united_comskip_test.groovy script as the test script then notice how I dynamically modify the task's resource usage and the exe args based on what I learn about the target video file. You can do that same thing to send a flag to the exe script, which then will either launch SA, comskip, SAV1, etc.
__________________
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...
Reply With Quote
  #953  
Old 09-29-2011, 01:48 PM
Taddeusz Taddeusz is offline
SageTVaholic
 
Join Date: Nov 2004
Location: Yukon, OK
Posts: 3,919
Is there an example of the syntax for executing an external program from a Groovy script?
__________________
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
Reply With Quote
  #954  
Old 09-29-2011, 02:27 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Quote:
Originally Posted by Taddeusz View Post
Is there an example of the syntax for executing an external program from a Groovy script?
Your best friend is going to be the Groovy docs.
__________________
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...
Reply With Quote
  #955  
Old 09-29-2011, 04:58 PM
Taddeusz Taddeusz is offline
SageTVaholic
 
Join Date: Nov 2004
Location: Yukon, OK
Posts: 3,919
I'm having trouble getting Tools.mapDir to work. My mapdir line is as follows:

Code:
agent.mapdir=D\:\\,\\\\htpc\\video1\\;G\:\\,\\\\htpc\\movies2\\;E\:\\,\\\\htpc\\video2\\;F\:\\,\\\\htpc\\movies1\\
And the command I'm using is:

Code:
String file = Tools.mapDir(SJQ4_METADATA.get("SJQ4_PATH") + "\\") + SJQ4_METADATA.get("SJQ4_LAST_SEGMENT")
I still get the UNC path. What is wrong?
__________________
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
Reply With Quote
  #956  
Old 09-29-2011, 05:58 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Quote:
Originally Posted by Taddeusz View Post
I'm having trouble getting Tools.mapDir to work. My mapdir line is as follows:

Code:
agent.mapdir=D\:\\,\\\\htpc\\video1\\;G\:\\,\\\\htpc\\movies2\\;E\:\\,\\\\htpc\\video2\\;F\:\\,\\\\htpc\\movies1\\
And the command I'm using is:

Code:
String file = Tools.mapDir(SJQ4_METADATA.get("SJQ4_PATH") + "\\") + SJQ4_METADATA.get("SJQ4_LAST_SEGMENT")
I still get the UNC path. What is wrong?
You should be getting UNC paths... your agent.mapdir is mapping local drives to UNC paths. If you're trying to go from UNC paths to local drives then you need to reverse the options in the mapdir setting.
__________________
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...
Reply With Quote
  #957  
Old 09-29-2011, 06:25 PM
Taddeusz Taddeusz is offline
SageTVaholic
 
Join Date: Nov 2004
Location: Yukon, OK
Posts: 3,919
Quote:
Originally Posted by Slugger View Post
You should be getting UNC paths... your agent.mapdir is mapping local drives to UNC paths. If you're trying to go from UNC paths to local drives then you need to reverse the options in the mapdir setting.
Duh, ok. I get it now.
__________________
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
Reply With Quote
  #958  
Old 09-29-2011, 08:58 PM
Taddeusz Taddeusz is offline
SageTVaholic
 
Join Date: Nov 2004
Location: Yukon, OK
Posts: 3,919
Ok, things are sort of working now. However I think I'm going to have to rethink things. While ShowAnalyzer v1 runs fine when launched from a Groovy script the old ShowAnalyzer starts and then does nothing. I see the task running in the Task Manager but there is no CPU usage from it. Anyone have any experience with this?
__________________
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
Reply With Quote
  #959  
Old 09-29-2011, 09:58 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Quote:
Originally Posted by Taddeusz View Post
Ok, things are sort of working now. However I think I'm going to have to rethink things. While ShowAnalyzer v1 runs fine when launched from a Groovy script the old ShowAnalyzer starts and then does nothing. I see the task running in the Task Manager but there is no CPU usage from it. Anyone have any experience with this?
Did you consume the process output? Same link as before, but read up on the consumeProcessOutput() method of the Process object (about half way down the page). You must consume the output of the process in order to avoid process deadlock, which is what you're experiencing because the I/O buffers of the Windows process fill up.
__________________
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...
Reply With Quote
  #960  
Old 09-30-2011, 12:31 PM
JerryB JerryB is offline
Sage Aficionado
 
Join Date: Aug 2008
Posts: 273
?Assign SJQ4 task to a scheduled recording?

Is it possible to assign a SJQ4 task to a non-favorite recording at the time the recording is scheduled, ideally similar to the way favorites are handled.

For example, I occasionally end up scheduling the recording of a movie from a non-premium channel for later viewing. I've noticed that some of these recordings, especially the middle of the night ones, are almost 25% commercials. I'd really like to be able to schedule my Comskip task so that it runs as soon as the movie finishes recording. However, since the movie is a one-time event and not a favorite, I don't see any way to schedule the task in advance, when I schedule the recording. I know I could set things up similar to the old SJQ3 method of globally processing every file and then adding some exclusion testing to prevent needless processing of commercial free channels but I really like and prefer the newer system of localized scheduling of tasks to appropriate recordings only.

PS: Thanks for this wonderful tool. I really like it.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 4 (0 members and 4 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

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


All times are GMT -6. The time now is 03:38 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.