SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV v7 Customizations

Notices

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.

Reply
 
Thread Tools Search this Thread Display Modes
  #1601  
Old 03-03-2017, 03:47 PM
phelme's Avatar
phelme phelme is offline
Sage Icon
 
Join Date: Dec 2006
Posts: 1,027
does anyone know if the Test Script and Executable log files have any impact on heap space? Ditto the size of the SJQ database? I know that SJQ keeps this information around, the amount of days kept being configurable.

I'm trying to figure out where the heck all my Java memory goes and figure this might be worth looking into.
__________________
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
Reply With Quote
  #1602  
Old 03-04-2017, 04:29 PM
graywolf's Avatar
graywolf graywolf is offline
Sage Icon
 
Join Date: Oct 2009
Location: NC
Posts: 1,181
Anyone have Slugger's SJQ4 scripts?

Anyone have Slugger's SJQ4 scripts?

Was wanting to try a few things and my foggy memory thinks that Slugger had an example in his old svn location on googlecode which is no more.

Anyone have the old collection or know of a link to it that works?
Reply With Quote
  #1603  
Old 03-10-2017, 09:40 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
The svn repo seems to be gone forever, but I happened to still have a very old vm image kicking around so I booted it up and sure enough I had the svn repo checked out on it. I've attached a zip of what I had on the vm. Looks to be from around 2011. Don't know if it's the latest & greatest (probably not), but looks like most, if not all, of the examples I wrote way back when are in there in one form or another. Always a laugh to read your own code that's 6+ years old. Do with it what you will.

It's too bad Google just decided to toast all their hosted repos. Hate to imagine how much code just went poof because of it.
Attached Files
File Type: zip sjqscripts.zip (297.6 KB, 42 views)
__________________
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; 03-10-2017 at 09:45 PM.
Reply With Quote
  #1604  
Old 03-10-2017, 09:45 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Quote:
Originally Posted by phelme View Post
does anyone know if the Test Script and Executable log files have any impact on heap space? Ditto the size of the SJQ database? I know that SJQ keeps this information around, the amount of days kept being configurable.

I'm trying to figure out where the heck all my Java memory goes and figure this might be worth looking into.
Shouldn't. The only thing of SJQ that would consume Sage's heap would be the plugin code itself. All that data is stored in a separate database. So just the jar of plugin code + the jar for the database driver. Obviously I'd never claim perfection, but if there were any major leaks from SJQ, they would have likely been reported during its prime usage back in the day. Anecdotal, I know, but I ran the SJQ server and client for months on end without issue. There were some quirks with the H2 database driver that some people hit and I never could reproduce reliably, iirc. But I don't think any of that stuff affected Sage's heap, but it's been so many years now that it's mostly a blur at this point.
__________________
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...
Reply With Quote
  #1605  
Old 10-29-2017, 11:47 AM
razrsharpe razrsharpe is offline
Sage Icon
 
