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
  #541  
Old 03-10-2011, 01:41 PM
K O K O is offline
Sage User
 
Join Date: Sep 2009
Location: Austin, TX
Posts: 68
Hopefully I understand you correctly. I manually queued the task, checked the queue, clicked on view logs, and clicked 'View Log for Test Script'


It shows a handful of errors:

LOG4J: Configured Logging for: sagex-api using file:
sagex-api.log4j.properties
javax.script.ScriptException:
java.lang.NumberFormatException: null


Is that what you wanted?
Reply With Quote
  #542  
Old 03-10-2011, 01:42 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Yes, but go to the completed tasks view and look at the same data for Task ID #1. What does it show?
__________________
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
  #543  
Old 03-10-2011, 02:02 PM
K O K O is offline
Sage User
 
Join Date: Sep 2009
Location: Austin, TX
Posts: 68
When I click on Completed Tasks, it just hangs indefinitely on that page. It doesn't lock up the client, as I can hit back, but it just says 'Loading...' and doesn't show the tasks.

Restarting the server and/or cient doesn't seem to resolve the issue.
Reply With Quote
  #544  
Old 03-10-2011, 02:09 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Quote:
Originally Posted by K O View Post
When I click on Completed Tasks, it just hangs indefinitely on that page. It doesn't lock up the client, as I can hit back, but it just says 'Loading...' and doesn't show the tasks.

Restarting the server and/or cient doesn't seem to resolve the issue.
Hmm... if that always happens then reproduce it with Sage debug logging enabled on the client you're doing it from and open a ticket on the sagetv-addons project site for Tom to investigate. In the meantime, you can view the raw data via the SJQ database:

http://yourserver:8082/

Use this for the JDBC URL on the login form: jdbc:h2:tcp://localhost/plugins/sjq/sjq4

The id and password are both 'admin' (no quotes).

Once in there, paste this into the input box and click Run:

SELECT * FROM TASK_LOG WHERE ID=1

What's the output?
__________________
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
  #545  
Old 03-10-2011, 02:15 PM
K O K O is offline
Sage User
 
Join Date: Sep 2009
Location: Austin, TX
Posts: 68
Running SELECT * from task_log returns 1 row (ID 2) with repeated copies of this (with different time stamps)

===== Thu Mar 10 14:13:13 CST 2011 =====

LOG4J: Configured Logging for: sagex-api using file: sagex-api.log4j.properties
javax.script.ScriptException: java.lang.NumberFormatException: null


==============================
Reply With Quote
  #546  
Old 03-10-2011, 03:51 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
All ID=2? I don't know where task 1 went, but it seems to be gone. Task 2 is failing because you manually queued it and there's no metadata attached to it. Seems you're running an older version of the comskip_test.groovy script. Newer versions of that script better detect this and fail the job instead of constantly requeuing it. Clear the input box, click on the queue table, and delete the entry for ID=2 to remove that task from the queue. If you queued the first job that way, it's the same problem. Recordings need to be queued by event or through the detailed info screen.
__________________
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
  #547  
Old 03-10-2011, 04:05 PM
K O K O is offline
Sage User
 
Join Date: Sep 2009
Location: Austin, TX
Posts: 68
Awesome

I deleted the task, deleted all the events, and added 2 new events (recording start and recording stop). Comskip started right up.

Thanks!
Reply With Quote
  #548  
Old 03-10-2011, 04:07 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Quote:
Originally Posted by Slugger View Post
Recordings need to be queued by event or through the detailed info screen.
Quote:
Originally Posted by K O View Post
I deleted the task, deleted all the events, and added 2 new events (recording start and recording stop). Comskip started right up.

Thanks!
Just to clarify for others, recordings only have to be queued this way to work with the comskip scripts presented in the tutorial. There are (always) different ways to queue up tasks that don't require metadata. But if you're following the tutorial then you must ensure metadata is properly attached to the task when queued.
__________________
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
  #549  
