feat: Refactor formatting and extraction logic

- Added `langcodes` dependency for improved language handling.
- Replaced `ColorFormatter` with `TextFormatter` for consistent text styling across the application.
- Introduced `TrackFormatter` for better track information formatting.
- Updated `MediaFormatter` to utilize new formatting methods and improved data handling.
- Refactored `MediaExtractor` to enhance data extraction logic and improve readability.
- Removed deprecated `ColorFormatter` methods and replaced them with `TextFormatter` equivalents.
- Added new methods for extracting and formatting audio and subtitle tracks.
- Updated tests to reflect changes in the extraction logic and formatting.
This commit is contained in:
sha
2025-12-26 11:33:24 +00:00
parent d2ec235458
commit 1d6eb9593e
15 changed files with 544 additions and 285 deletions
+1 -7
View File
@@ -29,10 +29,4 @@ class TestMediaInfoExtractor:
"""Test extracting audio languages"""
langs = extractor.extract_audio_langs(test_file)
# Text files don't have audio tracks
assert langs == ''
def test_extract_video_dimensions(self, extractor, test_file):
"""Test extracting video dimensions"""
dims = extractor.extract_video_dimensions(test_file)
# Text files don't have video dimensions
assert dims is None
assert langs == ''