|
SageTV Customizations This forums is for discussing and sharing user-created modifications for the SageTV application created by using the SageTV Studio or through the use of external plugins. Use this forum to discuss customizations for SageTV version 6 and earlier, or for the SageTV3 UI. |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
ComChecker for Linux/Mac Script Version
ComChecker.sh is the script only version of the ComChecker software application for Mac. This script is designed to work on Linux and Mac and should be executed as a background process. I run this command on my server to execute and leave running as user sagetv:
Code:
su -c 'nohup /opt/sagetv/scripts/comchecker.sh 2>/dev/null 1>/dev/null &' sagetv Code:
nohup /opt/sagetv/scripts/comchecker.sh 2>/dev/null 1>/dev/null & Usage: To use this script you must have WINE installed for your distro. It is also helpful to be using the donator version of comskip if you want to scan HDPVR files. Support for comskip as it pertains to accuracy, etc., can be found here. Please edit the script in your favorite editor and adjust the values as needed. Beginning in this version, I have added the ability to specify different multipliers so that you can control how many processes run on a per file type basis. This is handy because TS file scanning is more costly than MPG file scanning. E.g.: If you set a base number of 50 and your MPG files are set to 10, you will be able to run 5 simultaneous executions of comskip.exe. All math is treated in whole numbers, please increase the SIMUL variable to fine tune the numbers. Questions on usage and bug reports should be handled in this thread. Download here. Thanks, B Version .6 - 10-31-2009 Added support for nice. Per a user PM request. Thanks!Version .5 - 9-20-2009 Added the capability to filter shows based on channel id. This requires the use of Stuckless' sagex.api plugin.
__________________
Running SageTV on unRAID via Docker Tuning handled by HDHR3-6CC-3X2 using OpenDCT Last edited by bcjenkins; 10-31-2009 at 06:34 AM. |
#2
|
|||
|
|||
Thank you for writing this!
I was able to set it up and it does find the .mpg files and runs comskip on them, but it doesn't seem to be deleting the old files (edl, txt, etc). I ran the comchecker program and it says Looking for old files Find: paths must precede expression: readme.txt (along with some other items). Any suggestions?
__________________
Server - AMD 4850e, ASUS M3A76-CM, 4GB RAM, 1.5TB drive OS - ArchLinux - console only Client(s) - Media MVP Tuner(s) - 2x HVR 1600 (SD only) |
#3
|
|||
|
|||
After looking at this for a bit the problem has to do with the txt extension. I really don't know why.
If I do a find for log, edl, etc, everything works. Once I put in txt it crashes. I removed txt from the CHKEXT array and that seems to have solved it (at least for me).
__________________
Server - AMD 4850e, ASUS M3A76-CM, 4GB RAM, 1.5TB drive OS - ArchLinux - console only Client(s) - Media MVP Tuner(s) - 2x HVR 1600 (SD only) |
#4
|
|||
|
|||
How does it crash? Is there an error?
B
__________________
Running SageTV on unRAID via Docker Tuning handled by HDHR3-6CC-3X2 using OpenDCT |
#5
|
|||
|
|||
It doesn't crash, but it didn't remove old files. When the program ran, it would show:
Looking for old filesIt would never delete the old files. I found on my box that if I just ran find -name *.txt, I would see the same message. If I ran find -name *.edl, it would show a listing of the files with the edl extension. I don't know why it doesn't like the txt.
__________________
Server - AMD 4850e, ASUS M3A76-CM, 4GB RAM, 1.5TB drive OS - ArchLinux - console only Client(s) - Media MVP Tuner(s) - 2x HVR 1600 (SD only) |
#6
|
|||
|
|||
What about
Code:
find /var/media/tv -type f -name *.txt I am working on rewriting that section anyways because it was ugly. But I am still using find. Also, what happens if edl is first in the order? B PS find --version? find (GNU findutils) 4.4.2
__________________
Running SageTV on unRAID via Docker Tuning handled by HDHR3-6CC-3X2 using OpenDCT |
#7
|
|||
|
|||
CAUTION
You can test this section of code in the script to see if it solves your problems. Please copy some files to a different directory to test against.
Code:
FILE_LIST=$(find ${TVPATH[$x]} -type f | sed 's/.*\///' | cut -d '.' -f1 | uniq) for FILE in ${FILE_LIST} do if [[ ! $(find "${TVPATH[$x]}" -type f -regextype posix-awk -regex "(.*.$(echo ${EXTEN[*]}|sed 's/ /\|\.\*\./g'))" | grep "${FILE}") && "${FILE}" != "images" ]]; then echo "find ${TVPATH[$x]} -type f -delete -name ${FILE}.*" find ${TVPATH[$x]} -type f -delete -name ${FILE}.* fi done
__________________
Running SageTV on unRAID via Docker Tuning handled by HDHR3-6CC-3X2 using OpenDCT |
#8
|
|||
|
|||
I created a separate directory and placed some files in it. I modified the comchecker.sh to use your new code.
While I don't see any error messages pop up, it does say it is looking for old files, but never displays a listing of files and it never deletes anything. I made sure to delete one .mpg file to test.
__________________
Server - AMD 4850e, ASUS M3A76-CM, 4GB RAM, 1.5TB drive OS - ArchLinux - console only Client(s) - Media MVP Tuner(s) - 2x HVR 1600 (SD only) |
#9
|
|||
|
|||
You're right.. I thought it was working, but try this one:
Code:
FILE_LIST=$(find ${TVPATH[$x]} -type f | sed 's/.*\///' | cut -d '.' -f1 | uniq) for FILE in ${FILE_LIST} do if [[ -z $(find "${TVPATH[$x]}" -type f -regextype posix-awk -regex "(.*.$(echo ${KEEP[*]}|sed 's/ /\|\.\*\./g'))" | grep "${FILE}") && "${FILE}" != "images" ]]; then echo "Deleting file(s): ${TVPATH[$x]}/${FILE}.*" rm -i ${TVPATH[$x]}/${FILE}.* fi done B
__________________
Running SageTV on unRAID via Docker Tuning handled by HDHR3-6CC-3X2 using OpenDCT |
#10
|
|||
|
|||
Trouble with curl
I need a little help.
comchecker.sh seems to work for me with one exception. The curl invocations to query the AiringChannel do not work for me. Here are the config variables I used: Code:
# SageTV Specific feature: Check recording channel and skip if listed. SAGETV_ENABLE=TRUE SAGETV_SERVER=localhost SAGETV_SERVER_PORT=8080 SAGETV_SERVER_USER=myname SAGETV_SERVER_PASS=apassword SAGETV_SKIP_CHAN=( WXXIDT WXXIDT2 WXXIDT3 ) # This is the channel id. eg ( NBC PBS ) Code:
curl --user myname:apassword --silent 'http://localhost:8080/sagex/api?c=GetMediaFileForFilePath&1=/var/media/tv/TheOffice-BodyLanguage-23396-0.mpg' Code:
<HTML><HEAD><TITLE>404 Not found</TITLE></HEAD><BODY BGCOLOR="#F1D0F2"><H2>404 Not found</H2><HR/><ADDRESS><A HREF="http://tjws.sourceforge.net">Rogatkin's JWS based on Acme.Serve $Revision: 1.26 $</A></ADDRESS></BODY></HTML> Code:
curl --user myname:apassword --silent 'http://localhost:8080/sagex/api?c=GetMediaFiles&1=T' Code:
curl --user myname:apassword --silent 'http://localhost:8080/sage/Home' Here's my latest (unworking) iteration of realms.properties: Code:
# Username/passwords for protected web pages # Format: # Prompt=/path,user:password # multiple users/passwords can be given for the same prompt/path # # Example customsation # The following lines protect pages that perform actions # with different username/password, giving 2 levels of # priviledge: read-only and read-write # # these must be put before the top level user/password for them # to take effect. # # replace write:only with a username:password of your choice # you can also add this username:password as a top level password (below) so that # it can also be used for read-only actions. # SageTV Web Actions=/sage/Command,myname:apassword SageTV Web Actions=/sage/AiringCommand,myname:apassword SageTV Web Actions=/sage/ManualRecord,myname:apassword SageTV Web Actions=/sage/ResolveConflict,myname:apassword SageTV Web Actions=/sage/TimedRecord,myname:apassword SageTV Web Actions=/sage/MediaFileCommand,myname:apassword SageTV Web Actions=/sage/GlobalCommand,myname:apassword SageTV Web Actions=/sage/EditShowInfo,myname:apassword SageTV Web Actions=/sage/EncodeCommand,myname:apassword SageTV Web Actions=/sage/FavoriteCommand,myname:apassword SageTV Web Actions=/sages/api,myname:apassword SageTV Web Actions=/sagex/api,myname:apassword # top level user:password SageTV Web Interface=/sage,myname:apassword SageTV Web Interface=/sages,myname:apassword SageTV Web Interface=/sagex,myname:apassword # note that there is now a url defined in servlets.properties # defined as /sagepublic/MediaFile # this should be left unprotected to allow media players to play # files without specifying a username/password. Code:
JARs/nielm_getrssnews.jar JARs/nielm_sageimdb.jar JARs/nielm_sagemenureader.jar JARs/nielm_sageutls.jar JARs/nielm_sagewebserver.jar JARs/nielm_sagexmlinfo.jar |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Utility: ComChecker for SageTV on Mac OS X | bcjenkins | SageTV Customizations | 29 | 09-01-2009 07:29 PM |
Utility: Linux/OS X batch beta firmware upgrade script | bcjenkins | SageTV Customizations | 3 | 08-13-2008 07:08 AM |
Linux and Mac OS X Comskip Users | bcjenkins | SageTV Customizations | 0 | 06-19-2008 05:23 AM |
SageTV Mac version choppy on Core 2 1.66 Mac Mini | neilbradley | SageTV Mac Edition | 1 | 09-09-2007 08:55 AM |
SageTV for Linux version 5 or version 6? | ataren | SageTV Linux | 1 | 12-28-2006 04:04 PM |