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
  #501  
Old 03-07-2011, 07:14 AM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Quote:
Originally Posted by tmiranda View Post
Yes, logfile needed please. Did you change anything when you rebuilt the box?

Slugger - I'm assuming the STV is getting an error from one of the APIs that access the H2 database. Any chance his database is corrupt and/or in some funky state that it's not supposed to be in?
If the db was corrupted then the sjq.log file would show exceptions from H2. But since there are none I'm assuming the db is still valid.
__________________
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; 03-07-2011 at 11:31 AM.
Reply With Quote
  #502  
Old 03-07-2011, 11:16 AM
bikesquid's Avatar
bikesquid bikesquid is offline
Sage Aficionado
 
Join Date: Jan 2010
Location: California's North Coast
Posts: 392
Quote:
Originally Posted by Slugger View Post
If the db was corrupted then the sjq.log file would should exceptions from H2. But since there are none I'm assuming the db is still valid.
Well, this morning it all seems to be working. All I did was do the same thing from the server machine, it all worked there and now retrying it on the client it seems to be working. Something that access from the server fixes/does that a client can't?
Reply With Quote
  #503  
Old 03-07-2011, 03:00 PM
Tropicaljoe's Avatar
Tropicaljoe Tropicaljoe is offline
Sage User
 
Join Date: Oct 2009
Location: Roscoe, IL
Posts: 22
Filename Paths

Slugger,
I am using the groovy script media_file_scanner.groovy script. My issue is that I have a bunch of imported tv shows ( already - commercial free ). the script returns true against these as well. Is there anyway to specify a path as a test in this script? I only record to one directory and want to comskip just files located in that directory. Any help is appreciated
Reply With Quote
  #504  
Old 03-07-2011, 03:11 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Quote:
Originally Posted by Tropicaljoe View Post
Slugger,
I am using the groovy script media_file_scanner.groovy script. My issue is that I have a bunch of imported tv shows ( already - commercial free ). the script returns true against these as well. Is there anyway to specify a path as a test in this script? I only record to one directory and want to comskip just files located in that directory. Any help is appreciated
Just change the media mask setting at the top of the file. I thought I had it only selecting tv files by default, but anyway make sure it's set to "T".

When it's a "T" then it will only look at tv recordings and not imported videos. If you're converting your imported videos so they are listed as tv recordings (via BMT or whatever) then, yes, you'll need to modify the script to ignore those directories. If that's the issue then let me know and I'll take a look at the script to see what I can come up with. If this is what you need then it's all about adding a condition inside of needsProcessing() to handle your requirements. If you have absolutely no scripting experience at all then I'll whip something up, but otherwise give it a shot.
__________________
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
  #505  
Old 03-07-2011, 03:39 PM
Tropicaljoe's Avatar
Tropicaljoe Tropicaljoe is offline
Sage User
 
Join Date: Oct 2009
Location: Roscoe, IL
Posts: 22
You've described it to a "T". I have imported the videos via BMT and just want to either include my recording directory or exclude the other import directories. I don't have any scripting experience so if you don't mind taking a look that would make my day!
Reply With Quote
  #506  
Old 03-07-2011, 03:54 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Quote:
Originally Posted by Tropicaljoe View Post
You've described it to a "T". I have imported the videos via BMT and just want to either include my recording directory or exclude the other import directories. I don't have any scripting experience so if you don't mind taking a look that would make my day!
Inside the needsProcessing() function, right before the "return true" statement, add this:

Code:
    // Skip recordings located in a specific directory
    if(MediaFileAPI.GetParentDirectory(mediaFile).getAbsolutePath().startsWith("C:\\ignore_dir\\"))
       return false
Replace the directory as appropriate.
__________________
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; 03-07-2011 at 04:04 PM.
Reply With Quote
  #507  
Old 03-07-2011, 04:04 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Please make note of the edit I made above. The original will work, my edit is "more" correct.
__________________
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
  #508  
Old 03-07-2011, 09:37 PM
Tropicaljoe's Avatar
Tropicaljoe Tropicaljoe is offline
Sage User
 
Join Date: Oct 2009
Location: Roscoe, IL
Posts: 22
Worked like a charm, Thanks again slugger!
Reply With Quote
  #509  
Old 03-08-2011, 07:47 PM
toricred's Avatar
toricred toricred is offline
Sage Icon
 
Join Date: Jan 2006
Location: Northern New Mexico
Posts: 1,729
I'm seeing SJQ get hung every Monday at 7:00pm MST. At thea time I generally have 7 or 8 recordings starting. I know I'll need toget logs, but I want to be prepared to grab them next week. Which logs will you want to see?
Reply With Quote
  #510  
Old 03-08-2011, 07:52 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Quote:
Originally Posted by toricred View Post
I'm seeing SJQ get hung every Monday at 7:00pm MST. At thea time I generally have 7 or 8 recordings starting. I know I'll need toget logs, but I want to be prepared to grab them next week. Which logs will you want to see?
Define "hung", please. I'll need SageTV debug logs (to see events being passed to SJQ from the core). I'll need plugins/sjq/sjq.log for the engine logs. And depending on what you mean by "hung", I may need the plugins/sjq-agent/logs/sjqagent.log file(s) for each task client.

When it "hangs", how do you recover? Stop/restart SJQ plugin, restart SageTV, reboot server? I'll need a lot of logs, but a more detailed description of what's going on would be a good start.

The sjq.log and sjqagent.log files are already available. They may have exceptions and errors logged that may point me to the cause right away.
__________________
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
  #511  
Old 03-08-2011, 08:01 PM
toricred's Avatar
toricred toricred is offline
Sage Icon
 
Join Date: Jan 2006
Location: Northern New Mexico
Posts: 1,729
I mean that it hangs my UI when I try to look at the queued or completed tasks, no more tasks are picked up by the clients, and process explorer shows a java task running that won't stop without killing the process.

