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
  #681  
Old 05-06-2009, 01:40 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Quote:
Originally Posted by nyplayer View Post
2009/05/06 12:23:04.640 Line 83: Evaluating 'IsViewingMedia == "false"' == true
I assume SJQ is installed on the server and not on the client? From the User Guide:

Quote:
IsViewingMedia 2.0.0.61 Boolean If SJQ is installed on the server, test if the server or any connected media extender is viewing content; if installed on a client then test if that client is currently viewing media
This is due to the limitation in the Sage API. There is no way to determine if a connected client is doing anything. All I can tell is that a client is connected to the server. If you ran SJQ from the client then the test would work as expected. So if you're running SJQ from the server then the best you can do is to use the IsClientConnected test. Again, from the User Guide:

Quote:
IsClientConnected 2.0.0.61 Boolean Test if any client is connected to the server
Hopefully that all makes sense?
__________________
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...
  #682  
Old 05-06-2009, 01:50 PM
nyplayer nyplayer is offline
SageTVaholic
 
Join Date: Sep 2005
Posts: 4,997
Slugger,

Thanks I fully understand now. On my reboot job I will just issue a stop command to the clients. Then reboot so they can resume viewing from where they left off.
__________________
Channels DVR UBUNTU Server 2 Primes 3 Connects TVE SageTV Docker with input from Channels DVR XMLTV and M3U VIA Opendct.
  #683  
Old 05-07-2009, 09:17 PM
starflight starflight is offline
Sage User
 
Join Date: Jan 2009
Posts: 14
Creating a QSF Task for the Client

Hey,

I found SJQ earlier today and I have it set up and responding.

I need help with creating a client task to use Videoredo's QuickStream Fix.

I want to run the QSF task after the TV show has ending. I've got that code from other examples.

I don't know how to get "fixed" file to have the same timestamp as the original file.

I've seen where other folks have tried at using QSF, but I haven't seen a solution to keep the same timestamp of the original file.

Slugger, this is a really cool tool! Many thanks for efforts!

Thanks,
Starflight
  #684  
Old 05-07-2009, 10:17 PM
nyplayer nyplayer is offline
SageTVaholic
 
Join Date: Sep 2005
Posts: 4,997
Starflight,

With the latest SageTV 6 and higher you do not need to set the timestamp anymore. Just qfixing it and replacing it is enough.
__________________
Channels DVR UBUNTU Server 2 Primes 3 Connects TVE SageTV Docker with input from Channels DVR XMLTV and M3U VIA Opendct.
  #685  
Old 05-08-2009, 07:51 AM
starflight starflight is offline
Sage User
 
Join Date: Jan 2009
Posts: 14
Thanks nyplayer, but keeping the timestamp is for my benefit too. Mr. BobPhoenix has created a tool call Video Edit to edit the cut points similar to using VRD. He even had a menu option to queue jobs to VRD. One of the VRD choices was to send a file to QSF. The neat thing was that the file timestamp stayed the same. Unfortunately, Mr. BobPhoenix didn't continue his work passed version 0.2.10. Hope he's still well.

BTW, I saw your the thread post #490 for creating a server/client task for a QSF. It's great. Sure wished it would keep the same timestamp.

I'm embedded systems C programmer. I'm a little out of my league in the Java/Scripting world.

Thanks,
Starflight
  #686  
Old 05-08-2009, 08:11 AM
nyplayer nyplayer is offline
SageTVaholic
 
Join Date: Sep 2005
Posts: 4,997
starflight,
Keeping the Timestamp is easy with a utility called touch. example touch.exe -r "originalfile" "qfixedfile" ...I have attached it

This is an example of my batch file.


Code:
IF EXIST "%~d1%~p1%~n1.working" goto end
IF EXIST "%~d1%~p1%~n1.QFixed" goto end
dir "%~f1">>"%~d1%~p1%~n1.working"
del "%~d1%~p1tmpEncode\%~n1.tmp"
set touchpath=c:\touch\

set videoredo_path=c:\program files\videoredoPlus\

set priority=low

set delOriginal=yes

rem "set delOriginal above to yes or no.... yes will delete original mpg and replace with QFixed file."
rem "if set to no will QFIX file to tmpEncode directory but will not delete original...."

