SageTV Community  

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

Notices

SageTV Customizations This forums is for discussing and sharing user-created modifications for the SageTV application created by using the SageTV Studio or through the use of external plugins. Use this forum to discuss customizations for SageTV version 6 and earlier, or for the SageTV3 UI.

Closed Thread
 
Thread Tools Search this Thread Display Modes
  #41  
Old 05-12-2008, 07:22 PM
gveres gveres is offline
Sage Aficionado
 
Join Date: Nov 2007
Location: Waterloo, Ontario
Posts: 404
Slugger,

This works great. As nyplayer said, it is zippy now. Definitely ignoring the 15000 photos did the trick, because I am now trying to open the log for the last run under 1.3.0 and it is chugging away - has been for 5 minutes.

I have a couple of questions:

1) is there a way to enable and disable rulesets? For instance, right now there is a bug on the HD extender such that it can not play back any mpg that has been processed by VideoReDo - so I want to disable my videoReDo rule for now until this bug is fixed. But since I have gone through the trouble of getting it setup correctly and debugged, I don't want to delete the rule.

2) what is the filter link for at the top of the log page? Actualy, what do those check boxes do at the top of the log page? They don't seem to change the output at all.

BTW, I think I have the videoReDo rules working now. The next step is ComSkip.

Great work!!!
Greg
  #42  
Old 05-12-2008, 08:55 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Quote:
Originally Posted by gveres View Post
Slugger,

This works great. As nyplayer said, it is zippy now. Definitely ignoring the 15000 photos did the trick, because I am now trying to open the log for the last run under 1.3.0 and it is chugging away - has been for 5 minutes.
I suspect the processing of the 15,000 photos isn't the issue, but it's the logging of everything to the SJQ database that is the bottle neck. The media library on my system is only about 350 entries (video/music) so I just have no way to replicate an environment with that kind of media library size in order to try and increase the performance of the database operations. If you have an SQLite client available on the system, I'd highly recommend manually deleting the entire log table because the first time SJQ tries to purge the logs itself is likely going to cause performance issues as SJQ's method of purging logs is a brute force method required due to limitations in SQLite. I would highly recommend doing a simple 'DELETE FROM log' against the SJQ database. SJQ's purge method should work, but it will be incredibly slow. If you don't have an SQLite client handy then I'd recommend purging manually via the servlet at a time when you know the system won't be doing anything important for some time. When purging via the servlet, use values of 1 as 0 means, "don't purge anything."

Quote:
Originally Posted by gveres View Post
I have a couple of questions:

1) is there a way to enable and disable rulesets? For instance, right now there is a bug on the HD extender such that it can not play back any mpg that has been processed by VideoReDo - so I want to disable my videoReDo rule for now until this bug is fixed. But since I have gone through the trouble of getting it setup correctly and debugged, I don't want to delete the rule.
Not at this time. I do have a feature request in the project tracker for this as you're not the first person to ask for this. I've kind of been avoiding that ticket as my initial investigation suggests it won't be as easy as I originally thought. Now that I'm able to muster the strength to get out of bed, I'm starting a delayed vacation tomorrow so I'll probably tackle this ticket next time I sit down to play with the code, which will probably be towards the end of the month. I'll definitely try to include this feature in the final 1.4.0 build.

Quote:
Originally Posted by gveres View Post
2) what is the filter link for at the top of the log page? Actualy, what do those check boxes do at the top of the log page? They don't seem to change the output at all.
The filters determine what type of messages are displayed when you pick a log to view. Unless you're trying to track a problem, you really only need to have the 'Plugin' and 'Info' boxes checked. Everything else can be left unchecked. Here's what the various log messages mean:

Plugin: Show log messages produced by the plugin class
Servlet: Show log messages produced by the webserver servlet