I haven't tried restarting SJQ yet because I completely forgot it was an option. I've been fixing it by restarting the Sage service.
Reply With Quote
  #512  
Old 03-08-2011, 08:05 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Quote:
Originally Posted by toricred View Post
I mean that it hangs my UI when I try to look at the queued or completed tasks, no more tasks are picked up by the clients, and process explorer shows a java task running that won't stop without killing the process.

I haven't tried restarting SJQ yet because I completely forgot it was an option. I've been fixing it by restarting the Sage service.
Does Sage continue on or does the whole Sage app become non-responsive? Do those recordings continue? If the clients are picking up tasks, does the sjq.log file continue to be written to? Let's see the sjq.log file to start with.
__________________
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
  #513  
Old 03-08-2011, 08:20 PM
toricred's Avatar
toricred toricred is offline
Sage Icon
 
Join Date: Jan 2006
Location: Northern New Mexico
Posts: 1,729
Sage continues just fine and recordings work no problem. Here are the sjq and sjqagent log files.
Attached Files
File Type: zip logs.zip (420.1 KB, 118 views)
Reply With Quote
  #514  
Old 03-08-2011, 08:39 PM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
Quote:
Originally Posted by toricred View Post
Sage continues just fine and recordings work no problem. Here are the sjq and sjqagent log files.
Post the sage logfile when you can so I can see if the UI is hung.

I noticed that one of your Tasks calls ShowAnalyzer.exe. Are you sure you want to do that instead of calling ShowAnalyzerEngine.exe?
__________________

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
  #515  
Old 03-08-2011, 08:40 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Hmm... the logs just stop right at 19:00. And you say a Java process hangs. Based on the logs, that Java process is sav2.groovy. Can you paste that script in. Also, do you have Sage debug logging enabled? Let's see sagetv_0.txt for around 6:58pm to 7:05pm on Monday.

I'm thinking maybe the Sage event dispatcher thread is crashing, but that doesn't explain why the SJQ logs stop. I'd like to see the sav2.groovy script and sagetv_0.txt for Monday at 6:58pm - 7:05pm.
__________________
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
  #516  
Old 03-08-2011, 08:55 PM
toricred's Avatar
toricred toricred is offline
Sage Icon
 
Join Date: Jan 2006
Location: Northern New Mexico
Posts: 1,729
@tmiranda

I'm having SAV1 handle the queue management because I have it working flawlessly. That way I can track where recordings are in the processing. I don't have hangs from SAV so I just leave it running.

@slugger

sav2.groovy
Code:
def cmd = "C:\\Program Files (x86)\\Dragon Global\\ShowAnalyzerSuite\\ShowAnalyzer.exe"
def failed = false
Object mf = MediaFileAPI.GetMediaFileForID(Integer.parseInt(SJQ4_METADATA.get("SJQ4_ID")))

if(!(AiringAPI.IsNotManualOrFavorite(MediaFileAPI.GetMediaFileAiring(mf))))
   {
      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]
         println "** Running ${exe}... **"
         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
         println "** DONE SEGMENT **"
      }
   }  
return failed ? 1 : 0
I do have logging turned on, but the oldest is from just after I restarted to get SJQ running again so I'll have to wait until it happens again to provide the logs.
Reply With Quote
  #517  
Old 03-08-2011, 08:59 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Sage rolls the logs... so sagetv_1.txt would be the log prior to the reboot and so on. sagetv_1.txt or sagetv_2.txt should go back to Monday at 7pm hopefully?

EDIT: The groovy script looks fine. When the java process is hanging there is it chewing up CPU? 100%? 0%? Somewhere in between? The java process is definitely the sav2.groovy script.
__________________
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; 03-08-2011 at 09:01 PM.
Reply With Quote
  #518  
Old 03-08-2011, 09:09 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Can you break the task up into a test and then directly call SAV2 as the exe?

sav2_test.groovy:

Code:
Object mf = MediaFileAPI.GetMediaFileForID(Integer.parseInt(SJQ4_METADATA.get("SJQ4_ID")))

if(mf != null)
   return !AiringAPI.IsNotManualOrFavorite(MediaFileAPI.GetMediaFileAiring(mf)) ? 0 : 2
else
   return 2
Then for the exe, directly point to ShowAnalyzer.exe with args of "$SJQ4_PATH\$SJQ4_LAST_SEGMENT"

If this doesn't work then the next test will be to disable the task client plugin and run the Windows service standalone task client. I need to know which side is causing the problem and since the logs just stop at 19:00, I have no clue which side is the problem (engine or task client).
__________________
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
  #519  
Old 03-08-2011, 09:15 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Also, in your sav2.groovy:

if(!AiringAPI.IsNotFav...

Should be:

if(mf != null && !AiringAPI.IsNotFav...

The null pointer shouldn't blow up Sage, just the JVM running the script, but even that's handled by SJQ (I believe). But I'd still like you to test breaking the task up in to a test and a direct call to SAV2. My gut tells me it's a problem with Groovy process invocation, but just a gut feeling. So we'll skip the middle man and call SAV2 directly from Java. As I say, if that doesn't work then we'll need to separate the task client out from Sage and try to figure out which side is not playing nice.

Hopefully the Sage debug logs point us to something as well...
__________________
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; 03-08-2011 at 09:37 PM.
Reply With Quote
  #520  
Old 03-08-2011, 09:28 PM
toricred's Avatar
toricred toricred is offline
Sage Icon
 
Join Date: Jan 2006
Location: Northern New Mexico
Posts: 1,729
I looked all the way back to sagetv3.txt and it is still only through today.

Wouldn't your changes fail to get all segments if called on a non-live multi-segment file?
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.