mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-31 10:18:55 +00:00
Remove old code for release sizes that caused issues in additional postporcessing in PHP8
This commit is contained in:
@@ -507,13 +507,9 @@ class ProcessAdditional
|
||||
$this->_maximumRarPasswordChecks = ($this->_maximumRarPasswordChecks < 1 ? 1 : $this->_maximumRarPasswordChecks);
|
||||
|
||||
// Maximum size of releases in GB.
|
||||
$this->_maxSize =
|
||||
(Settings::settingValue('..maxsizetopostprocess') !== '') ? (int) Settings::settingValue('..maxsizetopostprocess') : 100;
|
||||
$this->_maxSize = ($this->_maxSize > 0 ? ('AND r.size < '.((int) $this->_maxSize * 1073741824)) : '');
|
||||
$this->_maxSize = (Settings::settingValue('..maxsizetopostprocess') !== '') ? (int) Settings::settingValue('..maxsizetopostprocess') : 100;
|
||||
// Minimum size of releases in MB.
|
||||
$this->_minSize =
|
||||
(Settings::settingValue('..minsizetopostprocess') !== '') ? (int) Settings::settingValue('..minsizetopostprocess') : 100;
|
||||
$this->_minSize = ($this->_minSize > 0 ? ('AND r.size > '.((int) $this->_minSize * 1048576)) : '');
|
||||
$this->_minSize = (Settings::settingValue('..minsizetopostprocess') !== '') ? (int) Settings::settingValue('..minsizetopostprocess') : 100;
|
||||
|
||||
// Use the alternate NNTP provider for downloading Message-ID's ?
|
||||
$this->_alternateNNTP = (int) Settings::settingValue('..alternate_nntp') === 1;
|
||||
@@ -656,6 +652,7 @@ class ProcessAdditional
|
||||
->where('categories.disablepreview', '=', 0);
|
||||
if ($this->_maxSize > 0) {
|
||||
$releasesQuery->where('releases.size', '<', (int) $this->_maxSize * 1073741824);
|
||||
|
||||
}
|
||||
if ($this->_minSize > 0) {
|
||||
$releasesQuery->where('releases.size', '>', (int) $this->_minSize * 1048576);
|
||||
|
||||
Reference in New Issue
Block a user