|
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. |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
Plugin: Sage Job Queue (SJQ) v3
Given the sweeping changes between SJQ v1 and the new SJQ v3, I feel it appropriate to start a new thread specifically for SJQ v3 support.
Please post only about SJQ v3 in this thread. SJQ v2 support can be had in this thread. SJQ v3 is now officially open to support questions. Please visit the project download site and grab the latest version (3.0.0.640 as of this post). Be sure to read the beta upgrade wiki before upgrading from SJQ v2. New users to SJQ v3 can ignore that wiki doc. An initial draft of the SJQ v3 User's Guide is now available. It's a draft, it's rough, but most of the examples have been updated. Please feel free to point out errors and omissions in the doc. A quick cheat sheet for users migrating from v2 to v3 will be available in a day or two (or three or four, i.e. some time sort of soon). Most of the tips to be included in that doc are scattered throughout the old support thread ($ object, kill active processes, IsObj* tests, etc.). Please note, SJQ v3 is still in beta!
__________________
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... |
#2
|
|||
|
|||
Slugger,
Question about _RUNQLOADER can this be run more than once. for example Rule # 1 runs a task QFIX against a media object then _RUNQLOADER Rule # 2 runs COMSKIP against the same media object can I schedule another _RUNQLOADER in rule 2
__________________
Channels DVR UBUNTU Server 2 Primes 3 Connects TVE SageTV Docker with input from Channels DVR XMLTV and M3U VIA Opendct. |
#3
|
||||
|
||||
Upgraded...can't log in...old version?
I just upgraded to 3.0.0.640. During the upgrade I shutdown the SageTV service, made a copy of the sjq.sqlite file, and installed the new version. The sjq.war file in the jetty/webapps directory shows a date of 11/4/09.
When I get to the login screen it isn't recognizing my password nor the default "sjqadmin". Additionally, when I click on the "About" under help it shows a dialog box with 2.1.5.484 as the version...???!!! I did upgrade to the 1.6 Jetty release...and tested the old SJQ (coincidentally 2.1.5.484) to make sure the jetty installation was stable...everything worked fine. I also switched over to the jetty version of the webserver and that is running without problem. So...is something being cached somewhere that needs to be flushed? Did I miss something in the upgrade?
__________________
Check it out! - http://www.vholdr.com/video/playing-sky |
#4
|
|||
|
|||
Quote:
I can see a need/desire to be able to trigger those two tasks arbitrarily and more than once (actually the use case that triggered the addition of those tasks would probably want this behaviour as well). Those tasks are likely to change before v3 is moved out of beta. For now, however, I think they're only going to run once (per media file). Please let me know if that's what you're seeing.
__________________
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... |
#5
|
|||
|
|||
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... |
#6
|
|||
|
|||
Quote:
__________________
Channels DVR UBUNTU Server 2 Primes 3 Connects TVE SageTV Docker with input from Channels DVR XMLTV and M3U VIA Opendct. |
#7
|
||||
|
||||
Quote:
__________________
Check it out! - http://www.vholdr.com/video/playing-sky |
#8
|
||||
|
||||
GetShowTitle warnings
I've pre-pended all my rules with "IsObjMediaFile == true" but I'm still getting a slew of
2009-11-06 15:47:45,046 WARN [RulesParser]: Unable to invoke method 'GetShowTitle'; return false for test! warnings. Any ideas?
__________________
Check it out! - http://www.vholdr.com/video/playing-sky |
#9
|
|||
|
|||
Quote:
IsObjMediaFile == "true" && $.GetMediaTitle{} == "NCIS"
__________________
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; 11-06-2009 at 04:11 PM. |
#10
|
|||
|
|||
nyplayer is correct. Hopefully this section from the new SJQv3 User Guide will help.
Unfortunately, this is once again a case of the author of the code also authoring the docs so I'm probably skipping over some details just because I consider them "minor" b/c of my familiarity with everything. The basic idea from that link above is you need to test what kind of object you're scanning (via IsObjMediaFile or IsObjSysMsg) and once you know what kind of object you have then you can call tests against it via $.MethodName{}. The table of tests below that example shows which tests have been removed in SJQv3 and how to access similar info via calls to the $ object. EDIT: You could also call $.GetMediaTitle{} as nyplayer suggested. $.GetShowTitle{} is also valid. For media objects, you can call methods from MediaFileAPI, ShowAPI. AiringAPI, or ChannelAPI, which is why either one would be 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; 11-06-2009 at 04:29 PM. Reason: Clarify method call |
#11
|
|||
|
|||
Quote:
Code:
if [IsObjMediaFile == true && $.GetShowTitle{} == "Seinfeld"] { :SCANMEDIA "true" :RUNQLOADER "true" :PRIORITY 100 MYTASK }
__________________
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... |
#12
|
|||
|
|||
Snapshot 647 contains the fix to move those two internal tasks to task options; implemented exactly as described above.
__________________
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... |
#13
|
|||
|
|||
Not sure what I have done wrong
Just did the install (SJQ v3.0.0.647) and I am getting an error. FYI - I am just going for the basic "only process scheduled recordings using comskip" approach, so I have copied the rule directly from the wiki:
if [IsObjMediaFile == true && $.IsTVFile{} == true && $.IsNotManualOrFavorite{} == false] { :PRIORITY 10 # Optional, default priority is zero COMSKIP } But when I run it nothing happens and the log I get says: 2009-11-09 08:27:18,453 INFO [MediaFileQueueLoader]: Thread started 2009-11-09 08:27:18,453 INFO [ClientMonitor]: Thread started 2009-11-09 08:27:18,453 INFO [InternalTaskClient]: Thread started 2009-11-09 08:27:18,468 INFO [SystemMessageQueueLoader]: Thread started 2009-11-09 08:27:19,109 INFO [DataStore]: SQLite driver implementation: 'native' 2009-11-09 08:27:19,109 INFO [DataStore]: DataStore connection pool initialized with 5 connections. 2009-11-09 08:27:19,203 ERROR [MediaFileQueueLoader]: Unexpected exception java.lang.RuntimeException: Invalid field name, 'IsTV', on line 1 at com.google.code.sagetvaddons.sjq.server.RulesParser$Evaluator.internalTest(RulesParser.java:210) at com.google.code.sagetvaddons.sjq.server.RulesParser$Evaluator.runTest(RulesParser.java:135) at com.google.code.sagetvaddons.sjq.server.RulesParser$Evaluator.evalTest(RulesParser.java:122) at com.google.code.sagetvaddons.sjq.server.RulesParser$Evaluator.(RulesParser.java:72) at com.google.code.sagetvaddons.sjq.server.RulesParser$Evaluator.(RulesParser.java:101) at com.google.code.sagetvaddons.sjq.server.RulesParser.loadQ(RulesParser.java:258) at com.google.code.sagetvaddons.sjq.server.RulesParser.(RulesParser.java:232) at com.google.code.sagetvaddons.sjq.server.MediaFileQueueLoader.run(MediaFileQueueLoader.java:71) at java.lang.Thread.run(Unknown Source) Any thoughts on what I screwed up? Thanks
__________________
Sage Server = HP Pavilion M9250f w/ WHS, Intel Core 2 Quad Q6700 (K) (2.66GHz), 4GB DDR2 800, ,2 x 500GB SATA 3G 7200RPM (in share), 1 x 1TB WD Green 3G (not in share). 2xHD-PVR hooked up via USB TV Translators recording from 2 DirecTV HD. 2 SageTV HD-100s hooked up via Cat 6 network. SageTV 7. |
#14
|
|||
|
|||
The example works as expected when I test it here, so if you did a copy/paste from the user's guide then check over it again and ensure there's no spaces accidentally inserted (check around $.IsTVFile{} b/c that's where the parser is complaining). If you upgraded from SJQ v2, then make sure your old rulesets are either removed or updated. 'IsTV' was the name of a test in v2 that is no longer valid in v3 and would need to be replaced with $.IsTVFile{} under SJQv3.
__________________
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... |
#15
|
|||
|
|||
I know that you can no longer check for the archive flag in version 3, but is there any other flag that I could set manually and check for other than "Watched"? I would like to set some sort of flag to a recording and have it moved to a different drive using the new MOVEREC task. I don't want to set any rules that check for channel number or show id.
|
#16
|
|||
|
|||
Quote:
($.IsTVFile{} == true && $.IsLibraryFile{} == true) If that test is true then the file is an archived tv recording.
__________________
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... |
#17
|
|||
|
|||
Slugger, great work. I just upgraded to v3 tonight to try out the SCANMEDIA and RUNQLOADER features that I asked for. They work perfectly, thank you very much for putting them in. It makes the entire system run so much smoother.
The above post just gave me an idea. I have been recording shows off the HD movie network channels and I then drag them over to my mac pro to run handbrake on them and put them into one of my video directories. Since I upgraded my server to a Core i5, I now have enough horsepower on the server to have the server do the work. I will have to see if those recordings are also flagged with isTV. I think what you and kfontenot are saying is that if I mark something as archived in the GUI, the rule would then trigger and it would be moved to the videos folder. That would definitely save some effort. Greg |
#18
|
|||
|
|||
Thanks Slugger!! Would I also need this test as well : IsObjMediaFile == true ? I'm thinking not. I think the other tests would not pass if if it were not a media file.
|
#19
|
|||
|
|||
You don't need it, but it's recommended. You should always check to see what kind of object you're processing before calling API methods against it. Not doing so could cause a lot of headaches under certain circumstances (SJQ can handle it, but you may end up doing some things you don't expect).
__________________
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... |
#20
|
|||
|
|||
To illustrate my point from above:
Code:
# Run commercial flagger against all recordings that aren't watched except episodes of "Family Guy" if [$.GetShowTitle{} != "Family Guy" && $.IsWatchedCompletely{} == false] { COMSKIP }
__________________
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... |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Sage Job Queue (SJQ) new release notifications | Slugger | Customization Announcements | 3 | 12-17-2009 09:59 AM |
Plugin: Sage Job Queue (SJQ) | Slugger | SageTV Customizations | 991 | 12-11-2009 03:52 PM |
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 |