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.

Reply
 
Thread Tools Search this Thread Display Modes
  #361  
Old 01-15-2010, 08:58 PM
razrsharpe razrsharpe is offline
Sage Icon
 
Join Date: Sep 2008
Location: Boston, MA
Posts: 2,111
Quote:
Originally Posted by korben_dallas View Post
Can SJQ cause SageTV (running in application mode, not service mode) to gracefully exit? If x y z then exit/shutdown..
sjq can execute a batch file so you should be able to run a batch file that kills sagetv. Have your batch file be something like this
Code:
taskkill /IM sagetv.exe
not sure if the process is sagetv.exe in application mode but im pretty sure it is.

ms notes on taskkill here
__________________
Server 2003 r2 32bit, SageTV9 (finally!)
2x Dual HDHR (OTA), 1x HD-PVR (Comcast), 1x HDHR-3CC via SageDCT (Comcast)
2x HD300, 1x SageClient (Win10 Test/Development)
Check out TVExplorer
Reply With Quote
  #362  
Old 01-15-2010, 11:00 PM
korben_dallas's Avatar
korben_dallas korben_dallas is offline
Sage Icon
 
Join Date: Oct 2004
Location: USA
Posts: 1,250
Quote:
sjq can execute a batch file so you should be able to run a batch file that kills sagetv.
My concern is that SageTV will be doing something when it gets killed, and things go foobar (corrupt dB, etc).

How deep can SJQ query SageTV's status? Can it determine if SageTV is doing an EPG update? Can it determine if SageTV is writing to wiz.bin?
__________________
SageTV server & client: Win 10 Pro x64, Intel DH67CF, Core i5 2405s, 8 GB ram, Intel HD 3000, 40GB SSD system, 4TB storage, 2x HD PVR component + optical audio, USB-UIRT 2 zones + remote hack, Logitech Harmony One, HDMI output to Sony receiver with native Intel bitstreaming
Reply With Quote
  #363  
Old 01-15-2010, 11:12 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Quote:
Originally Posted by korben_dallas View Post
My concern is that SageTV will be doing something when it gets killed, and things go foobar (corrupt dB, etc).

How deep can SJQ query SageTV's status?
There are a fair sized number of tests that SJQ can perform. See the User's Guide for more details.

Quote:
Can it determine if SageTV is doing an EPG update?
I believe there's an API call to check this, but currently there's no such test in SJQ - no one's ever asked for it and I don't personally need it so it's never been implemented.

Quote:
Can it determine if SageTV is writing to wiz.bin?
No. No such API call is available to test this condition. Presumably, if you were to shutdown Sage by graceful means then this shouldn't be an issue. I believe (but I don't know for sure since I've never really researched it) you can send Windows messages to the SageTV app, one of them being the EXIT command, which would, I believe, be the "graceful" shutdown you're after. Not 100% sure on any of that though.
__________________
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
  #364  
Old 01-22-2010, 12:35 PM
ChaOConnor's Avatar
ChaOConnor ChaOConnor is offline
Sage Aficionado
 
Join Date: Nov 2008
Location: Bel Air, MD
Posts: 355
MediaShrink Tasks

So what's the best way to get MediaShrink jobs run? To call mediaengine direct? I switched to that, now some jobs run, but it looks like jobs that had previously run don't get queued up again. How do I "reset" SJQ so it will re-run all media shrink jobs? I have to start clearing out space! lol
__________________
Server: AMD Phenom II X6 1090T 3.2GHz, ASRock 890FX Deluxe4 890FX, PNY Optima 8GB DDR3 1333
Media Storage: Rosewill RSV-S4-X 4 Bay Enclosure w/ 4 x 3TB via unRAID
Capture: HDHomerun Prime, HDHomerun x 2
Software: Sage Server 7.1.9 on Windows 7 (Virtualized in ESXi)
Clients: i3-2105, ASRock Z68 Pro3-M, 4GB DDR3 1600, 64GB SATA III (OS), 2TB WD Green (Recording), PNY GT 430 // 2 x HD-300
Reply With Quote
  #365  
