diff --git a/src/structures.py b/src/structures.py index de4935e..536e842 100644 --- a/src/structures.py +++ b/src/structures.py @@ -1,6 +1,7 @@ from dataclasses import dataclass from enum import Enum from pathlib import Path +from os import path class FileCategory(Enum): @@ -48,9 +49,31 @@ class FileClassification: original_path: Path """Original Path to file, before any processing.""" + parent_path: "PathClassification" + """Parent path classification that the file is a part of.""" + category: FileCategory = FileCategory.UNCLASSIFIED """Category of file content.""" + new_file_name: str | None = None + """New file name if not None.""" + + season_no: int | None = None + """Season number in case if category is EPISODE.""" + + episode_no: int | None = None + """Episode number in case if category is EPISODE.""" + + @property + def new_path(self) -> Path: + """New Path.""" + return Path( + path.join( + self.parent_path.path, + f"{self.new_file_name}{self.original_path.suffix}", + ) + ) + @dataclass class PathClassification: