diff --git a/PTT/__init__.py b/PTT/__init__.py index 2de63c5..df25cc3 100644 --- a/PTT/__init__.py +++ b/PTT/__init__.py @@ -5,13 +5,15 @@ add_defaults(_parser) -def parse_title(raw_title: str, translate_langs: bool = False) -> dict: +def parse_title(raw_title: str, translate_languages: bool = False) -> dict: """ Parse the given input string using the initialized parser instance. + :param raw_title: The input raw torrent title to parse. + :param translate_languages: Whether to translate language codes to language names or short codes (default: False returns short codes) :return: A dictionary with the parsed results. """ - return _parser.parse(raw_title, translate_langs) + return _parser.parse(raw_title, translate_languages) __all__ = ["Parser", "add_defaults", "parse", "parse_title", "handlers", "transformers"] diff --git a/PTT/parse.py b/PTT/parse.py index f36cb52..4b2a04a 100644 --- a/PTT/parse.py +++ b/PTT/parse.py @@ -215,6 +215,7 @@ def parse(self, title: str, translate_languages: bool = False) -> Dict[str, Any] Parse a release title and return the parsed data as a dictionary. :param title: The release title to parse. + :param translate_languages: Whether to translate language codes to language names or short codes (default: False returns short codes) :return: A dictionary containing the parsed data. """ title = regex.sub(r"_+", " ", title)