|
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 |
#561
|
|||
|
|||
in the UI plugin how exactly do you start a script file in linux
I've tried in the executable spot sh /path/to/file/bash.sh also /path/to/file/bash.sh and "sh /path/to/file/bash.sh" and "/path/to/file/bash.sh" also for the arguments I'm using just $SJQ4_LAST_SEGMENT do I put it in quotation marks? Basically I'm triggering the event after a show is complete. If I was looking at terminal it would simply be sh /path/to/file/bash.sh filename.mpg but I can't seem to get it right Last edited by Korny; 03-13-2011 at 10:43 PM. |
#562
|
|||
|
|||
Quote:
1) Just put /path/to/file/bash.sh and make sure the executable bit it set on the file. 2) Just put sh as the executable and for the arguments put "/path/to/file/bash.sh" "$SJQ4_LAST_SEGMENT" Quote:
Quote:
"/path/to/file/bash.sh" "$SJQ4_LAST_SEGMENT"
__________________
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... |
#563
|
|||
|
|||
I've been playing with the groovy scripts and been able to add some customizations that work for my needs, but I was wondering if there's a way to block adding an item to the queue if the task is already in the queue.
I setup a periodic scanner, but if the period is shorter than the speed at which the file can be processed, the item will queue up numerous times, potentially bogging down the system. Is it possible to access the queued tasks from within a groovy script? |
#564
|
|||
|
|||
Quote:
So let's say your scanner finds a media file to queue, after adding it to the queue successfully, tag it with a special metadata value: Code:
Object mf; // This is the media file object, obtained somehow, some way // Do your checks, etc. and now you want to queue this media file... String tag = MediaFileAPI.GetMediaFileMetadata(mf, "MY_TAG") if(tag == null || tag != "1") { // We haven't queued this item before sc.addTask("MYTASK", Factory.get(mf)) MediaFileAPI.SetMediaFileMetadata(mf, "MY_TAG", "1") } If your scanner is based on my media_file_scanner.groovy script then I'd just add the metadata check inside the needsProcessing() function as one of the conditions to check. If you make it the last check then if it passes (and you're about to return true) then go ahead and tag the object with the metadata value. If it's not the last check, then you'll need to tag the object further down in the code where the object is added to the queue. Hopefully this 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... |
#565
|
||||
|
||||
Quote:
I downloaded these scripts and it's working very well. I modified the test script slightly to ignore connected clients because mine are always connected. (I might fiddle with it some more to not run if anybody is actually watching something.) The only question I have (that I should probably know the answer to) is how long will it try to run the task before giving up? I have the task set to go off daily at 4:00 AM and I want to make sure if either executes or is removed from the queue by 6:00 AM. Tom
__________________
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. |
#566
|
|||
|
|||
By default tasks will run for up to 24 hours. You can configure that on the task client config by setting the maxtime for the task to 7200 seconds (two hours).
__________________
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... |
#567
|
||||
|
||||
Quote:
One small comment, the exe will not run unless there is a 60 minute window because the test script checks for a 30 minute window but it usually gets run a few seconds past the hour or 1/2 hour mark. (So there are a few seconds less than 30 minutes to the next recording.) I changed the script to wait for a 15 minute window.
__________________
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. |
#568
|
|||
|
|||
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... |
#569
|
||||
|
||||
Quote:
I really like this script, it makes backup a snap.
__________________
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. |
#570
|
|||
|
|||
Quote:
EDIT: Nevermind, just read the FAQ, 7.0 only |
#571
|
|||
|
|||
Sorry.
__________________
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... |
#572
|
||||
|
||||
Got a question about renaming files. Looking through the script library (great resource btw!) I see the move file script, which is close to what I'd like to do, I think....
I'm archiving files using Series/Season/Series - SxxExx format and have been using a batch file to do this with the .properties info, but I'm finding it not reliable and would rather pull the season/episode info and do this via sjq if possible. Being none to bright to start with and an idiot with any coding I wonder if anyone can help me put together the move script with a line or two (hopefully) to pull season episode info and rename the file accordingly? Any help much appreciated! |
#573
|
|||
|
|||
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... |
#574
|
||||
|
||||
Quote:
Here's what I do now: Test for existing season/episode info, if it exists rename to format: Series - SxxExx (ex: Dexter - S05E02) If season/episode info doesn't exist, rename to format: Series - Episode (ex: Chuck - Chuck vs the Suitcase) I've been doing this by stripping the last 10 characters from the file name. It doesn't work too well with shows like Top Gear that often have no any episode title/info... so the work around I've been doing is naming the file sequentially so I'm not overwriting by simply doing a test on the name existing in archive location, if exist +1 and retest till it fails, that's my new name.... crude but it works. I'm sure there's a better way, but it's all I could think of... to be honest it doesn't always work and I never know why, which is why I'd rather go with a sjq script.... Then I move it to \\Sage-PC\TV\Series\Season\ folder structure. (ex: \\Sage-PC\TV\Dexter\Season 5\Dexter - S05E02.ts ) |
#575
|
|||
|
|||
Quote:
The scope of this exercise just got a whole lot bigger. It's not a 30 minute job anymore, but seems like a solid few hours (minimum) to do this and test it properly, which is fine, but can't guarantee it'll even be this week now, but with a ticket I'll definitely eventually do it. Something to address in the ticket: If there's no season/episode data available then how do you know which season folder to move the file to or does it just go under \TV\Series\?
__________________
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... |
#576
|
||||
|
||||
Quote:
The archive I admit has "a little" more complexity than a simple move but I don't know that it has to be.... What I described is my current process, if I get the file name as right as it can be given the available info that would be hugely helpful and maybe is a legitimately separate script from an archiving process. The source info used seems the same which is why, to my pea-brain, they're done at the same time. Doing a manual move to the right place isn't a big deal these days, with eye-boggling transfer speeds it only takes a few seconds per show to transfer to the archive drive. If a simpler request would be to move to new location if all the needed info is there, and if not dump it in a manual archival holding directory, that would work well for me too. Didn't intend to make work, if there's anything I can do/test to save some of your time on this let me know! Thanks. |
#577
|
|||
|
|||
I'm getting an error like this when comskip runs:
Permission denied - could not open file \\HTPC\E\shows1/UndercoverBoss-MGMGrand-8515047-0.mpg The file is there, and I can open it via windows explorer. Its got full security permissions for any user to open it. Any ideas? |
#578
|
||||
|
||||
Quote:
|
#579
|
|||
|
|||
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... |
#580
|
|||
|
|||
Thanks I will try changing the slash.
On an unrelated note, does anyone have a script or tutorial on how to setup SQJ4 to clean out old .edl and .txt files? |
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 |