Join Date: Sep 2008
Location: Boston, MA
Posts: 2,111
I have 2 orphaned tasks and 1 orphaned client that i cant remove/delete/kill in the sjq ui (the client that was processing these tasks doesn't exist anymore). Is there any way to manually kill them?
__________________
Server 2003 r2 32bit, SageTV9 (finally!)
2x Dual HDHR (OTA), 1x HD-PVR (Comcast), 1x HDHR-3CC via SageDCT (Comcast)
2x HD300, 1x SageClient (Win10 Test/Development)
Check out TVExplorer
Reply With Quote
  #1606  
Old 12-08-2017, 09:15 AM
Taddeusz Taddeusz is offline
SageTVaholic
 
Join Date: Nov 2004
Location: Yukon, OK
Posts: 3,919
It's been a while since I've done any kind of SageTV API stuff. I record the news every evening but it's annoying to have to manually delete them every morning if I fall asleep before the news is over. I want to make a script that finds all the "KOCO" news recordings and deletes them every night.
__________________
Server: i5 8400, ASUS Prime H370M-Plus/CSM, 16GB RAM, 15TB drive array + 500GB cache, 2 HDHR's, SageTV 9, unRAID 6.6.3
Client 1: HD300 (latest FW), HDMI to an Insignia 65" 1080p LCD and optical SPDIF to a Sony Receiver
Client 2: HD200 (latest FW), HDMI to an Insignia NS-LCD42HD-09 1080p LCD
Reply With Quote
  #1607  
Old 12-11-2017, 11:36 AM
Taddeusz Taddeusz is offline
SageTVaholic
 
Join Date: Nov 2004
Location: Yukon, OK
Posts: 3,919
I'm trying to get SJQ working on my SageTV Docker running on unRAID. Does this work on that platform? Will it run with Java 8 or does it need 7?
__________________
Server: i5 8400, ASUS Prime H370M-Plus/CSM, 16GB RAM, 15TB drive array + 500GB cache, 2 HDHR's, SageTV 9, unRAID 6.6.3
Client 1: HD300 (latest FW), HDMI to an Insignia 65" 1080p LCD and optical SPDIF to a Sony Receiver
Client 2: HD200 (latest FW), HDMI to an Insignia NS-LCD42HD-09 1080p LCD
Reply With Quote
  #1608  
Old 12-11-2017, 11:43 AM
wayner wayner is offline
SageTVaholic
 
Join Date: Jan 2008
Location: Toronto, ON
Posts: 6,589
I have it running fine on unRAID with Java 8. I can't remember if I had any issues when first trying to get it set up, but I don't think there were any major issues.
__________________
New Server - Sage9 on unRAID 2xHD-PVR, HDHR for OTA
Old Server - Sage7 on Win7Pro-i660CPU with 4.6TB, HD-PVR, HDHR OTA, HVR-1850 OTA
Clients - 2xHD-300, 8xHD-200 Extenders, Client+2xPlaceshifter and a WHS which acts as a backup Sage server
Reply With Quote
  #1609  
Old 12-11-2017, 11:47 AM
Taddeusz Taddeusz is offline
SageTVaholic
 
Join Date: Nov 2004
Location: Yukon, OK
Posts: 3,919
I got it working I think. I figured out that I needed to "chmod +x" the scripts. After that my test script with just "return 0;" ran successfully. At this point I think it's just the syntax of the script I really want to run.
__________________
Server: i5 8400, ASUS Prime H370M-Plus/CSM, 16GB RAM, 15TB drive array + 500GB cache, 2 HDHR's, SageTV 9, unRAID 6.6.3
Client 1: HD300 (latest FW), HDMI to an Insignia 65" 1080p LCD and optical SPDIF to a Sony Receiver
Client 2: HD200 (latest FW), HDMI to an Insignia NS-LCD42HD-09 1080p LCD
Reply With Quote
  #1610  
Old 12-11-2017, 12:08 PM
Taddeusz Taddeusz is offline
SageTVaholic
 
Join Date: Nov 2004
Location: Yukon, OK
Posts: 3,919
Trying to figure out why my simple script doesn't seem to be working:

Code:
MediaFileAPI.GetMediaFiles("T").each { mediaFile ->
    if(MediaFileAPI.GetMediaTitle(mediaFile) ==~ /KOCO News/) {
        println("Deleting media file: " + MediaFileAPI.GetMediaFileID(mediaFile));
        // MediaFileAPI.DeleteFile(mediaFile);
    }
}
return 0;
It's failing with the error:
Code:
/opt/sagetv/server/sjq_scripts/del_koco_news.groovy:
 1: /opt/sagetv/server/del_koco_news.groovy: Syntax error: word unexpected (expecting ")")
__________________
Server: i5 8400, ASUS Prime H370M-Plus/CSM, 16GB RAM, 15TB drive array + 500GB cache, 2 HDHR's, SageTV 9, unRAID 6.6.3
Client 1: HD300 (latest FW), HDMI to an Insignia 65" 1080p LCD and optical SPDIF to a Sony Receiver
Client 2: HD200 (latest FW), HDMI to an Insignia NS-LCD42HD-09 1080p LCD
Reply With Quote
  #1611  
Old 12-11-2017, 12:54 PM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,543
The text you posted seems fine (I even put it into an IDE that validates groovy and no errors). Is that the entire script?

Quote:
Originally Posted by Taddeusz View Post
Trying to figure out why my simple script doesn't seem to be working:

Code:
MediaFileAPI.GetMediaFiles("T").each { mediaFile ->
    if(MediaFileAPI.GetMediaTitle(mediaFile) ==~ /KOCO News/) {
        println("Deleting media file: " + MediaFileAPI.GetMediaFileID(mediaFile));
        // MediaFileAPI.DeleteFile(mediaFile);
    }
}
return 0;
It's failing with the error:
Code:
/opt/sagetv/server/sjq_scripts/del_koco_news.groovy:
 1: /opt/sagetv/server/del_koco_news.groovy: Syntax error: word unexpected (expecting ")")
Reply With Quote
  #1612  
Old 12-11-2017, 01:16 PM
wayner wayner is offline
SageTVaholic
 
Join Date: Jan 2008
Location: Toronto, ON
Posts: 6,589
Weird - could it even be DOS v Unix line break issue or something silly like that? Or maybe it doesn't like using / as string delimiters? Or maybe it doesn't like the ==~ operator.

Maybe try:
if(MediaFileAPI.GetMediaTitle(mediaFile).contains("KOCO News") {
__________________
New Server - Sage9 on unRAID 2xHD-PVR, HDHR for OTA
Old Server - Sage7 on Win7Pro-i660CPU with 4.6TB, HD-PVR, HDHR OTA, HVR-1850 OTA
Clients - 2xHD-300, 8xHD-200 Extenders, Client+2xPlaceshifter and a WHS which acts as a backup Sage server
Reply With Quote
  #1613  
Old 12-11-2017, 01:52 PM
Taddeusz Taddeusz is offline
SageTVaholic
 
Join Date: Nov 2004
Location: Yukon, OK
Posts: 3,919
It seems like it's not loading some standard libraries or something like that. I changed it to this and now I'm getting "def: not found" for line 1.

Code:
def mediaMask = "T"

MediaFileAPI.GetMediaFiles(mediaMask).each { mediaFile ->
    if(MediaFileAPI.GetMediaTitle(mediaFile) ==~ /KOCO News/) {
        println("Deleting media file: " + MediaFileAPI.GetMediaFileID(mediaFile));
        // MediaFileAPI.DeleteFile(mediaFile);
    }
}
return 0;
__________________
Server: i5 8400, ASUS Prime H370M-Plus/CSM, 16GB RAM, 15TB drive array + 500GB cache, 2 HDHR's, SageTV 9, unRAID 6.6.3
Client 1: HD300 (latest FW), HDMI to an Insignia 65" 1080p LCD and optical SPDIF to a Sony Receiver
Client 2: HD200 (latest FW), HDMI to an Insignia NS-LCD42HD-09 1080p LCD
Reply With Quote
  #1614  
Old 12-11-2017, 04:56 PM
Taddeusz Taddeusz is offline
SageTVaholic
 
Join Date: Nov 2004
Location: Yukon, OK
Posts: 3,919
I've basically removed all the plugins and libraries from my SageTV installation and started from scratch. Did everything except delete my Sage.properties file. Even deleted any extraneous jar files that shouldn't be there in a clean installation. Then I reinstalled everything. It still gets the same "def: not found" error.

Any ideas?
__________________
Server: i5 8400, ASUS Prime H370M-Plus/CSM, 16GB RAM, 15TB drive array + 500GB cache, 2 HDHR's, SageTV 9, unRAID 6.6.3
Client 1: HD300 (latest FW), HDMI to an Insignia 65" 1080p LCD and optical SPDIF to a Sony Receiver
Client 2: HD200 (latest FW), HDMI to an Insignia NS-LCD42HD-09 1080p LCD
Reply With Quote
  #1615  
Old 12-11-2017, 04:59 PM
Taddeusz Taddeusz is offline
SageTVaholic
 
Join Date: Nov 2004
Location: Yukon, OK
Posts: 3,919
BTW, there are no extraneous white space characters in there. I've tried with both LF & CRLF line endings and get the same results.
__________________
Server: i5 8400, ASUS Prime H370M-Plus/CSM, 16GB RAM, 15TB drive array + 500GB cache, 2 HDHR's, SageTV 9, unRAID 6.6.3
Client 1: HD300 (latest FW), HDMI to an Insignia 65" 1080p LCD and optical SPDIF to a Sony Receiver
Client 2: HD200 (latest FW), HDMI to an Insignia NS-LCD42HD-09 1080p LCD
Reply With Quote
  #1616  
Old 12-11-2017, 08:53 PM
KarylFStein KarylFStein is offline
Sage Fanatic
 
Join Date: Apr 2006
Location: Westland, Michigan, USA
Posts: 999
Do you need any imports? I don't know, but maybe try these:

Code:
import com.google.code.sagetvaddons.metadata.Factory
import org.apache.commons.io.FileUtils
(I'm just looking at some scripts I cobbled together from other people's scripts. I don't really know anything about Groovy.)

Also, should that ==~ just be =~?
__________________
Home Network: https://karylstein.com/technology.html
Reply With Quote
  #1617  
Old 12-12-2017, 08:15 AM
Taddeusz Taddeusz is offline
SageTVaholic
 
Join Date: Nov 2004
Location: Yukon, OK
Posts: 3,919
Quote:
Originally Posted by KarylFStein View Post
Do you need any imports? I don't know, but maybe try these:

Code:
import com.google.code.sagetvaddons.metadata.Factory
import org.apache.commons.io.FileUtils
(I'm just looking at some scripts I cobbled together from other people's scripts. I don't really know anything about Groovy.)

Also, should that ==~ just be =~?
Something fundamental is just not working on my system. If I put an import line in it then says "import: not found".
__________________
Server: i5 8400, ASUS Prime H370M-Plus/CSM, 16GB RAM, 15TB drive array + 500GB cache, 2 HDHR's, SageTV 9, unRAID 6.6.3
Client 1: HD300 (latest FW), HDMI to an Insignia 65" 1080p LCD and optical SPDIF to a Sony Receiver
Client 2: HD200 (latest FW), HDMI to an Insignia NS-LCD42HD-09 1080p LCD
Reply With Quote
  #1618  
Old 12-12-2017, 08:24 AM
wayner wayner is offline
SageTVaholic
 
Join Date: Jan 2008
Location: Toronto, ON
Posts: 6,589
Are you doing all of this from within SJQ or are you also trying from a bash prompt within the Docker container? One of the drawbacks of a Docker is that it isn't as easy to install other apps like a Groovy DE and have that persist after upgrades, etc.

One of the other things you can do is to run the SJQ code on remote clients, including a VM on your unRAID box.
__________________
New Server - Sage9 on unRAID 2xHD-PVR, HDHR for OTA
Old Server - Sage7 on Win7Pro-i660CPU with 4.6TB, HD-PVR, HDHR OTA, HVR-1850 OTA
Clients - 2xHD-300, 8xHD-200 Extenders, Client+2xPlaceshifter and a WHS which acts as a backup Sage server
Reply With Quote
  #1619  
Old 12-12-2017, 08:27 AM
Taddeusz Taddeusz is offline
SageTVaholic
 
Join Date: Nov 2004
Location: Yukon, OK
Posts: 3,919
Quote:
Originally Posted by wayner View Post
Are you doing all of this from within SJQ or are you also trying from a bash prompt within the Docker container? One of the drawbacks of a Docker is that it isn't as easy to install other apps like a Groovy DE and have that persist after upgrades, etc.

One of the other things you can do is to run the SJQ code on remote clients, including a VM on your unRAID box.
I'm running this from within SJQ.
__________________
Server: i5 8400, ASUS Prime H370M-Plus/CSM, 16GB RAM, 15TB drive array + 500GB cache, 2 HDHR's, SageTV 9, unRAID 6.6.3
Client 1: HD300 (latest FW), HDMI to an Insignia 65" 1080p LCD and optical SPDIF to a Sony Receiver
Client 2: HD200 (latest FW), HDMI to an Insignia NS-LCD42HD-09 1080p LCD
Reply With Quote
  #1620  
Old 12-12-2017, 08:35 AM
wayner wayner is offline
SageTVaholic
 
Join Date: Jan 2008
Location: Toronto, ON
Posts: 6,589
Let me check some of my stuff tonight when I am at home. I don't use SJQ a lot these days on my server but I know that I do run a daily SJQ job just after midnight that emails me a list of the next day's recordings. And I am pretty sure that I adapted some of my jobs from Windows to Linux which was mainly a case of changing files paths to my Linux server and changing \s to /s, etc.
__________________
New Server - Sage9 on unRAID 2xHD-PVR, HDHR for OTA
Old Server - Sage7 on Win7Pro-i660CPU with 4.6TB, HD-PVR, HDHR OTA, HVR-1850 OTA
Clients - 2xHD-300, 8xHD-200 Extenders, Client+2xPlaceshifter and a WHS which acts as a backup Sage server
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

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


All times are GMT -6. The time now is 07:10 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.