set extension=mpg
rem ........Do Not Touch Below................................................
if NOT exist "%videoredo_path%vp.vbs" goto :end
if Not exist "%~f1" exit
Title Encoding %1
if Not exist "%touchpath%touch.exe" goto errtouch
md "%~d1%~p1tmpEncode"

START /B /W /MIN /%priority% cscript.exe //nologo "%videoredo_path%vp.vbs" "%~f1" "%~d1%~p1tmpEncode\%~n1.tmp" /t1 /d /q

if errorlevel = 1 goto errtrans
"%touchpath%touch.exe" -r "%~f1" "%~d1%~p1tmpEncode\%~n1.tmp"
if errorlevel = 1 goto :errtouch
if /I "%delOriginal%" EQU "yes"  del "%~f1"
if /I "%delOriginal%" EQU "yes" if not exist "%~f1" echo "Qfix Completed">>"%~d1%~p1%~n1.QFixed"
if /I "%delOriginal%" EQU "yes" if not exist "%~d1%~p1%~n1.QFixed" if exist "%~f1" echo "File In Use Not Replaced">>"%~d1%~p1%~n1.inuse%extension%"
if /I "%delOriginal%" EQU "yes" if exist "%~d1%~p1%~n1.QFixed" if not exist "%~f1" move "%~d1%~p1tmpEncode\%~n1.tmp" "%~d1%~p1%~n1.%extension%"
del "%~d1%~p1%~n1%.working"
:end
exit
:errtrans
echo "Error Encoder Syntax error see below " >>"%~d1%~p1%~n1%.error"
exit
:errtouch
echo "Error Touch.exe not found in %touchpath%" >>"%~d1%~p1%~n1%.error"
exit
Attached Files
File Type: zip touch.zip (16.7 KB, 155 views)
__________________
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; 05-08-2009 at 08:16 AM.
  #687  
Old 05-08-2009, 12:49 PM
starflight starflight is offline
Sage User
 
Join Date: Jan 2009
Posts: 14
nyplayer, Many thanks!

I have it working now. Processing my first mpg file.

Now onto using VRD AD. I've been using Comskip. Thought I'd give VRD AD a try.

Thanks again,
Starflight
  #688  
Old 05-13-2009, 08:10 AM
nyplayer nyplayer is offline
SageTVaholic
 
Join Date: Sep 2005
Posts: 4,997
Slugger,

Is there a way to get the tuner that a TV Show is recorded on? I see it in the show details. I would like to process all shows recorded by a particular tuner.
__________________
Channels DVR UBUNTU Server 2 Primes 3 Connects TVE SageTV Docker with input from Channels DVR XMLTV and M3U VIA Opendct.
  #689  
Old 05-13-2009, 10:29 AM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
I think the GetMediaFileEncoding API call will give this info. Can you open a ticket on the project web site for this, please? Not sure when I'll get around to it, but it won't take long to do so probably on the next rainy day that I'm around the laptop. By opening the ticket it'll also ensure you'll get an email as soon as I check in the code for the change.
__________________
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...
  #690  
Old 05-13-2009, 01:58 PM
Grasshopper Grasshopper is offline
Sage Aficionado
 
Join Date: Nov 2003
Posts: 314
Help a new user

I think I have SJQ set up and working properly, mostly. I get Comskip jobs appearing in the queue and can see that they're running. That's when things take a turn -- the jobs start appearing in the Failed Tasks list, rather than the Completed Tasks list. But oddly, the edl files appear in my Sage directory, so they're being created and are usable (I've tested this). Anything to check first? Perhaps this bit from the SJQ log might provide a clue:

2009/05/13 12:38:26.670 Opening \\server\sage\TheMentalist-MissRed-3852166-0.mpg
2009/05/13 12:38:26.670 No INI file found in current directory. Searching PATH...
2009/05/13 12:38:26.670 No INI file found in PATH...
2009/05/13 12:38:26.670 No INI file found anywhere!!!!
2009/05/13 12:38:26.670 Commercials were found.

Any insight?
  #691  
