mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-29 01:08:56 +00:00
35 lines
760 B
PHP
35 lines
760 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Services;
|
|
|
|
use App\Models\Settings;
|
|
use App\Services\NNTP\NNTPService;
|
|
|
|
class NfoProcessor
|
|
{
|
|
private NfoService $nfo;
|
|
|
|
public function __construct(NfoService $nfo)
|
|
{
|
|
$this->nfo = $nfo;
|
|
}
|
|
|
|
/**
|
|
* Process NFO files if enabled by settings.
|
|
*/
|
|
public function process(NNTPService $nntp, string $groupID = '', string $guidChar = ''): void
|
|
{
|
|
if ((int) Settings::settingValue('lookupnfo') === 1) {
|
|
$this->nfo->processNfoFiles(
|
|
$nntp,
|
|
$groupID,
|
|
$guidChar,
|
|
(bool) Settings::settingValue('lookupimdb'),
|
|
(bool) Settings::settingValue('lookuptv')
|
|
);
|
|
}
|
|
}
|
|
}
|