mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-03-06 19:57:26 -08:00
build: expand typecheck coverage beyond src
This commit is contained in:
@@ -284,8 +284,10 @@ export function parseEpisodePathFromDisplay(
|
||||
const normalized = display.trim().replace(/\s+/g, ' ');
|
||||
const match = normalized.match(/^(.*?)\s+S(\d{1,2})E\d{1,3}\b/i);
|
||||
if (!match) return null;
|
||||
const seriesName = match[1].trim();
|
||||
const seasonNumber = Number.parseInt(match[2], 10);
|
||||
const seriesName = match[1]?.trim();
|
||||
const seasonText = match[2];
|
||||
if (!seriesName || !seasonText) return null;
|
||||
const seasonNumber = Number.parseInt(seasonText, 10);
|
||||
if (!seriesName || !Number.isFinite(seasonNumber) || seasonNumber < 0) return null;
|
||||
return { seriesName, seasonNumber };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user