Old 05-13-2009, 02:03 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
If you search back up this thread a little you'll find a more detailed discussion, but the short answer is that comskip returns 1 on success instead of the expected zero. Set the :RETURNCODE option in your client config and tell it to expect 1 on success instead of the default zero:

http://docs.google.com/Doc?id=dz87gf...94516774727657
__________________
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...
  #692  
Old 05-15-2009, 12:03 PM
Skirge01's Avatar
Skirge01 Skirge01 is offline
SageTVaholic
 
Join Date: Jun 2007
Location: New Jersey
Posts: 2,599
Slugger, I tried searching for stop, cancel, abort, process, comskip and multiple variations of that in this thread and came up empty.

What's the preferred method for stopping the Sage service, cancelling running jobs, and restarting those same jobs? I've been stopping the service, killing the comskip processes and then restarting, but I'm wondering if there's a better way.

Thanks! BTW... SJQ is absolutely awesome!!!
  #693  
Old 05-15-2009, 12:16 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
You've pretty much got it. I should document the process in the user guide, but I didn't because ideally I'd like to add the ability to kill active tasks from the GUI, I just haven't gotten around to it because I don't really need it. I basically just run comskip from SJQ myself and it "just runs", I've never had a need to cancel active tasks.

The only change I'd make to your process is that you don't need to stop SageTV completely to accomplish this. Just stop the SJQ app by moving the sjq.context.xml file out of the SageTV\jetty\contexts\ directory. Once you do that SJQ will shutdown then you can go to your clients and kill the active processes. Once that's done put the context file back in the contexts dir, which will restart the SJQ server. Then you should be good to go. There shouldn't be a need to stop the entire SageTV system to cleanup SJQ.

Also, if you just want to clear the queued tasks, you can just do that by clicking in the active queue. However, as you probably have discovered, there is no way to clear/stop/cancel tasks that have already been assigned to a client and are in the running state.
__________________
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...
  #694  
Old 05-15-2009, 02:40 PM
Peter_h Peter_h is offline
Sage Fanatic
 
Join Date: May 2008
Location: Kailua, HI
Posts: 798
Quote:
Originally Posted by Wheemer View Post
Is there any way to have the password come up in a normal box like Neilm's webserver? I've really like to have firefox remember it, but currently it's not possible.

This plugin works awesome btw, I've never had such consistant captions and comskip.

I know you said that this is likely not to happen but I would welcome this feature as well.

My reasoning is that I use WHS and will have the webserver SJQ, and SRE redirected and handled by IIS. Not having a normal login box means that I can not pass the login credentials all the way through to SJQ.

I'll open a ticket for it.

Last edited by Peter_h; 05-15-2009 at 02:51 PM.
  #695  
Old 05-15-2009, 02:46 PM
Peter_h Peter_h is offline
Sage Fanatic
 
Join Date: May 2008
Location: Kailua, HI
Posts: 798
I have a question.

Is there any way you could monitor the log files with either SJQ, SRE, or Sagetweet?

The reason for this is to get alerts when there is a recording error, tuner error or any other type of error in sage. Here is an entire thread regarding the matter.

We Really Need Some Warning Messages For Recording Problems!

My guess is sagetweet might be better as ideally an email or text message should be sent. I think you are probably the person to ask because it seems like most of the peices are there between your plugins.

Thanks again for all your work slugger. I use SRE & SJQ and don't know how I could live without them. They are how plugins should be. I don't ever need to touch them once they are setup, they just work.

Last edited by Peter_h; 05-15-2009 at 02:51 PM.
  #696  
Old 05-15-2009, 03:03 PM
Peter_h Peter_h is offline
Sage Fanatic
 
Join Date: May 2008
Location: Kailua, HI
Posts: 798
Quote:
Originally Posted by Slugger View Post
You've pretty much got it. I should document the process in the user guide, but I didn't because ideally I'd like to add the ability to kill active tasks from the GUI, I just haven't gotten around to it because I don't really need it. I basically just run comskip from SJQ myself and it "just runs", I've never had a need to cancel active tasks.

