diff --git a/mnamer/metadata.py b/mnamer/metadata.py index df43382a..9117ea3b 100644 --- a/mnamer/metadata.py +++ b/mnamer/metadata.py @@ -112,6 +112,7 @@ class MetadataMovie(Metadata): name: str | None = None year: str | None = None + release_name: str | None = None id_imdb: str | None = None id_tmdb: str | None = None diff --git a/mnamer/target.py b/mnamer/target.py index cd9927e2..fc876831 100644 --- a/mnamer/target.py +++ b/mnamer/target.py @@ -122,6 +122,7 @@ def _parse(self, file_path: Path): file_path = Path(self.source.parent, self.source.stem[:-2]) except MnamerException: pass + path_data["release_name"] = file_path.parent.name options = {"type": self._settings.media, "language": path_data["language"]} raw_data = dict(guessit(str(file_path), options)) if isinstance(raw_data.get("season"), list): @@ -179,6 +180,7 @@ def _parse(self, file_path: Path): if isinstance(self.metadata, MetadataMovie): self.metadata.name = path_data.get("title") self.metadata.year = path_data.get("year") + self.metadata.release_name = path_data.get("release_name") elif isinstance(self.metadata, MetadataEpisode): self.metadata.date = path_data.get("date") self.metadata.episode = path_data.get("episode")