Files
newznab-tmux/app/Services/TvProcessor.php
T
DariusIII 97a9e32b76 CS fixes
2025-08-15 13:03:18 +02:00

36 lines
1.0 KiB
PHP

<?php
namespace App\Services;
use App\Models\Settings;
use Blacklight\processing\tv\TMDB;
use Blacklight\processing\tv\TraktTv;
use Blacklight\processing\tv\TVDB;
use Blacklight\processing\tv\TVMaze;
class TvProcessor
{
private bool $echooutput;
public function __construct(bool $echooutput)
{
$this->echooutput = $echooutput;
}
/**
* Process all TV related releases across supported providers.
*
* @param int|string|null $processTV 0/1/2 or '' to read from settings
*/
public function process(string $groupID = '', string $guidChar = '', int|string|null $processTV = ''): void
{
$processTV = (is_numeric($processTV) ? $processTV : Settings::settingValue('lookuptv'));
if ($processTV > 0) {
(new TVDB)->processSite($groupID, $guidChar, $processTV);
(new TVMaze)->processSite($groupID, $guidChar, $processTV);
(new TMDB)->processSite($groupID, $guidChar, $processTV);
(new TraktTv)->processSite($groupID, $guidChar, $processTV);
}
}
}