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
  #961  
Old 09-30-2011, 12:51 PM
Taddeusz Taddeusz is offline
SageTVaholic
 
Join Date: Nov 2004
Location: Yukon, OK
Posts: 3,919
Ok, thank you. I got it all working. I worked out how to create a unified task that will launch either SA or SAV1 based on the file extension. And then it also launches each using different profiles depending on the channel and ignores certain channels that I don't want commercials detected on.

All in all it looks like it has worked out pretty well.

BTW, is there a way to remove tasks without manually editing the properties file? And on a related note, why do the properties for each task seem to get randomly distributed within the file rather than all being grouped together?
__________________
Server: i5 8400, ASUS Prime H370M-Plus/CSM, 16GB RAM, 15TB drive array + 500GB cache, 2 HDHR's, SageTV 9, unRAID 6.6.3
Client 1: HD300 (latest FW), HDMI to an Insignia 65" 1080p LCD and optical SPDIF to a Sony Receiver
Client 2: HD200 (latest FW), HDMI to an Insignia NS-LCD42HD-09 1080p LCD
Reply With Quote
  #962  
Old 09-30-2011, 01:47 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Quote:
Originally Posted by JerryB View Post
Is it possible to assign a SJQ4 task to a non-favorite recording at the time the recording is scheduled, ideally similar to the way favorites are handled.

For example, I occasionally end up scheduling the recording of a movie from a non-premium channel for later viewing. I've noticed that some of these recordings, especially the middle of the night ones, are almost 25% commercials. I'd really like to be able to schedule my Comskip task so that it runs as soon as the movie finishes recording. However, since the movie is a one-time event and not a favorite, I don't see any way to schedule the task in advance, when I schedule the recording. I know I could set things up similar to the old SJQ3 method of globally processing every file and then adding some exclusion testing to prevent needless processing of commercial free channels but I really like and prefer the newer system of localized scheduling of tasks to appropriate recordings only.

PS: Thanks for this wonderful tool. I really like it.
When you schedule the manual recording there's an option to "Schedule and attach event" (or something like that). Use that to attach a task to the manual 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...
Reply With Quote
  #963  
Old 09-30-2011, 03:38 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Quote:
Originally Posted by Taddeusz View Post
BTW, is there a way to remove tasks without manually editing the properties file? And on a related note, why do the properties for each task seem to get randomly distributed within the file rather than all being grouped together?
Yeah, I don't like that either, but it's the way the Java Properties.store() method writes the data back to the file. That's why it isn't being written back grouped together.

Tasks can be removed via the UI STVi. Load the client's tasks then choose to remove them.
__________________
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
  #964  
Old 09-30-2011, 06:01 PM
JerryB JerryB is offline
Sage Aficionado
 
Join Date: Aug 2008
Posts: 273
Quote:
Originally Posted by Slugger View Post
When you schedule the manual recording there's an option to "Schedule and attach event" (or something like that). Use that to attach a task to the manual recording.
Thanks, I found it. It's "Record this show and assign to event."

If anyone else is interested, the only think to be aware of is that you have to make this choice when you initially schedule the recording. Once the recording is scheduled, this option is no longer available. Specifically, don't look for it under TV->recording schedule->select desired schedule->select desired movie->select recording options, which is where I was looking for it.
Reply With Quote
  #965  
Old 10-04-2011, 11:35 AM
bikesquid's Avatar
bikesquid bikesquid is offline
Sage Aficionado
 
Join Date: Jan 2010
Location: California's North Coast
Posts: 392
Here's a new problem for me... SJQv4 message - task client .... not responding due to: 'No buffer space available (maximum connections reached?): connect'; it has been marked OFFLINE, please investigate.

I'm running a windows 7-64bit system if that helps.
The client does seem to be back online all by itself, any ideas?

Thanks in advance....
Reply With Quote
  #966  
Old 10-04-2011, 02:59 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Quote:
Originally Posted by bikesquid View Post
Here's a new problem for me... SJQv4 message - task client .... not responding due to: 'No buffer space available (maximum connections reached?): connect'; it has been marked OFFLINE, please investigate.

I'm running a windows 7-64bit system if that helps.
The client does seem to be back online all by itself, any ideas?

