Files
newznab-tmux/app/Services/Categorization/Pipes/MiscPipe.php
T
DariusIII 0c6ce9974a CS fixes
2026-01-07 14:51:28 +01:00

35 lines
922 B
PHP

<?php
namespace App\Services\Categorization\Pipes;
use App\Services\Categorization\CategorizationResult;
use App\Services\Categorization\Categorizers\MiscCategorizer;
use App\Services\Categorization\ReleaseContext;
/**
* Pipe for miscellaneous content and hash detection.
* This runs FIRST with high priority to detect hashes early and prevent
* them from being incorrectly categorized by group-based or content-based rules.
*/
class MiscPipe extends AbstractCategorizationPipe
{
protected int $priority = 1; // Run first to catch hashes early
private MiscCategorizer $categorizer;
public function __construct()
{
$this->categorizer = new MiscCategorizer;
}
public function getName(): string
{
return 'Misc';
}
protected function categorize(ReleaseContext $context): CategorizationResult
{
return $this->categorizer->categorize($context);
}
}