|
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 |
#981
|
|||
|
|||
Just an update I posted in another thread that could be useful.
So I'm figuring this out slowly but surely and yes sage will not do the automatic replacement if the file ends with .m4v but this seems to only be the case if the m4v is stored in the recording directory location. If you put it in the import location it will assign it mostly all the metadata as what was posted before you will lose some things as which tuner was used,etc. But nothing too important. If use use a .mp4 file you CAN store it in the recording directory and you won't lose any of the metadata. I wonder why sage won't let you use m4v in the recording directory.... Quote:
|
#982
|
|||
|
|||
Quote:
Code:
def thread = Thread.currentThread() def pri = thread.getPriority() thread.setPriority(Thread.MIN_PRIORITY) // You may not want to set it this low? def stdout = new StringBuilder() def stderr = new StringBuilder() def cmd "MyCmd.exe" def p = cmd.execute() thread.setPriority(pri) // Reset the priority to where it was p.comsumeProcessOutput(stdout, stderr) if(p.waitFor() == 0) println 'Command succeeded!' else println 'Command failed!'
__________________
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... |
#983
|
|||
|
|||
Quote:
Code:
def cmdLine = ["C:/Windows/system32/cmd.exe", "/C start \"handbrake\" /b /belownormal /wait \"C:/Program Files (x86)/Handbrake/HandBrakeCLI.exe\" -i \"" + filename + "\" -t 1 -c 1 -o \"" + fileprefix + ".mkv" + "\" -f mkv " + vid + " --detelecine -e x264 -q 20 -a " + audCount + " -E " + aud + " -6 auto -R Auto -D 0.0 -x b-adapt=2:me=umh:subq=9:analyse=all:trellis=0 -v 2 2>> \"" + fileprefix + ".handbrakelog" + "\" > \"" + fileprefix + ".handbrakeprogresslog\""]; Hope this helps.
__________________
Andrew |
#984
|
||||
|
||||
Interesting you mention this, as I was about to go this route because Slugger's (very helpful!!) post of setting the priority via groovy isn't working. It's stuck on Normal, maybe because of the wrapper.
__________________
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 Last edited by phelme; 10-18-2011 at 11:28 AM. |
#985
|
||||
|
||||
Anyone (more talented/knowledgeable than I) want to take a crack at a request? I'd muddle thru it but currently so swamped at work, it isn't funny.
Been taking heat from WAF regarding missed recordings due to EPG No Data issues. Anyone want to write a script that will check Favorites (maybe just those with specified days and or times) and check if the Guide says No Data (probably for 12-13 days out?). If that is the case, send a System Message (warning/critical maybe?) or e-mail? Anyone have time and brave enough to tackle this? Otherwise, if Sage keeps having these EPG issues, I might need to switch to Sluggers EPG plugin earlier than expected. |
#986
|
|||
|
|||
Quote:
Code:
def CHECK_FAVS = true def CHECK_CHANS = true def POST_SYS_MSG = false // If false, just dump the output to stdout def now = System.currentTimeMillis() def output = new StringBuilder() if(CHECK_FAVS) FavoriteAPI.GetFavorites().each { if(Database.FilterByRange(FavoriteAPI.GetFavoriteAirings(it), 'GetAiringStartTime', now, Long.MAX_VALUE, true).size() == 0) { if(!output.length()) output.append('The following favourites have no upcoming airings:\n\n') output.append("${FavoriteAPI.GetFavoriteDescription(it)}\n") } } if(CHECK_CHANS) { def preambleWritten = false def chans = new HashSet<String>() Database.SearchSelectedExactFields('No Data', true, true, false, false, false, false, false, false, false, false, 'T').each { def start = AiringAPI.GetAiringStartTime(it) if(start > now && start <= now + 86400000L) { def name = AiringAPI.GetAiringChannelName(it) if(chans.add(name)) { if(!preambleWritten) { output.append('\nThe following channels are missing data:\n') preambleWritten = true } output.append("$name\n") } } } } if(output.length() && !POST_SYS_MSG) println output else if(output.length()) SystemMessageAPI.PostSystemMessage(1204, 2, output.toString(), null) It checks for favs with no future airings, however, at least in my env, I always have a lot of favs with no future airings (i.e. Breaking Bad First Runs won't have any future airings until next year now). So I think this might cause an unnecessary panic depending on who's reading the results. Channel checks... I think this is pretty solid. It alerts you of any channels with "No Data" in them for the next 24 hours. If the EPG is working correctly, this should be zero channels always. Flip the sys msg flag if you want it to post a system message with the results, otherwise is just dumps the output to stdout. To email the results, I'd post a system message and let SageAlert send the email. Alternatively, the script could be modded to send email - that's an exercise for the reader.
__________________
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... |
#987
|
||||
|
||||
Excellent. Thanks as always Slugger.
Couldn't imagine how much less the Sage experience would be without your (and the other devl folks) plugins. You all really add value to it. |
#988
|
||||
|
||||
I'm guessing someone here will now the answer. So I have a groovy script that compresses a show and then moves the media info to the new file. All the meta data appears to be linked and applied with SetMediafileShow(), except the encoder info. There seems to be no "Set" equivalent to GetMediaFileEncoding() and I can't find an encoder property on the meta data for use in SetMediaFileMetadata().
Any ideas?
__________________
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 |
#989
|
|||
|
|||
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... |
#990
|
|||
|
|||
So I purchased the SJQ plugin because I know I will have other uses for it down the road, but I cannot seem to get what I want working. Any help is appreciated...
What I need to do is transcode a file to a new location so that a Boxee Box can watch it. I tried using Wayner's script for transcoding and moving files but it just keeps failing. At first it was my file name (didn't remember to turn on show extensions in Win7). But now it just failes. I PM'd Wayner in hopes of finding his implementation. If anyone has a script to do the following and can give me some guidance: 1. trigger on favorites record end (know how to do this at least from reading the manual and seeing it myself) 2. transcode the favorite to a new location 3. create a new folder structure for the favorite using Show/Season/Episode type structure Wayner's script seems to do all of this but it keeps failing on my system. I added the path to the EXE as script://server/path/script.txt and passed 'mpg' as the EXE arg. The only thing I can see that might be an issue is the comskiplive test. I pasted his script below. BTW, it would be helpful if the information about adding a groovy script as an EXE using 'script:' was more prominently displayed in the help file. I did find it in the scripting help but it did seem like an afterthought. Anyhow, awesome stuff as far as I can tell - being a hack of a programmer myself. // Start Wayner's script... boolean checkRecordingType = true; // Check the recording is of the type specified on the command line (i.e. only process mpg recordings) Object mf = MediaFileAPI.GetMediaFileForID(Integer.parseInt(SJQ4_METADATA.get("SJQ4_ID"))); File path = new File(SJQ4_METADATA.get("SJQ4_PATH")); String fileName = SJQ4_METADATA.get("SJQ4_LAST_SEGMENT"); String EpisodeName2 = SJQ4_METADATA.get("SJQ4_EPISODE"); String NewPath = "\\\\server\\Boxee\\TV Shows\\"; String Format = "MPEG4-Good Quality AVI"; String avitype = "avi"; String avifile String OutputFile; String id = SJQ4_METADATA.get("SJQ4_ID"); String EpisodeName=ShowAPI.GetShowEpisode(mf); String ShowTitle=ShowAPI.GetShowTitle(mf); Object mediaFile = MediaFileAPI.GetMediaFileForID(id.toInteger()); if(SJQ4_ARGS.length > 0) fileType = SJQ4_ARGS[0]; else fileType = null; if(mf == null || path == null || path.getAbsolutePath().length() == 0 || fileName == null || fileName.length() == 0) { println("ERROR: Invalid environment data passed to scritpt!"); return 1; } if(checkRecordingType && fileType != null && fileType.length() > 0 && !fileName.endsWith("." + fileType)) { println("Recording is not of specified type '" + fileType + "', skipping comskip!"); return 2; } if(!comskipLive && MediaFileAPI.IsFileCurrentlyRecording(mf)) { println("Recording in progress, waiting..."); return 1; } if (EpisodeName !=null) avifile = EpisodeName + "." + avitype; else avifile = fileName + "." + avitype; avifile = (avifile =~ /[?*\\\\/:<>|]/).replaceAll("") OutputFile = NewPath + ShowTitle +"\\" + avifile; println("Media file is:"+mediaFile); println("Episode2="+EpisodeName2); println("avifile="+avifile); println("Outputfile="+OutputFile); println("Format="+Format); TranscodeAPI.AddTranscodeJob ( mediaFile , Format, new File(OutputFile) , false ); return 0; |
#991
|
||||
|
||||
That's what I was afraid of. Strange omission. Thanks!
__________________
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 |
#992
|
|||
|
|||
New script: Late Night Talk Summary
Here's a script that sends an email every morning with that night's late night summaries. I tend to only record Letterman, Leno, Fallon, Kimmel, etc. if they have guests of interest. I used to have them all as favs and then would mark episodes as watched before they were recorded if the guests were of no interest. This was fine expect if I forgot to check, etc. then I'd have a bunch of recordings I'd then have to remember to delete.
Instead, now I get a daily email with the summary of guests for that evening. If any interest me, I just click the link in the email to schedule the recording. If not, delete the email and nothing is recorded. The script could be enhanced to only alert if certain names are found as guests, etc. That's an exercise for the reader. http://sagetv-addons.googlecode.com/..._alerts.groovy This script assumes it is running in the SJQv4 environment and will not work without modification otherwise. I run it daily from the SJQv4 crontab. Happy scripting!
__________________
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... |
#993
|
||||
|
||||
just installed this last night and looking forward to the possibilities. two questions though:
1. is it possible to fire a groovy script when sagetranscode completes? right now, i've got an sjq cronjob set to every hour scanning for uncompressed mpg/ts files. but because of the below problem, i'd like to mark failed transcode jobs somehow and ignore them for the next queue up. 2. unrelated to SJQ, where does sagetvtranscode writes its log output? i have several files that consistently fail transcoding and am trying to figure out why. i've turned on debug logging in sagetv but havent been able to restart the service yet to see if that has anything useful. sorry if these were already asked/answered, but searching on events didn't yield any useful posts that i could see.
__________________
Server: Sage 9.0.13.536, Windows10-64bit, AMD Phenom II X4 905e 2.5GHz , 16GB Ram, 2.6TB recording Tuners: OpenDCT 0.5.2 Ceton InfiniTV4 NAS: 16TB, unRaid Plus, Asus H87I-Plus mini-ITX, Intel Core i3-4130, 16GB Ram, Fractal Node 304 case 10 Clients: HD-300, HD-200, SageWin10, Plex, AndroidMiniClient |
#994
|
|||
|
|||
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... |
#995
|
||||
|
||||
Quote:
funny...that's what i was looking for and i can't find it? i have a tv.sage.mod.0.log and a sagetvclient_0.txt but not sagetv_0.txt. weird. it is in my old backup version folders though.
__________________
Server: Sage 9.0.13.536, Windows10-64bit, AMD Phenom II X4 905e 2.5GHz , 16GB Ram, 2.6TB recording Tuners: OpenDCT 0.5.2 Ceton InfiniTV4 NAS: 16TB, unRaid Plus, Asus H87I-Plus mini-ITX, Intel Core i3-4130, 16GB Ram, Fractal Node 304 case 10 Clients: HD-300, HD-200, SageWin10, Plex, AndroidMiniClient |
#996
|
||||
|
||||
i've got to hand it to you Slugger. The SageGroovyIDE is slick. Within a few minutes of getting the license installed, i wrote some groovy scripts and ran them adhoc, and had some old minor nitpicking problems cleaned up. great tool. SJQ's going to keep this sagetv hobby thing going strong. i still have those odd TS files that won't transcode, but that's for a different thread. many thanks.
__________________
Server: Sage 9.0.13.536, Windows10-64bit, AMD Phenom II X4 905e 2.5GHz , 16GB Ram, 2.6TB recording Tuners: OpenDCT 0.5.2 Ceton InfiniTV4 NAS: 16TB, unRaid Plus, Asus H87I-Plus mini-ITX, Intel Core i3-4130, 16GB Ram, Fractal Node 304 case 10 Clients: HD-300, HD-200, SageWin10, Plex, AndroidMiniClient |
#997
|
||||
|
||||
HELP
All of a sudden, past couple days when my Sage Recordings get moved from Server to NAS (using SJQ), the stuff is showing up as Movies instead of Sage TV Recordings.
Nothing has been changed to my knowledge. Any thoughts? What logs should I be looking at? my move script is attached |
#998
|
|||
|
|||
Is something else processing the files after they're moved? Perhaps BMT? If you're just relinking the Sage airing to the video after it has been moved then it shouldn't change the data. If you do a media scan after moving then my guess is something external is also processing the video (listening for the VideoImported event), which is causing the shift in category of the file.
__________________
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... |
#999
|
||||
|
||||
OK...probably BMT then. I'll post over there for assistance.
|
#1000
|
||||
|
||||
BTW - Do you happen to have a groovy script to make an Import into a Sage Recording?
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 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 |