Old 01-22-2010, 12:43 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Go to the "Complete Tasks" or "Failed Tasks" list (under Data menu) and remove those items you wish to rerun. Once removed, the QueueLoader process will reload those tasks into the queue on its next run.
__________________
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
  #366  
Old 01-22-2010, 12:53 PM
ChaOConnor's Avatar
ChaOConnor ChaOConnor is offline
Sage Aficionado
 
Join Date: Nov 2008
Location: Bel Air, MD
Posts: 355
Thanks man... so simple... I'm slow today. ;-)
__________________
Server: AMD Phenom II X6 1090T 3.2GHz, ASRock 890FX Deluxe4 890FX, PNY Optima 8GB DDR3 1333
Media Storage: Rosewill RSV-S4-X 4 Bay Enclosure w/ 4 x 3TB via unRAID
Capture: HDHomerun Prime, HDHomerun x 2
Software: Sage Server 7.1.9 on Windows 7 (Virtualized in ESXi)
Clients: i3-2105, ASRock Z68 Pro3-M, 4GB DDR3 1600, 64GB SATA III (OS), 2TB WD Green (Recording), PNY GT 430 // 2 x HD-300
Reply With Quote
  #367  
Old 01-23-2010, 07:48 AM
nyplayer nyplayer is offline
SageTVaholic
 
Join Date: Sep 2005
Posts: 4,997
Slugger,

Is there a test that I can check for "Recorded from" see picture attached. I want to check if a recording contains the words "Recorded from"
Attached Images
File Type: jpg criminalminds.jpg (145.4 KB, 286 views)
__________________
Channels DVR UBUNTU Server 2 Primes 3 Connects TVE SageTV Docker with input from Channels DVR XMLTV and M3U VIA Opendct.
Reply With Quote
  #368  
Old 01-23-2010, 08:30 AM
gveres gveres is offline
Sage Aficionado
 
Join Date: Nov 2007
Location: Waterloo, Ontario
Posts: 404
Quote:
Originally Posted by ChaOConnor View Post
So what's the best way to get MediaShrink jobs run? To call mediaengine direct? I switched to that, now some jobs run, but it looks like jobs that had previously run don't get queued up again. How do I "reset" SJQ so it will re-run all media shrink jobs? I have to start clearing out space! lol
I have always run mine from a very simple batch file and I have not had any problems.

Code:
set fname=%~d1%~p1%~n1

C:\QFIXSAGE\touch.exe -r "%~f1" "%fname%.timestamp"
start /I /LOW /WAIT C:\QFIXSAGE\MediaScraper\mediashrink.exe "%~f1"
C:\QFIXSAGE\touch.exe -r "%fname%.timestamp" "%fname%.mkv"

del "%fname%.timestamp"
The timestamp stuff was needed before EP put timestamp manipulation directly into MediaShrink. I can probably get rid of it now.

Greg
Reply With Quote
  #369  
Old 01-23-2010, 10:05 AM
ChaOConnor's Avatar
ChaOConnor ChaOConnor is offline
Sage Aficionado
 
Join Date: Nov 2008
Location: Bel Air, MD
Posts: 355
Quote:
Originally Posted by gveres View Post
I have always run mine from a very simple batch file and I have not had any problems.

Code:
set fname=%~d1%~p1%~n1

C:\QFIXSAGE\touch.exe -r "%~f1" "%fname%.timestamp"
start /I /LOW /WAIT C:\QFIXSAGE\MediaScraper\mediashrink.exe "%~f1"
C:\QFIXSAGE\touch.exe -r "%fname%.timestamp" "%fname%.mkv"

del "%fname%.timestamp"
The timestamp stuff was needed before EP put timestamp manipulation directly into MediaShrink. I can probably get rid of it now.