Old 03-10-2011, 04:27 PM
K O K O is offline
Sage User
 
Join Date: Sep 2009
Location: Austin, TX
Posts: 68
Quote:
Originally Posted by Slugger View Post
Seems you're running an older version of the comskip_test.groovy script. Newer versions of that script better detect this and fail the job instead of constantly requeuing it.
I have one dated Jan 21, 2011. Is this the latest? Searching w/ Google I could not locate a newer one.

/*************** CONFIGURE VALUES IN THIS BLOCK ONLY! ***************/

boolean checkRecordingType = false; // Check the recording is of the type specified on the command line (i.e. only process mpg recordings)
boolean checkForEdl = true; // If true, mark the task as skipped if an edl already exists
String edlType = "edl"; // The edl extension (i.e. some people use .txt comskip files instead of .edl files)
boolean comskipLive = true; // If false, this test will push the task back to the queue while the recording is in progress

/********************************************************************/

/************************* DO NOT EDIT BELOW!! **********************/

// But if you do edit below to fix a bug, then email me the patch!

Object mf = MediaFileAPI.GetMediaFileForID(Integer.parseInt(SJQ4_METADATA.get("SJQ4_ID")));
File path = new File(SJQ4_METADATA.get("SJQ4_PATH"));
String fileName = SJQ4_METADATA.get("SJQ4_LAST_SEGMENT");
String 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;
}

String edl = fileName.substring(0, fileName.lastIndexOf('.')) + "." + edlType;
if(new File(path, edl).exists()) {
println("An edl already exists for this recording, skipping comskip!");
println("Found '" + new File(path, edl).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(!comskipLive && MediaFileAPI.IsFileCurrentlyRecording(mf)) {
println("Recording in progress, waiting...");
return 1;
}

return 0;
Reply With Quote
  #550  
Old 03-10-2011, 04:39 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Yeah, that's the latest, but you did find a bug. So now there's a Mar 10 version.

My entire Groovy script repository can be found here.
__________________
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
  #551  
Old 03-11-2011, 07:09 PM
madas madas is offline
Sage Advanced User
 
Join Date: Jun 2008
Posts: 83
I have some odd jobs appearing in the queue with almost no Metadata...type is "Object" instead of MediaFile (see screenshot). My comskip script just gives me a NullPointerException.

These seem to clog up the queue

How do I tell SJQ to skip these?

I also tried the latest comskip script, same error
Attached Images
File Type: jpg sage1.JPG (45.8 KB, 113 views)

Last edited by madas; 03-11-2011 at 07:30 PM.
Reply With Quote
  #552  
Old 03-11-2011, 09:45 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Quote:
Originally Posted by madas View Post
I have some odd jobs appearing in the queue with almost no Metadata...type is "Object" instead of MediaFile (see screenshot). My comskip script just gives me a NullPointerException.

These seem to clog up the queue

How do I tell SJQ to skip these?

I also tried the latest comskip script, same error
One of three things:

1) The media file object is being deleted before it's being queued up in SJQ

2) The remote API calls are failing (network issues). This is unlikely if the task client is on the same machine as the server.

3) There is a bug in the Sage API where the API call IsMediaFileObject() is returning false when it should be returning true.

If #1 doesn't apply (because the media file still exists) and #2 doesn't apply (because the task client is on the same host as the server) then try to requeue the task via the media file's detailed info screen and check out the metadata. If it keeps identifying it as an "Object" instead of a "MediaFile" then there's a bug in Sage API, which should be reported to Sage. If that's the case, send them that screen shot and a link to this post.

As for fixing the job queue... which groovy script(s) are you using? I need to fix them to handle the possibility of that null pointer in this case.

You will have to manually delete the existing tasks via the STV if they're being retried constantly (until I fix the Groovy script(s) to skip these tasks).
__________________
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
  #553  
Old 03-11-2011, 10:31 PM
kchase56 kchase56 is offline
Sage User
 
