mirror of
https://github.com/lampame/lampac-ukraine.git
synced 2026-06-17 12:08:54 +00:00
refactor(jacktor): simplify year validation logic in search filtering
Extract year extraction before conditional check and combine conditions into a single if statement. This improves readability without changing the filtering behavior.
This commit is contained in:
parent
5e551b2746
commit
5829c65426
@ -334,12 +334,9 @@ namespace LME.JackTor
|
||||
if (!IsCodecAllowed(codec))
|
||||
continue;
|
||||
|
||||
if (serial != 1)
|
||||
{
|
||||
int extractedYear = ExtractYear(searchable);
|
||||
if (year > 1900 && extractedYear > 1900 && Math.Abs(extractedYear - year) > yearTolerance)
|
||||
if (serial != 1 && year > 1900 && extractedYear > 1900 && Math.Abs(extractedYear - year) > yearTolerance)
|
||||
continue;
|
||||
}
|
||||
|
||||
int[] seasons = ParseSeasons(searchable);
|
||||
bool serialHint = IsSerialHint(searchable);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user