mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-29 02:01:33 +00:00
Remove deprecated ProcessAdditional class
This commit is contained in:
@@ -13,9 +13,9 @@ use App\Services\NfoProcessor;
|
||||
use App\Services\Par2Processor;
|
||||
use App\Services\TvProcessor;
|
||||
use App\Services\XXXProcessor;
|
||||
use App\Services\AdditionalProcessing\AdditionalProcessingOrchestrator;
|
||||
use Blacklight\Nfo;
|
||||
use Blacklight\NNTP;
|
||||
use Blacklight\processing\post\ProcessAdditional;
|
||||
use dariusiii\rarinfo\Par2Info;
|
||||
|
||||
class PostProcess
|
||||
@@ -237,7 +237,7 @@ class PostProcess
|
||||
*/
|
||||
public function processAdditional(int|string $groupID = '', string $guidChar = ''): void
|
||||
{
|
||||
(new ProcessAdditional)->start($groupID, $guidChar);
|
||||
app(AdditionalProcessingOrchestrator::class)->start($groupID, $guidChar);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,99 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Blacklight\processing\post;
|
||||
|
||||
use App\Services\AdditionalProcessing\AdditionalProcessingOrchestrator;
|
||||
use App\Services\AdditionalProcessing\ArchiveExtractionService;
|
||||
use App\Services\AdditionalProcessing\Config\ProcessingConfiguration;
|
||||
use App\Services\AdditionalProcessing\ConsoleOutputService;
|
||||
use App\Services\AdditionalProcessing\MediaExtractionService;
|
||||
use App\Services\AdditionalProcessing\NzbContentParser;
|
||||
use App\Services\AdditionalProcessing\ReleaseFileManager;
|
||||
use App\Services\AdditionalProcessing\UsenetDownloadService;
|
||||
use App\Services\Categorization\CategorizationService;
|
||||
use App\Services\TempWorkspaceService;
|
||||
use App\Services\NameFixing\NameFixingService;
|
||||
use Blacklight\Nfo;
|
||||
use Blacklight\NZB;
|
||||
use Blacklight\ReleaseExtra;
|
||||
use Blacklight\ReleaseImage;
|
||||
use Exception;
|
||||
|
||||
/**
|
||||
* @deprecated Use App\Services\AdditionalProcessing\AdditionalProcessingOrchestrator instead.
|
||||
* This class is maintained for backward compatibility only.
|
||||
*
|
||||
* Additional release post-processing.
|
||||
* Handles NZB parsing, archive extraction, media processing, and release updates.
|
||||
*
|
||||
* The functionality has been refactored into separate services:
|
||||
* - ProcessingConfiguration: Configuration management
|
||||
* - NzbContentParser: NZB file parsing
|
||||
* - ArchiveExtractionService: Archive handling (RAR, ZIP, 7z, etc.)
|
||||
* - MediaExtractionService: Video/audio/image processing
|
||||
* - UsenetDownloadService: NNTP downloads
|
||||
* - ReleaseFileManager: Database operations
|
||||
* - ConsoleOutputService: CLI output
|
||||
* - AdditionalProcessingOrchestrator: Main coordinator
|
||||
*/
|
||||
class ProcessAdditional
|
||||
{
|
||||
/**
|
||||
* How many compressed (rar/zip) files to check.
|
||||
*/
|
||||
public const int maxCompressedFilesToCheck = 10;
|
||||
|
||||
private AdditionalProcessingOrchestrator $orchestrator;
|
||||
|
||||
/**
|
||||
* ProcessAdditional constructor.
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
// Build the orchestrator with all dependencies
|
||||
$config = new ProcessingConfiguration();
|
||||
|
||||
$this->orchestrator = new AdditionalProcessingOrchestrator(
|
||||
$config,
|
||||
new NzbContentParser(new NZB(), $config->debugMode, $config->echoCLI),
|
||||
new ArchiveExtractionService($config),
|
||||
new MediaExtractionService(
|
||||
$config,
|
||||
new ReleaseImage(),
|
||||
new ReleaseExtra(),
|
||||
new CategorizationService()
|
||||
),
|
||||
new UsenetDownloadService($config),
|
||||
new ReleaseFileManager(
|
||||
$config,
|
||||
new ReleaseExtra(),
|
||||
new ReleaseImage(),
|
||||
new Nfo(),
|
||||
new NZB(),
|
||||
new NameFixingService()
|
||||
),
|
||||
new TempWorkspaceService(),
|
||||
new ConsoleOutputService($config->echoCLI)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Start the additional processing.
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
public function start(string $groupID = '', string $guidChar = ''): void
|
||||
{
|
||||
$this->orchestrator->start($groupID, $guidChar);
|
||||
}
|
||||
|
||||
/**
|
||||
* Process only a single release by GUID.
|
||||
*/
|
||||
public function processSingleGuid(string $guid): bool
|
||||
{
|
||||
return $this->orchestrator->processSingleGuid($guid);
|
||||
}
|
||||
}
|
||||
@@ -3,9 +3,9 @@
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use App\Models\Settings;
|
||||
use App\Services\AdditionalProcessing\AdditionalProcessingOrchestrator;
|
||||
use Blacklight\Nfo;
|
||||
use Blacklight\NNTP;
|
||||
use Blacklight\processing\post\ProcessAdditional;
|
||||
use Blacklight\processing\PostProcess;
|
||||
use Illuminate\Console\Command;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
@@ -48,7 +48,7 @@ class PostProcessGuid extends Command
|
||||
switch ($type) {
|
||||
case 'additional':
|
||||
$nntp = $this->getNntp();
|
||||
(new ProcessAdditional(['Echo' => true, 'NNTP' => $nntp]))->start('', $guid);
|
||||
app(AdditionalProcessingOrchestrator::class)->start('', $guid);
|
||||
break;
|
||||
|
||||
case 'nfo':
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use App\Models\Release;
|
||||
use Blacklight\processing\post\ProcessAdditional;
|
||||
use App\Services\AdditionalProcessing\AdditionalProcessingOrchestrator;
|
||||
use Illuminate\Console\Command;
|
||||
|
||||
class ProcessAdditionalGuid extends Command
|
||||
@@ -80,7 +80,7 @@ class ProcessAdditionalGuid extends Command
|
||||
config(['nntmux.echocli' => false]);
|
||||
}
|
||||
|
||||
$processor = new ProcessAdditional;
|
||||
$processor = app(AdditionalProcessingOrchestrator::class);
|
||||
$ok = $processor->processSingleGuid($guid);
|
||||
|
||||
if (! $ok) {
|
||||
|
||||
@@ -6,11 +6,11 @@ namespace App\Console\Commands;
|
||||
|
||||
use App\Models\Settings;
|
||||
use App\Models\UsenetGroup;
|
||||
use App\Services\AdditionalProcessing\AdditionalProcessingOrchestrator;
|
||||
use App\Services\Backfill\BackfillService;
|
||||
use App\Services\Binaries\BinariesService;
|
||||
use Blacklight\Nfo;
|
||||
use Blacklight\NNTP;
|
||||
use Blacklight\processing\post\ProcessAdditional;
|
||||
use Blacklight\processing\ProcessReleases;
|
||||
use Illuminate\Console\Command;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
@@ -71,7 +71,7 @@ class UpdatePerGroup extends Command
|
||||
|
||||
// Post process the releases
|
||||
$this->info("Post-processing additional for group: {$groupMySQL['name']}");
|
||||
(new ProcessAdditional(['Echo' => true, 'NNTP' => $nntp]))->start($groupId);
|
||||
app(AdditionalProcessingOrchestrator::class)->start($groupId);
|
||||
|
||||
$this->info("Processing NFO files for group: {$groupMySQL['name']}");
|
||||
(new Nfo())->processNfoFiles(
|
||||
|
||||
Reference in New Issue
Block a user