Info: Show general info messages (can't be disabled)
DataStore: Show debug messages from the database (JDBC/SQL)
Debug: Show general debug messages
Exceptions: Show any Java exceptions caught by the plugin/servlet
Stdout: Show the stdout of any action ran by SJQ on a media file
Stderr: Show the stderr of any action ran by SJQ on a media file

Note that all of these messages are always logged to the SJQ database, the filter only filters their display within the log tab of the servlet. The items in bold are the ones you should leave on for typical log viewing, the rest are really only there for me while I develop or for people trying to track down a problem with SJQ. After modifying the checkboxes you need to click filter. The checkboxes are only modified after clicking the filter link.

Quote:
Originally Posted by gveres View Post
BTW, I think I have the videoReDo rules working now. The next step is ComSkip.

Great work!!!
Greg
Thanks, definitely making strides in the right direction. As I said, I'm heading out of town for the remainder of the week and probably won't be looking at any of this again until the end of the month, but please keep testing with the 1.3.0a build and report any problems/requests in the project tracker. It's ok to post messages and request features here, but they're likely to get lost, especially since I won't be keeping up with my email while on vacation (a personal no Internet policy while on vacation). Things added to the tracker are guaranteed to be seen. Here is a link to the trackers for the SJQ project.

Last edited by Slugger; 05-12-2008 at 08:58 PM. Reason: Clear up logging details
  #43  
Old 05-12-2008, 09:49 PM
gveres gveres is offline
Sage Aficionado
 
Join Date: Nov 2007
Location: Waterloo, Ontario
Posts: 404
Glad you are feeling better. Have a good vacation.

As an interesting data point, the SQLite database file is now 2.5 Gig.

Greg
  #44  
Old 06-06-2008, 07:49 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
SJQ v1.4.0 is now available.

Code:
v1.3.0 -> v1.4.0
================

* 1962002: Allow for dynamic arithmetic in TimeUntilNextRecording test
* 1962455: Allow SJQ to ignore specified types of media (i.e. only scan tv files, etc.)
* 1965446: Make delay time before each SJQ run configurable
  #45  
Old 06-15-2008, 08:55 AM
nyplayer nyplayer is offline
SageTVaholic
 
Join Date: Sep 2005
Posts: 4,997
Slugger,

Is it possible to add a rule..if the Show Is Archived? I would like to move a show to a different drive if it is Archived.
__________________
Channels DVR UBUNTU Server 2 Primes 3 Connects TVE SageTV Docker with input from Channels DVR XMLTV and M3U VIA Opendct.
  #46  
Old 06-15-2008, 12:09 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Quote:
Originally Posted by nyplayer View Post
Slugger,

Is it possible to add a rule..if the Show Is Archived? I would like to move a show to a different drive if it is Archived.
I don't see an API call to tell me if a recording is archived. So, assuming that's the case, then I'd have to say that this particular test isn't possible. There is an API call IsLibraryFile() which is about the closest thing I could find, but the description for that method in the API docs doesn't mention anything about the archive status of a recording. So my initial thought on this is that it doesn't look possible, but when I have a free hour some evening this week I'll dive into the API docs a little deeper and see what I can find. If there's an API call that gives the archive status of a recording then adding the test to SJQ is trivial - literally five minutes to do it. It's just a matter of finding an API call that returns the required information. Feel free to have a look at the API docs and let me know if you see something that I may have overlooked.
  #47  
Old 06-15-2008, 01:37 PM
BobPhoenix BobPhoenix is offline
SageTVaholic
 
Join Date: Oct 2004
Posts: 3,152
Quote:
Originally Posted by Slugger View Post
I don't see an API call to tell me if a recording is archived. So, assuming that's the case, then I'd have to say that this particular test isn't possible. There is an API call IsLibraryFile() which is about the closest thing I could find, but the description for that method in the API docs doesn't mention anything about the archive status of a recording. So my initial thought on this is that it doesn't look possible, but when I have a free hour some evening this week I'll dive into the API docs a little deeper and see what I can find. If there's an API call that gives the archive status of a recording then adding the test to SJQ is trivial - literally five minutes to do it. It's just a matter of finding an API call that returns the required information. Feel free to have a look at the API docs and let me know if you see something that I may have overlooked.
Try TWO. If the file is a library file (IsLibraryFile) and is a TVFile (IsTVFile) then it should be an archived file.

Code:
IsArchivedFile = IsLibraryFile(MediaFile) && IsTVFile(MediaFile)

Last edited by BobPhoenix; 06-15-2008 at 01:46 PM.
  #48  
Old 06-15-2008, 06:50 PM
toricred's Avatar
toricred toricred is offline
Sage Icon
 
Join Date: Jan 2006
Location: Northern New Mexico
Posts: 1,729
I'm just setting this up and I've run into some issues I don't understand. First off I can't get my rule for running SA to work on only .mpg files. Every time it evaluates the files it tries to run on the .avi files as well.

Second I'm wondering if it will run multiple copies of SA at once or only 1.
  #49  
Old 06-15-2008, 07:00 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 just setting this up and I've run into some issues I don't understand. First off I can't get my rule for running SA to work on only .mpg files. Every time it evaluates the files it tries to run on the .avi files as well.

Second I'm wondering if it will run multiple copies of SA at once or only 1.
I'd have to see your rules.sjq file to see how your rules are setup.

For the second part, SJQ will only run one process at a time and it waits for that process to complete before triggering another. I've thought about allowing multiple processes to be triggered by SJQ, but haven't had a personal need for it so haven't bothered implementing it.
  #50  
Old 06-15-2008, 07:02 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Quote:
Originally Posted by BobPhoenix View Post
Try TWO. If the file is a library file (IsLibraryFile) and is a TVFile (IsTVFile) then it should be an archived file.

Code:
IsArchivedFile = IsLibraryFile(MediaFile) && IsTVFile(MediaFile)
Seems to make sense. I'll add the test some evening this week and get a 1.5.0 release out maybe before next weekend.
  #51  
Old 06-15-2008, 07:05 PM
toricred's Avatar
toricred toricred is offline
Sage Icon
 
Join Date: Jan 2006
Location: Northern New Mexico
Posts: 1,729
Here are is the contents of my rules.sjq for right now. After I have it working well, I'll need to add rules to use different .ini files for certain shows and a rule to not process on the movie channels.

###__ShowAnalyzer
$ Filename: mpg
!= FileExists: %d%\%b%.edl
SA_NOT_5XX "c:\program files\dragon global\ShowAnalyzer\Showanalyzer.exe" "%f%"
  #52  
Old 06-15-2008, 07:10 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Quote:
Originally Posted by toricred View Post
Here are is the contents of my rules.sjq for right now. After I have it working well, I'll need to add rules to use different .ini files for certain shows and a rule to not process on the movie channels.

###__ShowAnalyzer
$ Filename: mpg
!= FileExists: %d%\%b%.edl
SA_NOT_5XX "c:\program files\dragon global\ShowAnalyzer\Showanalyzer.exe" "%f%"
I'm stumped, but change the "mpg" to ".mpg" (add a period in front) and try again. As is, the rule still shouldn't match avi files, but if adding the period actually fixes it then I have some debugging to do.
  #53  
Old 06-15-2008, 07:18 PM
toricred's Avatar
toricred toricred is offline
Sage Icon
 
Join Date: Jan 2006
Location: Northern New Mexico
Posts: 1,729
I had it like that before, but it didn't seem to work. Now it seems to be working with the .mpg. I'm also trying to tell it to not do it if an .edl file exists. Should this work with the rules.sjq I posted earlier? It seems to keep running on files that already have a .edl file.
  #54  
Old 06-15-2008, 07:31 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Quote:
Originally Posted by toricred View Post
I had it like that before, but it didn't seem to work. Now it seems to be working with the .mpg. I'm also trying to tell it to not do it if an .edl file exists. Should this work with the rules.sjq I posted earlier? It seems to keep running on files that already have a .edl file.
Everything should work as you think given the rule file you pasted in before. Stop Sage, replace the sjq jar in the JARs folder with this one, then restart Sage. Reproduce the unexpected results then go the log viewer, enable debug messages in the view then send me the output from a file that you didn't expect to run along with the ruleset file. With the debug data it shouldn't take me long to figure out what's going on.
  #55  
Old 06-15-2008, 07:34 PM
toricred's Avatar
toricred toricred is offline
Sage Icon
 
Join Date: Jan 2006
Location: Northern New Mexico
Posts: 1,729
The wife and kids are watching now so I'll have to do it tonight once I can shut down Sage for a few minutes without risking my life.
  #56  
Old 06-15-2008, 07:36 PM
toricred's Avatar
toricred toricred is offline
Sage Icon
 
Join Date: Jan 2006
Location: Northern New Mexico
Posts: 1,729
One more thing. Do the jobs get run at a lower priority or something? It seems to be running much slower than when I was using DirMon2.
  #57  
Old 06-15-2008, 07:56 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Quote:
Originally Posted by toricred View Post
One more thing. Do the jobs get run at a lower priority or something? It seems to be running much slower than when I was using DirMon2.
Nope, I do not modify process priorities at all.
  #58  
Old 06-15-2008, 08:06 PM
nyplayer nyplayer is offline
SageTVaholic
 
Join Date: Sep 2005
Posts: 4,997
Quote:
Originally Posted by toricred View Post
The wife and kids are watching now so I'll have to do it tonight once I can shut down Sage for a few minutes without risking my life.
What I do to avoid this is setup SJQ to run on the client on my server. I run Sage as a service the I run the Sage UI in low priority. That way I never have to stop the service to make changes to SJQ.
__________________
Channels DVR UBUNTU Server 2 Primes 3 Connects TVE SageTV Docker with input from Channels DVR XMLTV and M3U VIA Opendct.
  #59  
Old 06-15-2008, 08:27 PM
toricred's Avatar
toricred toricred is offline
Sage Icon
 
Join Date: Jan 2006
Location: Northern New Mexico
Posts: 1,729
OK, I used a command line to get SA to not throttle.

It turns out that it still isn't looking at only .mpg files so I'm trying a different rule as follows:

% Filename: *.mpg
  #60  
Old 06-15-2008, 08:32 PM
nyplayer nyplayer is offline
SageTVaholic
 
Join Date: Sep 2005
Posts: 4,997
toricred
It should look like below... I Use "ends with"

$ Filename: .mpg
__________________
Channels DVR UBUNTU Server 2 Primes 3 Connects TVE SageTV Docker with input from Channels DVR XMLTV and M3U VIA Opendct.

Last edited by nyplayer; 06-15-2008 at 08:34 PM.
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 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: Sage Job Queue (SJQ) v3 Slugger SageTV Customizations 1355 07-25-2013 07:44 AM
Sage Job Queue (SJQ) new release notifications Slugger Customization Announcements 3 12-17-2009 09:59 AM
Sage Job Queue Completed tasks problem raffmanlt SageTV Customizations 2 08-18-2009 07:34 PM
Comskip Monitor VS Sage Job Queue SJQ personalt SageTV Customizations 6 03-02-2009 10:27 AM
Plugin: SJQ v1.1.0RC1 Available - Testers Needed Slugger SageTV Customizations 35 04-21-2008 08:12 AM


All times are GMT -6. The time now is 01:49 AM.


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