|
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 |
#781
|
|||
|
|||
Got everything up and running. Having trouble excluding certain channels that have no commercials, i.e. starz, etc.
Does anyone have an example script that would help me out. Thanks in advance. |
#782
|
|||
|
|||
What script are you using?
__________________
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... |
#783
|
|||
|
|||
Currently using the one on your site for comskip with no mods. I changed one of the true false values so it ignores the file type passed.
Thanks for the response. |
#784
|
|||
|
|||
This one?
If so, add this block right above the last line (return 0): Code:
if(AiringAPI.GetAiringChannelName(mf) ==~ /HBO.*|STARZ.*|SHO.*|PPV.*|PBS.*|HDNET.*/) return 2 If, however, you're queuing up tasks different (say, just attaching to the RecordingStarted event for all recordings) then, yes, you probably want to add this kind of check.
__________________
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... |
#785
|
|||
|
|||
Thanks Ill try it out.
Do I need to close the if statement and open it with {} like below. Just want to confirm in case someone else uses the if statement below. if(AiringAPI.GetAiringChannelName(mf) ==~ /HBO.*|STARZ.*|SHO.*|PPV.*|PBS.*|HDNET.*/) { return 2 } return 0 Last edited by grbsaaber; 05-02-2011 at 10:46 AM. |
#786
|
|||
|
|||
Your edit, as presented, is syntactically invalid. If you're going to close it with a } then you need to include the opener...
Code:
if(...) { return 2 } return 0 Code:
if(...) return 2 return 0 EDIT: You went and fixed your typo. So now your edit is syntactically correct and equivalent to mine.
__________________
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... |
#787
|
|||
|
|||
Thanks, I added the other bracket but you must have been replying already.
Thank you very much! SJQ4 seems to be much smoother than SJQ3 and less resources intensive. |
#788
|
|||
|
|||
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... |
#789
|
|||
|
|||
jetty was already up to date. I updated and my client won't come back online.
Any suggestions on what I can look for. Says internal error. I tried deleting and readding the client but that didn't work. It says Connection refused: connect, it has ben marked as OFFline Quote:
Last edited by grbsaaber; 05-02-2011 at 08:59 PM. Reason: added logs |
#790
|
|||
|
|||
Looks like you're missing the sjq-agent.jar file. Check your SageTV\JARs\ folder. Is there an sjq-agent.jar file? If so, is there more than one? If so, what's in there? If you don't have one, go to the plugin manager, does it say the sjq-agent plugin is installed? If it says it is, but the jar is not in JARs then your plugin manager is corrupt. Uninstall the plugin and reinstall it. If it's in there then make sure there is not more than one. If there's only one report the bug to Sage, with your current logs. Restarting your system should then fix the problem (probably a bug with Sage's custom classloader).
__________________
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... |
#791
|
|||
|
|||
There is only one sjq-agent.jar. I reinstalled and rebooted sage but still have same issue.
should I reboot the server ? Rebooting the server and will see what happens. Rebooting the server cleared it all out. Now to submit a bug to sage. Last edited by grbsaaber; 05-02-2011 at 09:31 PM. |
#792
|
||||
|
||||
@Slugger: I'm finally getting to testing multi-segment recordings and don't understand why this is coming back this way. Any suggestions appreciated!
Code:
else if(numSegments > 1) { for(def i2 = 0; i < numSegments; ++i2) { def prefix = FilenameUtils.getBaseName(MediaFileAPI.GetFileForSegment(mf, i2).getAbsolutePath()) def segPrefix = "$newPrefix-$i2" println "Renaming files that look like '${prefix}.*' to '${segPrefix}.*'..." renameMatches(MediaFileAPI.GetParentDirectory(mf), prefix, null, segPrefix) } Code:
New file is: House - S07E20.ts fullfilename is: House - S07E20.ts Renaming files that look like 'House-Changes-4674021-0.*' to 'House - S07E20-0.*'... Renaming files that look like 'House-Changes-4674021-1.*' to 'House - S07E20-1.*'... Exception thrown java.lang.NullPointerException: Cannot invoke method getAbsolutePath() on null object at rename_comskip.run(rename_comskip.groovy:81) |
#793
|
|||
|
|||
It seems numSegments == 3, but when trying to grab the third segment it's returning null when it shouldn't. Are there actually 3 segments to that 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... |
#794
|
||||
|
||||
Maybe I'm missing something Groovy specific, but why are you checking "i < numSegments" in the for statement instead of "i2"?
__________________
Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders. |
#795
|
||||
|
||||
Quote:
Code:
else if(numSegments > 1) { println numSegments for(def i2 = 0; i < numSegments; ++i2) { def prefix = FilenameUtils.getBaseName(MediaFileAPI.GetFileForSegment(mf, i2).getAbsolutePath()) def segPrefix = "$newPrefix-$i2" println "Renaming files that look like '${prefix}.*' to '${segPrefix}.*'..." renameMatches(MediaFileAPI.GetParentDirectory(mf), prefix, null, segPrefix) } } Code:
New file is: House - S07E20.ts fullfilename is: House - S07E20.ts 2 Renaming files that look like 'House-Changes-4674021-0.*' to 'House - S07E20-0.*'... Renaming files that look like 'House-Changes-4674021-1.*' to 'House - S07E20-1.*'... Exception thrown java.lang.NullPointerException: Cannot invoke method getAbsolutePath() on null object at rename_comskip.run(rename_comskip.groovy:82) |
#796
|
|||
|
|||
Quote:
Quote:
for(i2 = 0; i2 < numSegments; ++i2) So the for loop never exits and eventually you attempt to seek outside the array's bounds, ending in a null pointer exception as you've encountered. Change that i to an i2 as shown above and you should be good to go.
__________________
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... |
#797
|
||||
|
||||
Thanks guys!
I guess that's what I get for plagiarizing Sluggers code without understanding it!(or being able to type) So then I have a follow-up question about multi-segment recordings and how to relink them to the external ID? I've got this code working with single-segment shows, but how would I link multiple files to the show correctly? fullfilename is what I expect I would link to the segment(s) full path+filename+segment#+extension, but I don't see anything in the API docs referencing multi-segment recordings and how to do this.... Code:
def mf = MediaFileAPI.GetMediaFileForID(SJQ4_METADATA["SJQ4_ID"].toInteger()) def newDir = MediaFileAPI.GetParentDirectory(mf) def src = newDir.toString() + "\\$fullfilename" def sid = ShowAPI.GetShowExternalID(mf) def show = ShowAPI.GetShowForExternalID(sid) def mfadd = MediaFileAPI.AddMediaFile(new File(src), null) if(!MediaFileAPI.SetMediaFileShow(mfadd, show)) { println "Failed to link show metadata to media file!" return 1 } |
#798
|
|||
|
|||
I never actually tested it, but way back when in the early 7.0 betas, I believe, Jeff told us that all you should have to do is link segment 0 to the show and the core will figure out that there are multiple segments. Is that going to work after renaming the files? Not sure. If it doesn't, you may have to open a bug with Sage to have them address that scenario in the core.
But I think you should be ok as long as you have xxx-0.zzz, xxx-1.zzz, etc. as long as xxx and zzz remain constant in each file name. But, as I say, that's all speculation because I never actually tested this feature when Jeff announced it way back when. EDIT: So, 'mfadd' should know it has multiple segments when you create it. MediaFileAPI.AddMediaFile() should handle multiple segments when you pass it x-0.y as the file name and there are other files (in the same dir) named x-1.y, x-2.y, etc. That's my understanding from Jeff's explanation when I first read it (a long time ago, now).
__________________
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; 05-03-2011 at 02:15 PM. |
#799
|
||||
|
||||
Quote:
Let the whole script run; rename a couple files, relink the base file and redefine mf based on the new base file name (xxx-0.zzz) and did a .GetNumberOfSegments on that... returned correctly. I'm not sure I wanted it to work as now I 'have to' add multi-segment logic to all the processes... which is more than I wanted to take on.... Can't wait to see how handbrake responds to this little fir-ball! Thanks! |
#800
|
||||
|
||||
I'm not doing well searching this thread today. Does somebody have a script for restarting Sage when there's nothing happening? I need this to deal with my Colossi.
|
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 |