The only change I'd make to your process is that you don't need to stop SageTV completely to accomplish this. Just stop the SJQ app by moving the sjq.context.xml file out of the SageTV\jetty\contexts\ directory. Once you do that SJQ will shutdown then you can go to your clients and kill the active processes. Once that's done put the context file back in the contexts dir, which will restart the SJQ server. Then you should be good to go. There shouldn't be a need to stop the entire SageTV system to cleanup SJQ.

Also, if you just want to clear the queued tasks, you can just do that by clicking in the active queue. However, as you probably have discovered, there is no way to clear/stop/cancel tasks that have already been assigned to a client and are in the running state.
I would also like to see a way to stop a running task easily. I beleive I have found a way to cause a job to get stuck in the assigned queue and not easily be removed or stopped. I have opened an issue ticket.
  #697  
Old 05-16-2009, 06:10 AM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Quote:
Originally Posted by Peter_h View Post
I have a question.

Is there any way you could monitor the log files with either SJQ, SRE, or Sagetweet?

The reason for this is to get alerts when there is a recording error, tuner error or any other type of error in sage. Here is an entire thread regarding the matter.

We Really Need Some Warning Messages For Recording Problems!

My guess is sagetweet might be better as ideally an email or text message should be sent. I think you are probably the person to ask because it seems like most of the peices are there between your plugins.

Thanks again for all your work slugger. I use SRE & SJQ and don't know how I could live without them. They are how plugins should be. I don't ever need to touch them once they are setup, they just work.
This seems like a perfect addition for SageTweet. Actually, it's exactly what I'd like SageTweet to do: notify users of major errors with their SageTV system. The problem is parsing the debug log. Is there a documented way to parse error messages from the debug logs? As far as I can tell, not that I've examined this too closely, there is no standard pattern in the log files that you can easily scan for and pull out error messages from. Or is there? If there is then I'd love to add this to SageTweet. I think it's a perfect addition to the plugin.

If you want to discuss this SageTweet option further, then please start a new thread (and perhaps PM me the link so I can subscribe to it). This thread is already long enough with just SJQ content - I'd rather not make it even more confusing for people.
__________________
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...
  #698  
Old 05-16-2009, 07:16 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
While there isn't any standard way to look for errors in the log files (mainly because they are not meant for this, but rather to help developers track down problems), you could easily implement a flexible system where you setup regular expressions that match error Strings in the log files.

ie, initially, you'd have to define a couple of cases, but users could supply more cases as time goes on. If each error case were in it's own file, then it would make it easy to share test cases, etc.

ie, something like
Code:
<testcase>
   <tests>
      <logentry>ERROR.*Recording\s+Failed\s+(.*)</logentry>
   <tests>
   <message>Sage Failed to record show.  Mesage: {0}</message>
   <action>email</action>
   <action>sagetweet</action>
</testcase>
Ideally something like this is built outside of sagetweet, sjq, etc, with integrations to those tools using <action> implementations. That way, new <action>s can be registered to do other things as needed.

Anyways, just sharing an idea for whoever wants to run with it
  #699  
Old 05-18-2009, 12:17 PM
theringnebula's Avatar
theringnebula theringnebula is offline
Sage User
 
Join Date: Jul 2008
Location: Kingston, NH
Posts: 49
Question Reschedule for HD

Does anyone have any sample code for using SJQ to reschedule existing previously recorded non-HD shows when an HD version is available at a later date?
  #700  
Old 05-18-2009, 01:41 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Quote:
Originally Posted by theringnebula View Post
Does anyone have any sample code for using SJQ to reschedule existing previously recorded non-HD shows when an HD version is available at a later date?
Untested:

Code:
if [IsTV == true && IsHD == false && ShowID !^ "SH"] {
  :RESCHEDOPTS "HDONLY"
  _RESCHED
}
The only "gotcha" to this is that you are relying on the accuracy of the HD flag in your EPG data. As written, this rule will delete the SD recording as soon as it's able to find an HD reairing and can schedule it. Should the HD airing be changed before the recording starts then you'll have lost the SD airing. To avoid that, providing you have the space available, you can add the NODELETE option to the :RESCHEDOPTS, then you'll have to manually delete the SD one once you verify the HD recording is good.

I also check the external show id just to avoid messing with generic airings, this test would be optional.
__________________
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...
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 02:18 PM.


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