Greg
Greg, thanks, I'll give this a shot. What's your client ruleset?
__________________
Server: AMD Phenom II X6 1090T 3.2GHz, ASRock 890FX Deluxe4 890FX, PNY Optima 8GB DDR3 1333
Media Storage: Rosewill RSV-S4-X 4 Bay Enclosure w/ 4 x 3TB via unRAID
Capture: HDHomerun Prime, HDHomerun x 2
Software: Sage Server 7.1.9 on Windows 7 (Virtualized in ESXi)
Clients: i3-2105, ASRock Z68 Pro3-M, 4GB DDR3 1600, 64GB SATA III (OS), 2TB WD Green (Recording), PNY GT 430 // 2 x HD-300
Reply With Quote
  #370  
Old 01-23-2010, 10:34 AM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Quote:
Originally Posted by nyplayer View Post
Slugger,

Is there a test that I can check for "Recorded from" see picture attached. I want to check if a recording contains the words "Recorded from"
I'm not seeing what you're getting at with that pic. You'll have to explain further. Is there a certain field you're looking to search for that text in? Yeah, you're going to need to explain further.
__________________
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
  #371  
Old 01-23-2010, 11:07 AM
nyplayer nyplayer is offline
SageTVaholic
 
Join Date: Sep 2005
Posts: 4,997
Slugger,

The actual recording time on the EPG is 08:00 - 9:00 PM

But if you look in the description the actual "Recorded from" is 08:18 - 9:00 PM. If the recording starts and ends on time... you will not see the "Recorded from" field. I would like to check for recordings that did not start on time.

You answered my previous post about recording fav flaw. I would like to isolate recordings where this happens.


I thought maybe I can do something with GetExtraAiringDetails
__________________
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; 01-23-2010 at 11:19 AM.
Reply With Quote
  #372  
Old 01-23-2010, 11:33 AM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Quote:
Originally Posted by nyplayer View Post
Slugger,

The actual recording time on the EPG is 08:00 - 9:00 PM

But if you look in the description the actual "Recorded from" is 08:18 - 9:00 PM. If the recording starts and ends on time... you will not see the "Recorded from" field. I would like to check for recordings that did not start on time.

You answered my previous post about recording fav flaw. I would like to isolate recordings where this happens.
Ah... I got it now. The tests are available to check this kind of thing $.GetAiringStartTime{} and $.GetScheduleStartTime{} could be compared (same with *EndTime{}) to see if the show was recorded on time. However, SJQ currently doesn't support expanding object tests on the RHS of API calls. So, currently SJQ doesn't directly support this.

There are options, all requiring work on my end unless you know Java and want to write a patch.

1) SJQ could be modified to always check for and expand object calls on the RHS of tests

2) A new internal test could be written, say 'DidRecFollowSched', to test this situation and return true/false

3) You could write a custom Java class that tests for this using the new custom Java test interface (requires SJQ snapshot 753 or newer), however the current implementation of this does not support expanding object tests in the parameters of the java call, so it won't work for you now (though eventually it probably will).

If you don't know Java or you simply don't want to do it yourself then add a feature request ticket, but I'm currently working on other things right now so if you decide to wait for me to implement one of the above then I wouldn't hold your breath because it might be awhile. But if a ticket is there for this I'd probably eventually finish it.
__________________
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
  #373  
Old 01-23-2010, 11:57 AM
nyplayer nyplayer is offline
SageTVaholic
 
Join Date: Sep 2005
Posts: 4,997
thanks

Ok I will write a ticket but you gave me an Idea that I can pass the times to a batchfile and compare the times for now.
__________________
Channels DVR UBUNTU Server 2 Primes 3 Connects TVE SageTV Docker with input from Channels DVR XMLTV and M3U VIA Opendct.
Reply With Quote
  #374  
Old 01-23-2010, 12:14 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Quote:
Originally Posted by nyplayer View Post
thanks

Ok I will write a ticket but you gave me an Idea that I can pass the times to a batchfile and compare the times for now.
True, but you'd end up calling your batch file for every recording b/c the only way you could know if a recording didn't following the schedule using a batch file is to actually call the batch file for every recording:

Code:
/*
   You could limit the scope here by checking for certain titles, etc., but 
   the only way to know if a recording indeed didn't follow the EPG sched is
   to actually run your batch file against it
*/
if [IsObjMediaFile == true] {
   MYBATCHCHECKER
}
And in your client config:

Code:
/*
   If the durations aren't the same then the recording didn't follow the EPG,
   but that doesn't mean recording is partial unless you NEVER use
   paddings with your recordings
*/
MYBATCHCHECKER {
   "C:/tools/chksched.bat $.GetAiringDuration{} $.GetScheduleDuration{} \"%d%/%p%\""
}
Then chksched.bat would have to compare those numbers and then if they aren't the same do what it is you want to do to handle the situation. I would hardly call this an ideal situation, but I suppose it's the best that can be done with no mods to SJQ code base.

By the way, I use the *Duration{} tests because I think it's probably a cleaner way to test what it is you're trying to test for.

EDIT: You probably also want to pass the file name to the batch file as well so you know what recording you're dealing 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...

Last edited by Slugger; 01-23-2010 at 12:17 PM. Reason: Pass file name to batch file as well
Reply With Quote
  #375  
Old 01-23-2010, 12:36 PM
nyplayer nyplayer is offline
SageTVaholic
 
Join Date: Sep 2005
Posts: 4,997
Slugger,

$.GetAiringStartTime{} and $.GetScheduleStartTime{} are exactly the same no diff.

what you need is $.GetAiringStartTime{} and $.GetFileStartTime{}

also $.GetAiringDuration{} $.GetScheduleDuration{} are exactly the same.

what you need is $.GetAiringDuration{} $.GetFileDuration{}
__________________
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; 01-23-2010 at 12:45 PM.
Reply With Quote
  #376  
Old 01-24-2010, 09:27 AM
gveres gveres is offline
Sage Aficionado
 
Join Date: Nov 2007
Location: Waterloo, Ontario
Posts: 404
Quote:
Originally Posted by ChaOConnor View Post
Greg, thanks, I'll give this a shot. What's your client ruleset?
Here is my ruleset:

Code:
// compress adult shows
if [IsObjMediaFile == true && $.IsTVFile{} == true && $.IsFileCurrentlyRecording{} == false && FileExists == "%d%/%p%.edl" && Filename =$ ".mpg" && ($.GetShowTitle{} == "The Ellen DeGeneres Show" || $.GetShowTitle{} == "Nova scienceNOW" || $.GetShowTitle{} == "Rolex Sports Car Series Racing" || $.GetShowTitle{} == "SCCA Racing" || $.GetShowTitle{} == "New Yankee Workshop" || $.GetShowTitle{} == "Monster Jam")] 
{
    :SCANMEDIA "true"
    :PRIORITY -20
       ADULTCOMPRESS
}
and on the client side:

Code:
ADULTCOMPRESS {
   :MAX 1
   :RESOURCES 51
   :CPU "LOW"
   "C:/QFIXSAGE/AdultShrink.bat \"%c%\""
}
I think the max 1 is a hold over from old versions of SJQ that I just haven't cleaned up.

Greg
Reply With Quote
  #377  
Old 01-24-2010, 01:25 PM
ChaOConnor's Avatar
ChaOConnor ChaOConnor is offline
Sage Aficionado
 
Join Date: Nov 2008
Location: Bel Air, MD
Posts: 355
Greg, that batch file and ruleset worked!!! Thank you so much!

This has brought up and old problem, as the rules work on the WHS box which is "local", but for any networked clients, it failes out because the %c variable sends the filename w/ \\localhost\whatever... So how do I force it to send the Network location, ergo servername (Rebel-HQ)? Thanks again for everyone's help!
__________________
Server: AMD Phenom II X6 1090T 3.2GHz, ASRock 890FX Deluxe4 890FX, PNY Optima 8GB DDR3 1333
Media Storage: Rosewill RSV-S4-X 4 Bay Enclosure w/ 4 x 3TB via unRAID
Capture: HDHomerun Prime, HDHomerun x 2
Software: Sage Server 7.1.9 on Windows 7 (Virtualized in ESXi)
Clients: i3-2105, ASRock Z68 Pro3-M, 4GB DDR3 1600, 64GB SATA III (OS), 2TB WD Green (Recording), PNY GT 430 // 2 x HD-300
Reply With Quote
  #378  
