|
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 |
#401
|
|||
|
|||
Quote:
|
#402
|
|||
|
|||
Still cannot make it work
It does not convert to network path. Attached log, config and script. Thank you.
__________________
Vostro 200, Intel Core 2 Duo 2.53Ghz, Windows XP Pro as a Server and Client Quad Core 2.66 PC on 1000 MHz network for Comskip and AirVideo 4 x Comcast RNG110 tuners, 3 x Firewire + 1 USB-Uirt Channel control 4 x HD-PVR, 1 WinTV 1850 Composite and TS SageTV V7.0.23 |
#403
|
|||
|
|||
SJQ4 throwing a lot of errors and crashing my server
I've got hundreds of logs that are full of nothing but this:
============================== ===== Thu Feb 03 16:25:33 CST 2011 ===== LOG4J: Configured Logging for: sagex-api using file: sagex-api.log4j.properties javax.script.ScriptException: java.lang.NumberFormatException: null ============================== ===== Thu Feb 03 16:26:03 CST 2011 ===== LOG4J: Configured Logging for: sagex-api using file: sagex-api.log4j.properties javax.script.ScriptException: java.lang.NumberFormatException: null ============================== ===== Thu Feb 03 16:26:3 P3 CST 2011 ===== LOG4J: Configured Logging for: sagex-api using file: sagex-api.log4j.properties javax.script.ScriptException: java.lang.NumberFormatException: null ============================== ===== Thu Feb 03 16:27:03 CST 2011 ===== LOG4J: Configured Logging for: sagex-api using file: sagex-api.log4j.properties javax.script.ScriptException: java.lang.NumberFormatException: null ============================== ===== Thu Feb 03 16:27:33 CST 2011 ===== LOG4J: Configured Logging for: sagex-api using file: sagex-api.log4j.properties javax.script.ScriptException: java.lang.NumberFormatException: null ============================== ===== Thu Feb 03 16:28:03 CST 2011 ===== LOG4J: Configured Logging for: sagex-api using file: sagex-api.log4j.properties javax.script.ScriptException: java.lang.NumberFormatException: null ============================== ===== Thu Feb 03 16:28:33 CST 2011 ===== LOG4J: Configured Logging for: sagex-api using file: sagex-api.log4j.properties javax.script.ScriptException: java.lang.NumberFormatException: null The error occurs every single minute, and there are so many of these that my server has thrown out of memory errors twice and frozen sage server. I increaed the JVM heap from 768mb to 1280mb, but all I've done is increased the amount of time it will take for SJQ4 to crash my system. Any idea why this is happening? When I disable SJQ4, everything works, except no Comskip. I'm kicking myself for accidentally clicking the 'update all plugins' button, and spacing on the fact that it would destroy my perfectly working SJQ3 setup. SJQ4 has been nothing but a disaster so far for me. I appreciate the development effort, but it did not take into account the fact that some people don't like to poke bees nests and actually like when things just work. A little help will go a long way. Thank you! |
#404
|
||||
|
||||
Quote:
Quote:
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... |
#405
|
|||
|
|||
@lenkost Think I got it figured out this time.
Change line 37 of the Groovy script from this: Code:
File path = Tools.mapDir(new File(SJQ4_METADATA.get("SJQ4_PATH") + File.separator)) // Remap it based on client settings Code:
File path = new File(Tools.mapDir(SJQ4_METADATA.get("SJQ4_PATH") + File.separator)) // Remap it based on client settings
__________________
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... |
#406
|
|||
|
|||
After this change everything works perfect. Great job Thank you.
I am trying to learn Groovy scripts. When I run a test script in IDE environment I get this error: Code:
Exception thrown groovy.lang.MissingPropertyException: No such property: SJQ4_METADATA for class: comskip_test_old at comskip_test_old.run(comskip_test_old.groovy:31)
__________________
Vostro 200, Intel Core 2 Duo 2.53Ghz, Windows XP Pro as a Server and Client Quad Core 2.66 PC on 1000 MHz network for Comskip and AirVideo 4 x Comcast RNG110 tuners, 3 x Firewire + 1 USB-Uirt Channel control 4 x HD-PVR, 1 WinTV 1850 Composite and TS SageTV V7.0.23 |
#407
|
|||
|
|||
Quote:
Specifically, bullet #3. There is no way for me to provide the SJQ4_METADATA map to a script running outside of SJQ. Well, I could, and actually, I have a way, but you basically have to define it on the command line to SageGroovy. I haven't implemented that yet, so in the meantime, what I do for scripts that need SJQ4_METADATA is I just define it at the top of the script to simulate what SJQ would be providing: Code:
def SJQ4_METADATA = ["SJQ4_PATH":"D:\\tv", "SJQ4_ID":"123456"] Also note that you will always want to check for updates to SageGroovy (the latest being 0.0.3.1372). The last number in the version corresponds to the task client version it will simulate. i.e. the latest version acts like task client 4.0.0.1372 (minus the noted exceptions in the wiki doc above).
__________________
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... |
#408
|
|||
|
|||
METADATA issue is resolved but now when running test script I get this:
Code:
1 compilation error: unable to resolve class org.apache.commons.io.FilenameUtils at line: 35, column: 1
__________________
Vostro 200, Intel Core 2 Duo 2.53Ghz, Windows XP Pro as a Server and Client Quad Core 2.66 PC on 1000 MHz network for Comskip and AirVideo 4 x Comcast RNG110 tuners, 3 x Firewire + 1 USB-Uirt Channel control 4 x HD-PVR, 1 WinTV 1850 Composite and TS SageTV V7.0.23 |
#409
|
|||
|
|||
Quote:
More importantly, as you start to get into Groovy scripting, you're going to need to recognize these kinds of errors and how to deal with them. Basically, that exception is telling you that it can't find the FilenameUtils class referenced in your script and based on the full package name, you can deduce that it comes from the Apache Commons IO jar file. Usually, you'd then google that package name and download it off the web. But I already know it's packaged up as part of the SJQ task client plugin and I just forget to package it in SageGroovy, which is why I told you to just grab the jar from SageTV\JARs\. However, I won't be providing everything prepackaged with SageGroovy. If you introduce your own dependencies then you'll have to add them yourself. All jars found in sagegroovy\lib\ at startup are loaded into the SageGroovy environment (classpath).
__________________
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... |
#410
|
|||
|
|||
Script away tedium!!
So I have a few minutes here and thought I'd share some of my tips on how I use Groovy on a daily basis to do things that would otherwise take me hours...
The most important thing to remember about Groovy scripts with SJQ, is that you can write and run Groovy scripts outside the context of SJQv4 AND you can use the handy SageGroovy IDE to edit and run them!! As a matter of fact, you can run any Groovy script at all from this environment. SageGroovy is just the standard Groovy IDE with additional setup to simulate the SJQ scripting environment. If you wanted to find the lowest common multiple of a list of integers, you could do that in SageGroovy: Code:
def nums = [32, 84, 821, 33] print "LCM of ${nums} is " println lcmm(nums).toString() // Determine greatest common divisor of two ints def gcd(a, b){ // Euclidean algorithm while (b != 0) { t = b b = a % b a = t } return a } // Determin lowest common multiple of two ints def lcm(a, b) { return (a * b).intdiv(gcd(a, b)) } // Find LCM of an arbitrary list of numbers def lcmm(List args) { if(args.size() == 2) { return lcm(args[0], args[1]) } else { def arg0 = args.pop() return lcm(arg0, lcmm(args)) } } But... most importantly, SageGroovy is automatically configured to work with the SageTV API. So let's say you're just installing SJQv4 for the first time and now it's time to attach COMSKIP to all your favourites. Let's say you have 75 favourites. Boy, this doesn't seem fun. Trust me, I didn't think so either. Also trust me when I say that I did not manually attach comskip to all my favs the first time I configured SJQv4 (and I have closer to 100 favs). What I did was load up SageGroovy (Eclipse at the time, but now I'd use SageGroovy) IDE and put the following script in the window and run it: Code:
for(Object fav : FavoriteAPI.GetFavorites()) FavoriteAPI.SetFavoriteProperty(fav, "SJQ4_RecordingStarted", "COMSKIP") But notice how that script doesn't do anything with SJQv4. Doesn't look at any variables from SJQ, etc. This is very important to understand. You can run any Groovy script at all that interacts with the Sage API and does nothing with SJQv4 objects. A few weeks after doing this I implemented the ability to run tasks after the RecordingStopped event. Well now I wanted all my comskips to happen after the recording instead of queuing up when the recording started. Again, I wasn't going through the GUI to manually make all those changes. Load up SageGroovy and run this script: Code:
for(Object fav : FavoriteAPI.GetFavorites()) { String task = FavoriteAPI.GetFavoriteProperty(fav, "SJQ4_RecordingStarted") if(task != null && task.equals("COMSKIP")) { FavoriteAPI.SetFavoriteProperty(fav, "SJQ4_RecordingStopped", "COMSKIP") FavoriteAPI.SetFavoriteProperty(fav, "SJQ4_RecordingStarted", null) } } While in the STV you noticed that one of your recordings of Seinfeld was not archived, as expected. Perhaps someone cleared the flag or maybe you forgot to archive it, etc. Anyway, you've got 150 episodes and you don't really want to manually review each one in the STV to make sure they're archived. Instead, write a quick Groovy script to answer the question for you: Code:
Object[] eps = Database.FilterByBoolMethod(Database.FilterByMethod(MediaFileAPI.GetMediaFiles("T"), "GetMediaTitle", "Seinfeld", true), "IsLibraryFile", false) for(Object e : eps) { println ShowAPI.GetShowEpisode(e) } Studio Expression Evaluator replacement... I use SageGroovy to replace Studio's expression evaluator. When I'm experimenting with the Sage API I can just use SageGroovy to run arbitrary API calls. Even better, I can run much more complicated API calls as part of my testing. Hopefully, this post has given you a little taste of what the SageGroovy IDE brings to the table. Not only is it great for writing/debugging/testing SJQv4 Groovy scripts, but it's also great for tackling daily Sage scripting needs. SageGroovy does not need SJQ installed anywhere to be used. You can use it as a standalone SageTV scripting environment and never have to install SJQ to use it. If that's all you ever used SageGroovy for then I think you'd still find major benefits to it!! 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... |
#411
|
|||
|
|||
C:\Program Files\SageTV\SageTV\.lobs.db - there are 17 folders with 256x 200kb files each all with the same error repeated at 1 minute intervals. The dates and times match when I toggle on and off the SJQ4 plugin.
Quote:
The Comskips were being assigned and executing successfully from SJQ4 until the server would crash, so it's not completely borked. I have also updated to the 1372 patch since I saw that was available this week, although I have not tested it. Crashing the server 3 times on the 3 nights I worked late this week tested my family's patience with SageTV enough that I wasn't prepared to experiment on them again! My sjqagent.conf file contains the following: task.comskip1.resources=50 task.comskip1.exe=c\:/comskip/comskip.exe task.comskip1.maxtime=28800 agent.mapdir= task.comskip1.rcmin=0 agent.schedule=ON task.comskip1.args="$SJQ4_PATH\\$SJQ4_LAST_SEGMENT" task.comskip1.test=c\:/sjqagent/comskip_test.groovy task.comskip1.rcmax=0 task.comskip1.schedule=ON task.comskip1.testargs=mpg agent.resources=100 agent.port=23344 task.comskip1.maxtimeratio=1.0 task.comskip1.maxprocs=2 And the editable section of my comskip_test.groovy file contains: (I allow it to run on anything, I only use EDLs, and I like allowing Comskip to run on live recordings) boolean checkRecordingType = false; boolean checkForEdl = true; String edlType = "edl"; boolean comskipLive = true; Quote:
Last edited by K O; 02-04-2011 at 09:57 PM. |
#412
|
|||
|
|||
Quote:
Quote:
http://sagetv-addons.googlecode.com/...ip_test.groovy If they aren't the same then you're missing a key change that will prevent the multiple requeuing of tasks. Since you trigger on RecordingStarted, you're probably hitting the issue where if a recording is deleted before it is assigned to a task client then it will be stuck in the queue for ever. Updating comskip_test.groovy should start to clear those tasks from the queue. You may have too many in there for it to completely fix itself, if so, then we may have to go into H2 and manually cleanup the queue, but try the updated groovy test script first. I think it's worth mentioning here for everyone that SJQv4 is a living and breathing entity, especially during this beta phase. You can't just set it up and leave it. During beta (at least), users will need to keep an eye out for updates to groovy scripts, especially if you're using ones I've written. There's going to be changes and in the case of bug/logic fixes, it can be quite imperative that users upgrade these groovy scripts to address issues (such as the one you're seeing). 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... |
#413
|
|||
|
|||
Errors on new install
Due to some hard drive shuffling I re-installed Sage in a new location. I was going through and setting up plugins and when I installed SJQ, the task agent, and the UI and from the UI standpoint there are no clients connected. In the SJQ logs I'm seeing
Code:
2011-02-05 09:37:03,776 ERROR [License]: Registered email is invalid! You must register your email address via the SJQv4 plugin configuration screen. 2011-02-05 09:37:03,776 INFO [License]: License file is invalid or not found; some features of this software have been disabled: Only one task client can be registered. Only one registered task per task client. 2011-02-05 09:37:03,779 INFO [Plugin]: SJQ timer thread has been started! 2011-02-05 09:37:03,779 INFO [Plugin]: Server agent has started! 2011-02-05 09:37:03,779 INFO [Plugin]: Server crontab has started! 2011-02-05 09:37:03,786 INFO [Plugin]: Event received: SystemMessagePosted 2011-02-05 09:37:18,781 INFO [TaskQueue]: Scheduling queue processor for ~8 seconds from now! 2011-02-05 09:37:26,783 INFO [TaskQueue]: Running queue processor now! 2011-02-05 09:37:32,117 INFO [DataStore]: Found these registered IPs: [] 2011-02-05 09:37:32,117 INFO [DataStore]: Testing: HTPC/192.168.1.101 2011-02-05 09:37:32,120 ERROR [DataStore]: SQL Error org.h2.jdbc.JdbcSQLException: NULL not allowed for column "MAPDIR"; SQL statement: INSERT INTO client (host, port, state, schedule, last_update, total_resources, version, mapdir) VALUES (?, ?, ?, ?, ?, ?, ?, ?) [90006-145] at org.h2.message.DbException.getJdbcSQLException(DbException.java:327) at org.h2.message.DbException.get(DbException.java:167) at org.h2.message.DbException.get(DbException.java:144) at org.h2.table.Column.validateConvertUpdateSequence(Column.java:294) at org.h2.table.Table.validateConvertUpdateSequence(Table.java:621) at org.h2.command.dml.Insert.insertRows(Insert.java:122) at org.h2.command.dml.Insert.update(Insert.java:86) at org.h2.command.CommandContainer.update(CommandContainer.java:69) at org.h2.command.Command.executeUpdate(Command.java:201) at org.h2.server.TcpServerThread.process(TcpServerThread.java:300) at org.h2.server.TcpServerThread.run(TcpServerThread.java:137) at java.lang.Thread.run(Unknown Source) at org.h2.engine.SessionRemote.done(SessionRemote.java:543) at org.h2.command.CommandRemote.executeUpdate(CommandRemote.java:184) at org.h2.jdbc.JdbcPreparedStatement.executeUpdateInternal(JdbcPreparedStatement.java:143) at org.h2.jdbc.JdbcPreparedStatement.executeUpdate(JdbcPreparedStatement.java:129) at com.google.code.sagetvaddons.sjq.server.DataStore.saveClient(DataStore.java:833) at com.google.code.sagetvaddons.sjq.agent.Plugin.start(Plugin.java:198) at sage.plugin.a.a(Unknown Source) at sage.e.v$39.void(Unknown Source) at sage.ay.a(Unknown Source) at sage.e.a(Unknown Source) at sage.x.g(Unknown Source) at sage.x.f(Unknown Source) at sage.x.access$200(Unknown Source) at sage.x$3.run(Unknown Source) at sage.cv$a.run(Unknown Source) 2011-02-05 09:37:48,780 INFO [TaskQueue]: Scheduling queue processor for ~8 seconds from now! 2011-02-05 09:38:35,076 INFO[Listener]: Received connection from: /127.0.0.1 Code:
2011-02-05 09:37:32,107 INFO [Plugin]: Checking if hostname 'HTPC' is registered... 2011-02-05 09:37:32,108 WARN [Config]: Unable to find specified props file! [C:\SageTV\SageTV\plugins\sjq-agent\conf\sjqagent.properties] 2011-02-05 09:37:32,109 WARN [Config]: Unable to find specified props file! [C:\SageTV\SageTV\plugins\sjq-agent\conf\sjqagent.properties] 2011-02-05 09:37:32,109 WARN [Config]: Checking for default props file... 2011-02-05 09:37:32,109 WARN [Config]: Checking for default props file... 2011-02-05 09:37:32,109 WARN [Config]: Unable to find default props file! [C:\SageTV\SageTV\plugins\sjq-agent\conf\sjqagent.properties] 2011-02-05 09:37:32,109 WARN [Config]: Unable to find default props file! [C:\SageTV\SageTV\plugins\sjq-agent\conf\sjqagent.properties] 2011-02-05 09:37:32,109 WARN [Config]: Creating default props file... 2011-02-05 09:37:32,109 WARN [Config]: Creating default props file... 2011-02-05 09:37:32,116 INFO [Config]: Watching 'C:\SageTV\SageTV\plugins\sjq-agent\conf' 2011-02-05 09:37:32,116 INFO [Config]: Watching 'C:\SageTV\SageTV\plugins\sjq-agent\conf' 2011-02-05 09:37:32,121 INFO [Plugin]: Registered 'HTPC' as plugin agent with server! Client[host=HTPC:23344,state=OFFLINE,lastUpdate=Sat Feb 05 09:37:32 EST 2011] |
#414
|
|||
|
|||
It's a bug with the Client class in sjq-common jar. It's fixed, but I will not have time to thoroughly test it before leaving for the day. Here's every software engineer's favourite Friday, 5pm email:
"I don't have time to test this before end of day. I went ahead and committed the code change because it was just a two line change. I'm sure it'll work, but if something breaks in the build I'd be shocked and I'll tackle it first thing Monday morning." I used to send these emails and was shocked to have a QA and/or build manager eagerly awaiting my arrival on Monday morning. I like to think I've learned since then (and at work, I promise I have ), however, I don't answer to QA and build managers in this realm so I'm going to publish the new build with the fix since if it works then you'll be happy and if it doesn't then you're no worse off than you are right now. And, it really was just a two line change in the code! Anyway, I'll get a build in the plugin repository before I leave for the day. It will require an SJQ server upgrade and task client upgrade.
__________________
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... |
#415
|
|||
|
|||
Quote:
|
#416
|
|||
|
|||
Your task client was already registered prior to the upgrade, which is why you didn't hit this bug (nor did I during original testing).
I just submitted the new builds to the repository, let me know if it fixes the problem.
__________________
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... |
#417
|
|||
|
|||
Groovy script addition: Disable IR tuning for specific channels
Thought I'd casually mention this new Groovy script that I just added to svn: no_ir_for_ppv.groovy
This script will disable infrared tuning for specific channels. I use it for PPV channels because when I want to record a PPV movie I have to order it from my STB manually ahead of time, which is fine. But when I do that, the STB sets an auto tune for that PPV channel for the start of the movie. When Sage tries to tune the channel via IR while the STB is doing its auto tune thing they always seem to interfere and the tuning of the STB seems to get screwed up. The channel doesn't change and I end up wasting $5.99. This Groovy script remaps the physical channel(s) identified to a meaningless string of letters, which Sage ignores when tuning resulting in no IR signals being sent to the STB. This allows the STB auto tune to do its thing. The channels to remap can be specified by regex or explicitly, see the script for details on how to configure it. You can run the script periodically via SJQv4 or you can just run it once/on demand/as necessary from SageGroovy. This is the first in a series of up coming releases where I'll start to share all the various Groovy scripts I'm using to accomplish all sorts of Sage tasks. Most of my scripts that aren't in subversion already are in need of some serious cleanup before I post them. All of my scripts that I've released are available here: http://sagetv-addons.googlecode.com/...nk/SJQScripts/ 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... |
#418
|
|||
|
|||
Makes sense. After updating it fired right up and other than accidentally assigning comskip to 'media imported' instead of 'recording started' and not catching it until it had queued up 200 tasks on music, all is well I haven't run my scripts through regression testing yet (had to make some path changes) so hopefully nothing goes haywire before I get them tested again Thanks for the update, now pry yourself away from the computer and enjoy the weekend!
|
#419
|
|||
|
|||
SJQv3 file cleaner now ported to SJQv4 Groovy script
My latest Groovy script release is the port of the old SJQv3 file cleaner to a Groovy script suitable for periodic execution from the SJQv4 crontab. You can download the script from here:
http://sagetv-addons.googlecode.com/...cleaner.groovy Simply edit the list of file extensions you wish to have cleaned up by the script and then schedule it for periodic execution from the SJQv4 crontab. You could also run it on demand through an SJQv4 task client or manually via SageGroovy. After some thought, I think this is a better approach than my Sage Artifact Delete plugin (SAD), which reacts to media file deletion events. Periodically running this Groovy script will not only handle new media deletions, but will also find orphaned artifacts left prior to a SAD plugin installation. However, both solutions work and can even work together. Either way, this Groovy script provides the port of the old SJQv3 file cleaner, as promised. 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... |
#420
|
|||
|
|||
More Groovy examples...
Two more examples added:
link_import_to_show.groovy: Imports a new video into your library and links it to the given Show ID. This script is designed to be run manually from the command line when needed (via the SageGroovy CLP script runner). united_comskip_test.groovy: The unified comskip test script that determines the type of content and adjusts resource usage at runtime. It also shows how to modify a task's exe arguments within the test script. It also shows the use of the mapDir() function. This example shows how one can reduce the use of multiple comskip tasks into one by dynamically modifying resource usage and exe arguments at runtime.
__________________
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... |
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 |