commit remaining modified project files
This commit is contained in:
@@ -7,13 +7,7 @@ import re
|
||||
from pathlib import Path
|
||||
|
||||
from vlm.models import ExecutionPlan, FileOperation
|
||||
|
||||
|
||||
def _is_sample_path(path: Path) -> bool:
|
||||
parts = [part.casefold() for part in path.parts]
|
||||
if "sample" in parts:
|
||||
return True
|
||||
return bool(re.search(r"(^|[\s._-])sample($|[\s._-])", path.stem.casefold()))
|
||||
from vlm.utils import is_sample_path
|
||||
|
||||
|
||||
def _extract_season_episode(operation: FileOperation) -> tuple[int | None, int | None]:
|
||||
@@ -63,7 +57,7 @@ def review_plan(
|
||||
if "manual review" in reason_l:
|
||||
flags.append("manual_review")
|
||||
counters["manual_review"] += 1
|
||||
if _is_sample_path(op.source_path):
|
||||
if is_sample_path(op.source_path):
|
||||
flags.append("sample_source")
|
||||
counters["sample_source"] += 1
|
||||
season, episode = _extract_season_episode(op)
|
||||
@@ -100,3 +94,4 @@ def save_review_csv(rows: list[dict[str, str]], output: Path) -> None:
|
||||
writer = csv.DictWriter(f, fieldnames=fields)
|
||||
writer.writeheader()
|
||||
writer.writerows(rows)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user