Old 01-24-2010, 01:42 PM
nyplayer nyplayer is offline
SageTVaholic
 
Join Date: Sep 2005
Posts: 4,997
Quote:
Originally Posted by ChaOConnor View Post
Greg, that batch file and ruleset worked!!! Thank you so much!

This has brought up and old problem, as the rules work on the WHS box which is "local", but for any networked clients, it failes out because the %c variable sends the filename w/ \\localhost\whatever... So how do I force it to send the Network location, ergo servername (Rebel-HQ)? Thanks again for everyone's help!
map the paths in your clients.


:MAPDIR "\\\\localhost\\whatever" "\\\\Rebel-HQ\\whatever"
:MAPDIR "\\\\localhost\\\whatever" "\\\\Rebel-HQ\\whatever"



example mine below

//NYPLAYER
:MAPDIR "M:\\sagem" "\\\\169.254.5.12\\M$\\sagem"
:MAPDIR "N:\\sagen" "\\\\169.254.5.12\\N$\\sagen"
RECORDINGFROM {
:CPU LOW
:RESOURCES 10
"S:\\SJQSAGE\\RECORDINGFROM.bat \"%c%\" $.GetAiringStartTime{} $.GetFileStartTime{}"
}
__________________
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; 01-24-2010 at 01:46 PM.
Reply With Quote
  #379  
Old 01-24-2010, 09:11 PM
ChaOConnor's Avatar
ChaOConnor ChaOConnor is offline
Sage Aficionado
 
Join Date: Nov 2008
Location: Bel Air, MD
Posts: 355
Quote:
Originally Posted by nyplayer View Post
map the paths in your clients.
:MAPDIR "\\\\localhost\\whatever" "\\\\Rebel-HQ\\whatever"
:MAPDIR "\\\\localhost\\\whatever" "\\\\Rebel-HQ\\whatever"
Great, that did the trick, thank you!!!
__________________
Server: AMD Phenom II X6 1090T 3.2GHz, ASRock 890FX Deluxe4 890FX, PNY Optima 8GB DDR3 1333
Media Storage: Rosewill RSV-S4-X 4 Bay Enclosure w/ 4 x 3TB via unRAID
Capture: HDHomerun Prime, HDHomerun x 2
Software: Sage Server 7.1.9 on Windows 7 (Virtualized in ESXi)
Clients: i3-2105, ASRock Z68 Pro3-M, 4GB DDR3 1600, 64GB SATA III (OS), 2TB WD Green (Recording), PNY GT 430 // 2 x HD-300
Reply With Quote
  #380  
Old 01-24-2010, 11:01 PM
superdodge superdodge is offline
Sage User
 
Join Date: Feb 2009
Posts: 65
I am trying to run a VideoRedo script from SJQ. I have written a batch file and when I execute it from the command line it runs perfectly. When it is executed through SJQ I get the following error:

C:\Program Files (x86)\VideoReDoTVSuite4\vp.vbs(51, 2) WScript.CreateObject: Could not locate automation class named "VideoReDo.VideoReDoSilent".

This is an error most people report seeing when they have not yet run VideoRedo once as an administrator. I have set VideoRedo to always run as an administrator; however, I still get this problem.

Is there something about the way SJQ runs that could be causing this problem?
__________________
Thanks to the developers of the following tools - without your hard work my TV wouldn't be the same!

MeinMaui - SageMC ** stuckless - Phoenix & BMT ** PLUCKYHD - Sage Movie Wall ** razrsharpe - TVExplorer ** Slugger - SJQ, SRE and SageAlert ** bialio - Advanced Mini Guide
Reply With Quote
Reply


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
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


All times are GMT -6. The time now is 06:10 PM.


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