|
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. |
|
Thread Tools | Search this Thread | Display Modes |
#921
|
|||
|
|||
Quote:
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... |
#922
|
|||
|
|||
Thanks Slugger.
I'll test out the multiple segments for a mediafile solution and post back with results. |
#923
|
||||
|
||||
Quote:
Always meant to do that but haven't gotten around to it... but then I'm not having ANY multi-segment files these days, if you get it sorted would love to include it myself! |
#924
|
||||
|
||||
I'm still struggling to understand the hows and whys of the scripting in regards to moving files.
If I were to take the base mv_media_file.groovy file and I wanted to move the specified file to a distinct sub-directory based on the Series Title, can I add this to the script, which would a) Grab the Series Title from the "Airing" metadata map, and b) tack on that Series Title as a sub-directory to the default 'dest' directory? Code:
Object title = AiringAPI.GetAiringForID(SJQ4_METADATA.get("SJQ4_TITLE").toString()) File dest = new File(SJQ4_ARGS[0]) + "\" + title; In addition, is there a way to parse the Season from the filename and then make a specific subfolder for the Series>Season heirarchy? I truly tried to get the gist of it all, but the scripting is killing me... -Jason
__________________
True standalone tuner functionality with the --> HAVA Channel Changer<-- |
#925
|
||||
|
||||
Jason - here is some code you might want to look thru for ideas
you pass this the parent path that you desire as an argument ie. \\path\to\parent\directory Code:
import com.google.code.sagetvaddons.groovy.api.MediaFileHelpers ; import org.apache.commons.io.FileUtils ; String ParentPath = SJQ4_ARGS[0] String id = SJQ4_METADATA.get("SJQ4_ID"); Object mf = MediaFileAPI.GetMediaFileForID(id.toInteger()); String FileName = SJQ4_METADATA.get("SJQ4_LAST_SEGMENT"); String FilePath = SJQ4_METADATA.get("SJQ4_PATH"); String ShowTitle=ShowAPI.GetShowTitle(mf); String ShowSeasonDir ; String OutputPath ; int ShowSeasonNum=ShowAPI.GetShowSeasonNumber(mf); println ( "Test Started"); if ( AiringAPI.IsNotManualOrFavorite(mf) ) { println("${FileName} is not a Favorite or Manual Recording - skipped") return 2 } if( MediaFileHelpers.isBeingViewed(FileName) ) { println("${FileName} is being viewed; Return task to queue!") return 1 } if( MediaFileAPI.IsFileCurrentlyRecording(mf)) { println "${FileName} recording in progress, waiting..." return 1 } if ( ShowSeasonNum == 0 ) { ShowSeasonDir = "" ; } else { ShowSeasonDir = "\\Season " + ShowSeasonNum ; } if ( ShowAPI.GetShowCategory(mf).equals ("Movie") ) { println("This is a Movie "); OutputPath = ParentPath + "\\Movies" ; } else { println("This is a TV show") ; OutputPath = ParentPath + "\\" + ShowTitle + ShowSeasonDir ; } OutputPath = (OutputPath =~ /[?!*^&#$%@:;]/).replaceAll(" ") ; println ("Modified OutputPath = ${OutputPath} "); OutputFile = OutputPath + FileName; File dest = new File(OutputPath); FileUtils.forceMkdir(dest); Tools.setExeArgs("\"${OutputPath}\"") println ("Would Start EXE with argument ${OutputPath}"); println ( "Test Ended"); return 0 |
#926
|
||||
|
||||
Quote:
I am coded/scripted/groovied/API'd out... With all this power comes waaaaaay too much complexity in the scripting... at least in my current state. I just want to move the recorded TV files to a different directory structure based on their Series and Season to use with XBMC. I still want to keep the files within Sage's control, so I need to relink them. I cannot understand the variety of methods that folks have suggested and right now, I couldn't figure my way out of a wet paper bag if there were multiple holes in it! Unless someone can basically give me the code/hand hold me to accomplish the above, until I can get my head around the scripting, I'm done. -Jason
__________________
True standalone tuner functionality with the --> HAVA Channel Changer<-- |
#927
|
|||
|
|||
A timely Groovy example: Premiere Alerts
Here's a little script I whipped up this morning that sends me an email each morning listing any new premieres for the current day. As the fall season kicks off, these emails will alert me to all new shows. Adjust the email settings as required - the settings shown are valid for Gmail (except I've masked the id/pwd for my account, of course). I've configured this script to run daily at 8am via the SJQv4 crontab so I get an email each morning with that day's premieres.
Currently, it includes movies, which I might filter out. Another nice enhancement might be to filter out shows that are already favourites (since I'm recording it anyways). I'm sure others could come up with a few other ideas to enhance this as well. Anyway, here's the script as it stands right now: http://sagetv-addons.googlecode.com/..._alerts.groovy
__________________
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... |
#928
|
||||
|
||||
Quote:
Got the test script, exe script, and screenshot of the task config Last edited by graywolf; 09-19-2011 at 06:32 AM. |
#929
|
|||
|
|||
Quote:
|
#930
|
|||
|
|||
Looks like you're missing the closing quote at the end of the smtp address.
__________________
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... |
#931
|
||||
|
||||
Quote:
I had to comment out a few portions to match my requisites, but so far, I tested it on an existing recording and... success! Considering that I have it set for 'recording started', it should now move and re-link the file for all future recordings. Is there a way to trigger a script on everything, since the cron does not gather any input? I reviewed the posts in the thread, but I did not find that specific answer... Again... your help was so much appreciated, I cannot begin to thank you enough! -Jason
__________________
True standalone tuner functionality with the --> HAVA Channel Changer<-- |
#932
|
|||
|
|||
Quote:
I both scenarios, only the first segment is tied to the recording when it is presented in the sage GUI. Does anyone have any other thoughts on how to do this. If not I'll try bikesquid's throught of using VideoRedo to combine the segments (although I am having trouble finding how to do this with the command line in video redo). |
#933
|
||||
|
||||
Is there a means of getting the Channel Name and/or Number for the Priemeres script?
|
#934
|
|||
|
|||
Quote:
Did you do a media scan after adding the first segment? I think a media scan would be required for the core to find the rest of the segments and attach them. You definitely must have all segments present before doing the media scan and the segment file names must exactly match except for the ending -0 -1, -2, etc. before the file extension.
__________________
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... |
#935
|
|||
|
|||
Grab the latest from svn... I just committed the enhancement.
__________________
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... |
#936
|
||||
|
||||
Wonderful. I also figured out how to limit to just PrimeTime. Should up the WAF some.
Code:
start >= midnight + 71900000 && start < midnight + 82800000 |
#937
|
|||
|
|||
Quote:
|
#938
|
||||
|
||||
Curious. Noticed that Castle (ABC) did not show up in the e-mail.
|
#939
|
|||
|
|||
Is it marked as "Season Premiere" or "Series Premiere" in the EPG?
__________________
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... |
#940
|
|||
|
|||
Quote:
Castle: Rise (EP010855880061) Detective Beckett struggles to survive; Castle tries to identify the shooter; Ryan and Esposito try to adjust to the new captain. Nice idea, BTW! I have Top Chef as a favorite and remember one season they named it "Top Chef New York" or something and the favorite didn't pick that up. I'm betting this would give me warning about things like that. And my son's loving SRE now being a big Tiger's fan. I didn't upgrade it right away recently and he missed the end of one game. All's good now, though .
__________________
Home Network: https://karylstein.com/technology.html |
Currently Active Users Viewing This Thread: 4 (0 members and 4 guests) | |
|
|
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 |