mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-29 09:18:54 +00:00
41 lines
896 B
PHP
Executable File
41 lines
896 B
PHP
Executable File
<?php
|
|
|
|
$newzpath = getenv('NEWZPATH');
|
|
require_once("$newzpath/www/config.php");
|
|
require_once("lib/postprocess2.php");
|
|
|
|
$db = new DB();
|
|
$query = "select count(*) from releases r left join category c on c.ID = r.categoryID where ((r.passwordstatus between -6 and -1) or (r.haspreview = -1 and c.disablepreview = 0))";
|
|
|
|
$i=1;
|
|
while($i=1)
|
|
{
|
|
$result = mysql_query($query);
|
|
|
|
if (empty($result)) {
|
|
$result = $db->queryDirect($query);
|
|
if (empty($result)) {
|
|
$message = 'Invalid query: ' . mysql_error() . "\n";
|
|
$message .= 'Whole query: ' . $query;
|
|
die($message);
|
|
}
|
|
}
|
|
|
|
while ($row = mysql_fetch_assoc($result)) {
|
|
$count = $row['count(*)'];
|
|
}
|
|
|
|
if ($count > 10) {
|
|
$postprocess = new PostProcess2(true);
|
|
$postprocess->processAdditional2();
|
|
} else {
|
|
echo "$count releases left to process\n";
|
|
sleep(15);
|
|
}
|
|
}
|
|
|
|
mysql_free_result($result);
|
|
|
|
?>
|
|
|