Join Date: Jun 2008
Posts: 45
Quote:
Originally Posted by Slugger View Post
From your sjqagent.log:

Code:
2011-03-04 10:16:53,372 INFO  [ProcessRunner]: Converted '"$SJQ4_PATH\$SJQ_LAST_SEGMENT"' to '"\\HT-PC\SageTV Recordings\$SJQ_LAST_SEGMENT"'
It should be "$SJQ4_PATH\$SJQ4_LAST_SEGMENT" as the exe argument. As the log shows, it's not expanding the vars properly because of the typo so presumably ShowAnalyzer is failing because the file name doesn't exist. ShowAnalyzer doesn't seem to dump output to stdout but instead to its own log file located where the video file is. If you look in that log it will probably give a "file not found" type error.

Either way, fix the args in SJQ then the task should run properly.
Sorry for the late response. Just like you said it was a typo on my part. Everything is now working beautifully!

Thanks for all of your hard work and support!
Reply With Quote
  #554  
Old 03-12-2011, 06:12 AM
madas madas is offline
Sage Advanced User
 
Join Date: Jun 2008
Posts: 83
Hi Derek,

1. I don't know what the filename is as it doesn't tell me. It could be because SJQ is running on all of my live tv shows and once in a while they get removed before SJQ can read them in.

For now i'll delete them from the queue as they clog up the queue.

Is number 3 an easy fix?

M
Reply With Quote
  #555  
Old 03-12-2011, 07:47 AM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Quote:
Originally Posted by madas View Post
Hi Derek,

1. I don't know what the filename is as it doesn't tell me. It could be because SJQ is running on all of my live tv shows and once in a while they get removed before SJQ can read them in.

For now i'll delete them from the queue as they clog up the queue.
It's media file id 850572 and it's a recording of "Barefoot Contessa". Go to the web server (if you have it installed) and look for recordings of that show. Look at the details and see if any have that media file id.

Quote:
Is number 3 an easy fix?

M
If it is #3 then it's a bug in the core and would require Sage themselves to investigate.

Also, you didn't tell me which Groovy script(s) you're using for this task setup in SJQv4 so I can fix the null pointer error in them.
__________________
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
  #556  
Old 03-12-2011, 12:16 PM
madas madas is offline
Sage Advanced User
 
Join Date: Jun 2008
Posts: 83
Hi Derek,

That mediafile doesn't exist, so it must have already gotten deleted.

this was in the comskip.groovy file that was clogging up the queue.

M
Reply With Quote
  #557  
Old 03-12-2011, 12:36 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Quote:
Originally Posted by madas View Post
Hi Derek,

That mediafile doesn't exist, so it must have already gotten deleted.

this was in the comskip.groovy file that was clogging up the queue.

M
I fixed up comskip_test.groovy and united_comskip_test.groovy to handle the null pointer situation more gracefully. You can download the fix from svn.
__________________
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
  #558  
Old 03-12-2011, 01:29 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
This week's Groovy addition: Full SageTV backups

This week's Groovy addition is my implementation of full SageTV backups.

Follow this wiki doc for details on how to set it all up. This is an advanced configuration for advanced SJQv4 users. The task must run on a standalone task client (or outside of SJQv4 altogether). You cannot run this task from the SageTV plugin version of the task client (because part of the process is to shutdown SageTV, more details in wiki).

Basically, when you set it all up, you get the following:

An SJQv4 task capable of determining when it's "safe" to stop SageTV and perform a full backup of the SageTV application folder then restart SageTV. See the wiki doc and the scripts for more details.

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...
Reply With Quote
  #559  
Old 03-12-2011, 06:56 PM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
I just tested the SJQ4 UI on the 7.1 beta and there are some quirks that need to be fixed. I'll try to get to it shortly.
__________________

Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders.
Reply With Quote
  #560  
Old 03-13-2011, 10:55 AM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
@madas Got an email about a new post from you, came here to reply and it's gone. Did you figure it out?
__________________
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
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:39 AM.


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