Closed mhdzumair closed 4 months ago
The updates enhance the parsett
library by refining parsing functions, adding type hints, and improving code readability. New functions and additional non-English character support were integrated. Tests were updated to align with parsing changes, and .gitignore
now excludes .idea/
files. Documentation has been improved for clarity.
File(s) | Change Summary |
---|---|
.gitignore |
Excluded .idea/ directory. |
PTT/__init__.py |
Added parse_title function and included it in __all__ list. |
PTT/parse.py |
Refactored functions with type hints, added non-English characters, and improved code readability. |
PTT/transformers.py |
Updated functions with type hints and enhanced logic for better input handling. |
README.md |
Improved documentation and clarified function signatures and usage. |
tests/test_site.py |
Introduced test_group_detection for site detection via PTT.parse_title . |
tests/test_title.py |
Refactored tests to use PTT.parse_title instead of parser.parse . |
tests/test_audio.py |
Reformatted parameterization for better readability without changing logic. |
tests/test_size.py |
Added new tests for size detection using PTT.parse_title . |
sequenceDiagram
participant User
participant PTT
participant Parser
participant Transformers
User ->> PTT: Call `parse_title`
PTT ->> Parser: Initialize and call `parse`
Parser ->> Transformers: Apply transformers
Transformers -->> Parser: Return transformed data
Parser -->> PTT: Return parsed result
PTT -->> User: Return parsed title as dictionary
A rabbit hops with code so bright,
Through fields of lines, both day and night.
It parses titles, non-English too,
With type hints guiding what to do.
Now tests align, the code refined,
In this update, improvements shine.
A leap ahead, with joy anew! 🐇✨
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
I've changed so much stuff on my own, as I was also working on a large commit lol. I've taken a lot of stuff out as well from here as I had already started working on it before the PR.
How are things running for you currently though? I am currently adding more handlers as well
Cool. I'm almost done with the changes and ready to release the changes for MediaFusion. Its working great. There are some slightly off case scenarios like typos in the naming conventions, ex:
"www,1TamilMV.phd - The Great Indian Suicide (2023) Tamil TRUE WEB-DL - 4K SDR - HEVC - (DD+5.1 - 384Kbps & AAC) - 3.2GB - ESub.mkv"
"ww.Tamilblasters.sbs - 8 Bit Christmas (2021) HQ HDRip - x264 - Telugu (Fan Dub) - 400MB].mkv"
"www.1TamilMV.pics - 777 Charlie (2022) Tamil HDRip - 720p - x264 - HQ Clean Aud - 1.4GB.mkv"
1, 2 having typos in the URL. But 3rd one, not sure what's wrong with. The title should be 777 Charlie
however it's parsing as '777 Charlie Tamil - - - - .'
Ah yes, I can work on these
alright I've merged my changes and changes from this into main, so we should be roughly on the same page now
If I missed something, just submit a new PR. I'll handle the next PR better lol. Apologies!
I do have more stuff coming possibly as I'm trying to migrate some things from PTN over to this so that we can support everything. I've gotta work on RTN changes now, I have a large update coming for that as well.
Summary by CodeRabbit
New Features
Refactor
extend_options
,create_handler_from_regexp
,clean_title
, andParser
class methods.Tests