mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-29 02:01:33 +00:00
added option to set number of subfolders to import from
This commit is contained in:
@@ -57,7 +57,7 @@
|
||||
|
||||
* Any variable in defaults.sh can be changed, except the paths to the commands, and the changed will take effect on the next loop of the monitor. By default, the monitor loops every 30 seconds
|
||||
|
||||
* If you connect using **putty**, then under Window/Translation set Remote character set to UTF-8. To use 256 colors, you must set Connection/Data Terminal-type string to "xterm-256color" and in Window/Colours check the top three boxes, otherwise only 16 colors are displayed.
|
||||
* If you connect using **putty**, then under Window/Translation set Remote character set to UTF-8 and check "Copy and paste line drawing characters". To use 256 colors, you must set Connection/Data Terminal-type string to "xterm-256color" and in Window/Colours check the top three boxes, otherwise only 16 colors are displayed.
|
||||
|
||||
* If you are using the powerline statusbar, you will most likely need a patch font. The Consolas ttf from [powerline-fonts](https://github.com/jonnyboy/powerline-fonts) is the only one that I have found to be nearly complete and work with putty and Win7. The otf fonts should be fine, although I am not able to test.
|
||||
|
||||
|
||||
@@ -18,12 +18,6 @@ if($subdir_count == 0){
|
||||
die();
|
||||
}
|
||||
|
||||
$ps = new PowerProcess;
|
||||
$ps->RegisterCallback('psUpdateComplete');
|
||||
$ps->maxThreads = 30;
|
||||
$ps->threadTimeLimit = 0;
|
||||
$selected = $subdir_count - 1;
|
||||
|
||||
$varnames = shell_exec("cat ../defaults.sh | grep ^export | cut -d \= -f1 | awk '{print $2;}'");
|
||||
$vardata = shell_exec('cat ../defaults.sh | grep ^export | cut -d \" -f2 | awk "{print $1;}"');
|
||||
$varnames = explode("\n", $varnames);
|
||||
@@ -31,6 +25,12 @@ $vardata = explode("\n", $vardata);
|
||||
$array = array_combine($varnames, $vardata);
|
||||
unset($array['']);
|
||||
|
||||
$ps = new PowerProcess;
|
||||
$ps->RegisterCallback('psUpdateComplete');
|
||||
$ps->maxThreads = $array['NZB_FOLDER_COUNT'];
|
||||
$ps->threadTimeLimit = 0;
|
||||
$selected = $subdir_count - 1;
|
||||
|
||||
echo "Starting threaded import process, {$array['NZBCOUNT']} per thread\n";
|
||||
|
||||
while ($ps->RunControlCode())
|
||||
|
||||
@@ -60,5 +60,4 @@ if [ -z "$IMPORT_MAX_ROWS" ]; then export ALLOW_START="false"; fi
|
||||
if [ -z "$BINARIES_MAX_ROWS" ]; then export ALLOW_START="false"; fi
|
||||
if [ -z "$BACKFILL_MAX_ROWS" ]; then export ALLOW_START="false"; fi
|
||||
if [ -z "$KILL_PROCESS" ]; then export ALLOW_START="false"; fi
|
||||
|
||||
|
||||
if [ -z "NZB_FOLDER_COUNT" ]; then export ALLOW_START="false"; fi
|
||||
|
||||
@@ -103,6 +103,9 @@ export IMPORT="false"
|
||||
#Instead of doing all 1 tye at once, spread the load
|
||||
export NZB_THREADS="false"
|
||||
|
||||
#Set max number of folders to process per loop. This includes empty folders.
|
||||
export NZB_FOLDER_COUNT="20"
|
||||
|
||||
#How many nzbs to import per loop, if using NZB_THREADS=true the per folder
|
||||
export NZBCOUNT="10"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user