mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-29 01:08:56 +00:00
added option to set update_parsing for wholde db or past 24 hours, fixed kill ffmpeg/mediainfo
This commit is contained in:
+5
-5
@@ -2,7 +2,7 @@
|
||||
|
||||
require(dirname(__FILE__)."/config.php");
|
||||
require(WWW_DIR.'/lib/postprocess.php');
|
||||
$version="0.1r709";
|
||||
$version="0.1r710";
|
||||
|
||||
$db = new DB();
|
||||
|
||||
@@ -1342,8 +1342,8 @@ while( $i > 0 )
|
||||
//check ffmpeg and mediainfo, kill if necessary
|
||||
if (( $array['KILL_PROCESS'] != "0" ) && ( $array['KILL_QUIET'] == "true" ) && ( $optimize_safe_to_run != "true" )) {
|
||||
echo "\n";
|
||||
shell_exec("killall -qo {$array['KILL_PROCESS']}s -9 mediainfo 2>&1 1> /dev/null");
|
||||
shell_exec("killall -qo {$array['KILL_PROCESS']}s -9 ffmpeg 2>&1 1> /dev/null");
|
||||
shell_exec("killall -qo {$array['KILL_PROCESS']}s -9 mediainfo");
|
||||
shell_exec("killall -qo {$array['KILL_PROCESS']}s -9 ffmpeg");
|
||||
} else {
|
||||
echo "\n";
|
||||
shell_exec("killall -o {$array['KILL_PROCESS']}s -9 mediainfo 2>&1 1> /dev/null");
|
||||
@@ -1352,8 +1352,8 @@ while( $i > 0 )
|
||||
|
||||
if (( $array['KILL_QUIET'] == "true" ) && ( $optimize_safe_to_run == "true" )) {
|
||||
echo "\n";
|
||||
shell_exec("killall -q mediainfo 2>&1 1> /dev/null");
|
||||
shell_exec("killall -q ffmpeg 2>&1 1> /dev/null");
|
||||
shell_exec("killall -q mediainfo");
|
||||
shell_exec("killall -q ffmpeg");
|
||||
} else {
|
||||
echo "\n";
|
||||
shell_exec("killall mediainfo 2>&1 1> /dev/null");
|
||||
|
||||
+13
-1
@@ -10,6 +10,18 @@ require_once (WWW_DIR."/lib/categorymod.php");
|
||||
require_once (WWW_DIR."/lib/movie.php");
|
||||
|
||||
|
||||
//get variables from config.sh and defaults.sh
|
||||
$path = dirname(__FILE__);
|
||||
$varnames = shell_exec("cat ".$path."/../config.sh | grep ^export | cut -d \= -f1 | awk '{print $2;}'");
|
||||
$varnames .= shell_exec("cat ".$path."/../defaults.sh | grep ^export | cut -d \= -f1 | awk '{print $2;}'");
|
||||
$vardata = shell_exec("cat ".$path."/../config.sh | grep ^export | cut -d \\\" -f2 | awk '{print $1;}'");
|
||||
$vardata .= shell_exec("cat ".$path."/../defaults.sh | grep ^export | cut -d \\\" -f2 | awk '{print $1;}'");
|
||||
$varnames = explode("\n", $varnames);
|
||||
$vardata = explode("\n", $vardata);
|
||||
$array = array_combine($varnames, $vardata);
|
||||
unset($array['']);
|
||||
|
||||
|
||||
//This script updates release names for releases in 'TV > Other', 'Movie > Other', 'XXX > Other', and 'Other > Misc' categories.
|
||||
//It first attempts to extract the release name from the NFO, falling back to rarset filename -- the ReleaseFiles.
|
||||
//If the new releasename is the same as the old name, OR the name is different but still doesnt match a new category, it will skip the release.
|
||||
@@ -24,7 +36,7 @@ $echo = false;
|
||||
/// Set this to true to echo only
|
||||
|
||||
/// The following value sets the amount of time to either 24 hours or the Whole DB
|
||||
$limited = true;
|
||||
$limited = $array['WHOLE_DB'];
|
||||
/// Set to true for 24 hours, false for whole db.
|
||||
|
||||
/// WARNING!!!!!!!!The following value runs update_parsing either against "other categories", or all categories, do not use this if $echo is false. This is for testing.
|
||||
|
||||
@@ -234,9 +234,12 @@ export CLEANUP_TIMER="3600"
|
||||
export PARSING="false"
|
||||
|
||||
#choose to use kevin123's update_parsing script
|
||||
#this also includes kevin123's categorymod.php, you must run either update_svn.sh or fix_files.sh to copy the file into placeo
|
||||
#this also includes kevin123's categorymod.php, you must run either update_svn.sh or fix_files.sh to copy the file into place
|
||||
export PARSING_MOD="false"
|
||||
|
||||
#run update_parsing.php against the whole db or kust the last 24 hours
|
||||
export WHOLE_DB="false"
|
||||
|
||||
#How often do you want update_parsing.php to run, in seconds. this takes alot of memory and processing time, default is every 12 hrs
|
||||
export PARSING_TIMER="43200"
|
||||
|
||||
|
||||
@@ -146,7 +146,7 @@ else
|
||||
|
||||
|
||||
cp -f $NEWZPATH/www/lib/nfo.php bin/lib/nfo.php
|
||||
cp -f $NEWZPATH/www/lib/tvrage.php bin/lib/tvrage.php
|
||||
#cp -f $NEWZPATH/www/lib/tvrage.php bin/lib/tvrage.php
|
||||
cp -f $NEWZPATH/www/lib/movie.php bin/lib/movie.php
|
||||
cp -f $NEWZPATH/www/lib/music.php bin/lib/music.php
|
||||
cp -f $NEWZPATH/www/lib/music.php bin/lib/music1.php
|
||||
@@ -157,7 +157,7 @@ else
|
||||
$SED -i -e "s/500/250/" bin/lib/postprocess2.php
|
||||
|
||||
$SED -i -e "s/class Nfo/class Nfo1/" bin/lib/nfo.php
|
||||
$SED -i -e "s/class TvRage/class TvRage1/" bin/lib/tvrage.php
|
||||
#$SED -i -e "s/class TvRage/class TvRage1/" bin/lib/tvrage.php
|
||||
$SED -i -e "s/class Movie/class Movie1/" bin/lib/movie.php
|
||||
$SED -i -e "s/class Music/class Music1/" bin/lib/music.php
|
||||
$SED -i -e "s/class Music/class Music2/" bin/lib/music1.php
|
||||
@@ -165,7 +165,7 @@ else
|
||||
$SED -i -e "s/class Book/class Book1/" bin/lib/book.php
|
||||
|
||||
$SED -i -e "s/function Nfo/function Nfo1/" bin/lib/nfo.php
|
||||
$SED -i -e "s/function TvRage/function TvRage1/" bin/lib/tvrage.php
|
||||
#$SED -i -e "s/function TvRage/function TvRage1/" bin/lib/tvrage.php
|
||||
$SED -i -e "s/function Movie/function Movie1/" bin/lib/movie.php
|
||||
$SED -i -e "s/function Music/function Music1/" bin/lib/music.php
|
||||
$SED -i -e "s/function Music/function Music2/" bin/lib/music1.php
|
||||
@@ -188,7 +188,7 @@ else
|
||||
$SED -i -e 's/WWW_DIR."\/lib\/music.php"/"music1.php"/g' bin/lib/postprocess2.php
|
||||
$SED -i -e 's/WWW_DIR."\/lib\/console.php"/"console.php"/g' bin/lib/postprocess2.php
|
||||
$SED -i -e 's/WWW_DIR."\/lib\/book.php"/"book.php"/g' bin/lib/postprocess2.php
|
||||
$SED -i -e 's/WWW_DIR."\/lib\/tvrage.php"/"tvrage.php"/g' bin/lib/postprocess2.php
|
||||
#$SED -i -e 's/WWW_DIR."\/lib\/tvrage.php"/"tvrage.php"/g' bin/lib/postprocess2.php
|
||||
|
||||
$SED -i -e "s/processNfos()/processNfos1()/g" bin/lib/postprocess2.php
|
||||
$SED -i -e "s/processMovies()/processMovies1()/g" bin/lib/postprocess2.php
|
||||
|
||||
Reference in New Issue
Block a user