Thanks in advance....
The error points to a network problem. Given I've never seen it nor have others reported it, I tend to say it's not an SJQ issue or being caused by SJQ (though I'll never say "never"). Google points to a variety of causes:

* Signs of network card failure
* Buggy software not closing sockets properly
* Network configuration errors (routing misconfiguration)
* Others (see Google)

How often are you seeing that error? You may have to disable and reenable plugins one at a time to isolate the culprit. However, this particular type of error doesn't have to be a Sage plugin - it doesn't even have to be Sage related in any way. Could be a buggy bit torrent client (or even just a really active bit torrent client), etc.
__________________
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
  #967  
Old 10-04-2011, 03:16 PM
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
How often are you seeing that error?
Never seen it before this morning... I did just move and that involved a switch from a DOCIS 3 cable modem to a FIOS/DSL setup.... So it could be something in that has buggered things up. Throws me when an error message starts "SJQ4..." Makes sense what you say but I wonder if, as the server and client are the same box to avoid the issue by routing to 'local box' rather than a client IP?

I realize resolving the issue is the best solution, but sometimes bypassing is the available solution...
cheers,
Reply With Quote
  #968  
Old 10-04-2011, 03:24 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Quote:
Originally Posted by bikesquid View Post
Never seen it before this morning... I did just move and that involved a switch from a DOCIS 3 cable modem to a FIOS/DSL setup.... So it could be something in that has buggered things up. Throws me when an error message starts "SJQ4..." Makes sense what you say but I wonder if, as the server and client are the same box to avoid the issue by routing to 'local box' rather than a client IP?

I realize resolving the issue is the best solution, but sometimes bypassing is the available solution...
cheers,
Possibly, yes, but for some reason in the back of my mind right now is that there's a reason why I didn't have the plugin task client use the loop back interface to begin with. I'd have to go reading through the svn commit logs and look for some comments/notes I may have in the code as to why I'm thinking that. In other words, I wouldn't be holding my breath for such a change.

However, if you continue to see that error and you don't want track it down, you can experiment with a loop back connected task client by disabling the plugin version, installing the standalone Windows service version and then registering it using the loop back interface (i.e. IP 127.0.0.1).
__________________
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
  #969  
Old 10-07-2011, 10:55 AM
awhenry awhenry is offline
Sage User
 
Join Date: Aug 2008
Location: Old Town, ME, US
Posts: 39
Question mapDir testing?

I am in the process of converting my Windows file server to Linux, and so I also need to convert over my SJQ client on that machine. Unfortunately the handy tactic of setting my local recording drives to be referred to by UNC paths will no longer magically allow this remote client to access the files without remapping anything. Therefore, I have begun looking at the Tools.mapDir functionality. However, I am not able to get this function to work in my Eclipse-based test/development environment (from which I can successfully run other Sage-oriented groovy scripts). I searched this thread, but did not find anything pertinent to my situation. Does anyone have any experience using any of the "Tools" methods outside the context of a client? Is there some kind of initialization I need to do?

The specific error I am getting is this (which makes little sense):

Code:
Caught: groovy.lang.MissingMethodException: No signature of method: static com.google.code.sagetvaddons.sjq.agent.Tools.mapDir() is applicable for argument types: (java.lang.String) values: [/192.168.1.2/v/SageTV/Cops-KansasCityMissouriKansasCityKansas-2602701-0.mpg]
Possible solutions: mapDir(java.lang.String), mapDir([Ljava.io.File;), mapDir([Ljava.lang.String;), mapDir(java.io.File), wait(), wait(long)
	at handbrake_task.run(handbrake_task.groovy:31)
This error is generated by this line of code:

Code:
filename = Tools.mapDir(filename);
where "filename" is a String containing the value referred to in the error above. I checked the source, and the agent class does define a method for mapDir(String), in fact it is the primary one. This makes me think I am just setting something up wrong (I have not tried to use any of the "Tools" or "Agent" methods in my groovy scripts before now).

Thanks for any suggestions anyone has.
__________________
Andrew
Reply With Quote
  #970  
Old 10-07-2011, 11:05 AM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Did you import the Tools class at the top of your script? Inside the SJQ env you wouldn't need the import, but inside Eclipse it's necessary because the auto injection of the "global" objects, vars, and classes does not occur automatically inside of Eclipse.
__________________
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
  #971  
Old 10-07-2011, 11:33 AM
awhenry awhenry is offline
Sage User
 
Join Date: Aug 2008
Location: Old Town, ME, US
Posts: 39
I hadn't explicitly, however I added it and it still gives the same error. For reference, here are my imports now:
Code:
import org.apache.commons.io.FileUtils;
import com.google.code.sagetvaddons.sjq.network.*;
import com.google.code.sagetvaddons.sjq.agent.*;
import com.google.code.sagetvaddons.sjq.agent.Tools;
import com.google.code.sagetvaddons.metadata.Factory;
import sagex.api.*;
I assumed the import was okay, since the error message appeared to identify the correct path (com.google.code.sagetvaddons.sjq.agent.Tools.mapDir) despite my only calling it by Tools.mapDir.

Could it be a problem with the way I am calling mapDir? I am calling it like a static method (per the examples I found), but it is not declared static in the code as far as I can see. I am not familiar enough with Java to know if that is a problem.

Thanks.
__________________
Andrew
Reply With Quote
  #972  
Old 10-07-2011, 11:42 AM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Ooooh, right... you got it.

mapDir() isn't static. Within the SJQ env, I inject an instance of Tools into your script and call the variable 'Tools', which in retrospect is a poor variable name choice - as we've just witnessed.

So within eclipse, your imports were fine, but you actually need to create an instance of Tools and call mapDir() against that instance.

Here's what sucks...

In Eclipse, you won't be able to call the instance Tools, but within SJQ it expects to be called Tools.

You may be able to get away with it by removing the import of Tools and doing something like this:
Code:
com.google.code.sagetvaddons.sjq.agent.Tools Tools = new com.google.code.sagetvaddons.sjq.agent.Tools()
Now Tools is a var - I don't know if that'll work, but it's worth a shot. I can't really rename the var I inject into the SJQ env because it'll break everyone.

If that doesn't work then you'll have to do something like this:

Code:
Tools t = new Tools()
t.mapDir(foo)
That'll work, but when you are ready to move the script into SJQ, you have to replace that with Tools.mapDir(). Yeah, I know, it sucks. Again, poor var name choices on my part when injecting those vars into the SJQ env.

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...
Reply With Quote
  #973  
Old 10-07-2011, 02:41 PM
awhenry awhenry is offline
Sage User
 
Join Date: Aug 2008
Location: Old Town, ME, US
Posts: 39
Quote:
Originally Posted by Slugger View Post
Hopefully that all makes sense?
Indeed it does. I chose option B and it worked nicely. No big deal to change it back before publishing the script. I will add that I had to remove the import lines for blah.sjq.agent.* before the script would run properly in the client. With that import in place, it was giving me the exact same method signature error I was getting in my test environment before.

Now to try to figure out why the output redirection on my command line is bombing out...

Out of curiosity, do you know what I need to do to get my script output to appear in the task logs? The only thing I am seeing is Java error messages, not my informational "println" entries, some of which I know precede the code that is currently failing. I know those come through if the script completes successfully. Feels like some kind of output buffering issue... Or possibly I should be using something other than println to send that output?

Thanks for the help!
__________________
Andrew
Reply With Quote
  #974  
Old 10-07-2011, 05:36 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
I'd have to dig into the code, but I suspect it's a bug/limitation in my code. I probably don't dump the buffer to the SJQ logs if the script terminated as a result of a runtime exception. This is either a bug on my part or a limitation of the JSR-223 spec. I'll have to investigate. You may want to open a ticket to remind me to investigate.
__________________
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
  #975  
Old 10-12-2011, 03:04 PM
wayner wayner is offline
SageTVaholic
 
Join Date: Jan 2008
Location: Toronto, ON
Posts: 7,491
@Slugger - Is there a way to convert a file to a different format using something other than the builtin SageTV transcoder and retain all metadata, etc. Let's say you want to convert a file from MPG to MP4 using Handbrake so that it can play on an iDevice. How would you do that and retain the metadata in the file so the file would still look the same within Sage?
__________________
New Server - Sage9 on unRAID 2xHD-PVR, HDHR for OTA
Old Server - Sage7 on Win7Pro-i660CPU with 4.6TB, HD-PVR, HDHR OTA, HVR-1850 OTA
Clients - 2xHD-300, 8xHD-200 Extenders, Client+2xPlaceshifter and a WHS which acts as a backup Sage server
Reply With Quote
  #976  
Old 10-12-2011, 05:47 PM
awhenry awhenry is offline
Sage User
 
Join Date: Aug 2008
Location: Old Town, ME, US
Posts: 39
Quote:
Originally Posted by wayner View Post
@Slugger - Is there a way to convert a file to a different format using something other than the builtin SageTV transcoder and retain all metadata, etc.
For what its worth, I do exactly this. I have some tasks that convert some MPG recordings to MKV files using handbrake. Effectively all I do is run handbrake, check to make sure the conversion worked, and if so I rename the original MPG file and run a library rescan. Sage then magically replaces the original file with the (identically named other than extension) MKV. All metadata remains intact in the recording guide and even the commercial markers still work. I do this to save space rather than to export for any kind of portable device, so I can't speak to that aspect.

Hope this helps.
__________________
Andrew
Reply With Quote
  #977  
Old 10-12-2011, 10:45 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Quote:
Originally Posted by wayner View Post
@Slugger - Is there a way to convert a file to a different format using something other than the builtin SageTV transcoder and retain all metadata, etc. Let's say you want to convert a file from MPG to MP4 using Handbrake so that it can play on an iDevice. How would you do that and retain the metadata in the file so the file would still look the same within Sage?
Quote:
Originally Posted by awhenry View Post
For what its worth, I do exactly this. I have some tasks that convert some MPG recordings to MKV files using handbrake. Effectively all I do is run handbrake, check to make sure the conversion worked, and if so I rename the original MPG file and run a library rescan. Sage then magically replaces the original file with the (identically named other than extension) MKV. All metadata remains intact in the recording guide and even the commercial markers still work. I do this to save space rather than to export for any kind of portable device, so I can't speak to that aspect.

Hope this helps.
That pretty much sums it up... just be sure to run the media scan after you've converted the file and deleted the original.

You could also delete the original, add the new one via an API call and relink it to the Show or Airing object in wiz.bin, which eliminates the need for a media scan - all those API calls are in the Sage API javadocs.
__________________
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
  #978  
Old 10-16-2011, 09:29 AM
tchapin tchapin is offline
Sage Aficionado
 
Join Date: Aug 2007
Posts: 279
Hello. I'd like to use SJQ to convert videos in my media library to mp4 during the off hours. They're in a variety of formats and I'd like to standardize for a variety of reasons. I see that there's been some discussion about using SJQ to convert TV recordings, but I haven't seen anything about media library artifacts. I'm also having trouble figuring out the right place to look for documentation of how to create tasks.

Alternately, I vaguely recall previously seeing just a simple windows batch script that would go through a directly tree and convert non mp4 files using handbrake. But, I can't seem to re-find it and am not sure of my other options. Since I have SJQ installed, although I don't think it's running any tasks currently, I thought that I might investigate it.

I'd appreciate any pointers.

Thanks.

Todd
Reply With Quote
  #979  
Old 10-16-2011, 01:06 PM
Gustovier Gustovier is offline
Sage Aficionado
 
Join Date: Nov 2010
Location: Chicago
Posts: 460
I'm experiencing an issue when you set the NEW converted file using an extension of .m4v . This built in sage process of handling the renames seems to work fine for .mp4 (and I assume mkv) but it doesn't want to recoginize an m4v as a valid replacement. Sage will ignore the file and just think the original recording is gone. Anybody else seen this? My guess is a lot people might be just using mp4, but the issue with that is iDevices will not play multi track audio mp4 only m4v.

Quote:
Originally Posted by Slugger View Post
That pretty much sums it up... just be sure to run the media scan after you've converted the file and deleted the original.

You could also delete the original, add the new one via an API call and relink it to the Show or Airing object in wiz.bin, which eliminates the need for a media scan - all those API calls are in the Sage API javadocs.
Reply With Quote
  #980  
Old 10-17-2011, 03:37 PM
phelme's Avatar
phelme phelme is offline
Sage Icon
 
Join Date: Dec 2006
Posts: 1,151
This may be a dumb question, but I'd like to set the process that I launch from SJQ4 to have a "Below Normal" or "Idle" priority (under Windows). I'm using groovy and I'm not sure the best way to go about that. Can anyone help me out?
__________________
Server: AMD 9600 Phenom on XP, Gigabyte GA-MA78GPM, 2GB RAM, 320+250+500 GB SATA drives, HDHomeRun Prime, HD-PVR x.5.1, Paterson serial
Client/Encoder:AMD 3800+ X2, 512 MB RAM, ATI X1650 XT, nMediaPC case, Hauppauge HD-PVR, Cyberlink/ArcSoft decoders, USB-UIRT
Client/Encoder: AMD 3800+ X2, 512 MB RAM, 6150 graphics, nMediaPC case, ArcSoft decoders
Client: HD300, Asus Pundit P1-AH1, AMD 3800+ X2 CPU, 1 GB RAM, 6150 graphics, ArcSoft decoders
Backup: Synology
SageTV version: FINAL
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
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 07:11 PM.


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