release = $release; } /** * Initialize processing state based on configuration flags. * Sets "found" flags to true if processing is disabled (to skip those steps). */ public function initializeFromConfig( bool $processVideo, bool $processMediaInfo, bool $processAudioInfo, bool $processAudioSample, bool $processJPGSample, bool $processThumbnails ): void { $this->foundVideo = ! $processVideo; $this->foundMediaInfo = ! $processMediaInfo; $this->foundAudioInfo = ! $processAudioInfo; $this->foundAudioSample = ! $processAudioSample; $this->foundJPGSample = ! $processJPGSample; $this->foundSample = ! $processThumbnails; $this->foundPAR2Info = false; } /** * Reset message ID arrays for a fresh processing run. */ public function resetMessageIDs(): void { $this->sampleMessageIDs = []; $this->jpgMessageIDs = []; $this->mediaInfoMessageIDs = []; $this->audioInfoMessageIDs = []; $this->rarFileMessageIDs = []; $this->audioInfoExtension = ''; } /** * Reset file counters. */ public function resetCounters(): void { $this->addedFileInfo = 0; $this->totalFileInfo = 0; $this->compressedFilesChecked = 0; } /** * Full reset for processing a new release. */ public function reset(): void { $this->passwordStatus = 0; $this->releaseHasPassword = false; $this->nzbHasCompressedFile = false; $this->groupUnavailable = false; $this->resetMessageIDs(); $this->resetCounters(); } /** * Check if more media processing is needed. */ public function needsMediaProcessing(): bool { return ! $this->foundVideo || ! $this->foundMediaInfo || ! $this->foundAudioInfo || ! $this->foundAudioSample; } /** * Check if any sample is still needed. */ public function needsSample(): bool { return ! $this->foundSample || ! $this->foundJPGSample; } }