Added
- API Integration Package
- TVDB API client with authentication, caching, and rate limiting
- Supports search for TV series by name
- Retrieves series details and episode information
- Token management and automatic refresh
- Request caching for better performance
- TMDB API client with configuration, search, and details functionality
- AniDB API client with UDP/HTTP combined access for anime metadata
- Combined UDP and HTTP API access
- Anime search and metadata retrieval
- Episode information with titles
- Rate limiting and session management
- TVMaze API client with comprehensive show and person data
- Show search by name and retrieval by ID
- Episode information and specific episode lookup
- Cast information for shows
- People search functionality
- Efficient caching and rate limiting
- Local LLM client using Ollama with Deepseek R1 8b
- Media metadata analysis and filename suggestions
- Comprehensive test suite for all API clients
- Metadata Management System
- MetadataManager for aggregating results from multiple sources
- Unified search interface across all metadata providers
- Intelligent filename matching and metadata extraction
- Confidence-based result ranking
- Efficient caching mechanism
- Customizable match threshold
- Text similarity scoring for better matching
- Comprehensive test coverage
- Enhanced metadata-episode integration
- Special episode metadata retrieval and formatting
- Multi-episode metadata handling for sequential and non-sequential episodes
- Improved match detection for episode types
- Support for various episode naming conventions
- Interactive CLI Configuration
- New `configure` command for interactive API key setup
- Securely stores API keys and other settings
- Guides users through setup process for all API services
- Support for optional services configuration
- Test coverage for all configuration scenarios
- Enhanced episode handling:
- Multi-episode detection with support for various formats (S01E01E02, S01E01-E02, etc.)
- Episode range parsing with limits for very large ranges
- Special episode detection (OVAs, specials, movies)
- Season pack organization functionality
- Support for concatenated episodes (non-sequential episodes in one file)
- Intelligent filename generation from metadata for all episode types
- Anthology show support with configurable mode
- Title-based episode matching with confidence scoring
- Directory structure inference for incomplete metadata
- Configurable title vs. episode number priority
- Enhanced metadata integration for anthology shows
- Improved episode title matching system
- Fuzzy matching for episode titles
- Configurable confidence thresholds
- Intelligent episode number override based on title matches
- Updated filename generation to support multi-episode files
- Preview rename functionality now supports multi-episode files
- Template System for Media File Names
- Customizable templates for TV shows, movies, and anime
- Support for special episodes and different media types
- Template registration and management system
- Default templates for common naming formats (Plex, Kodi, etc.)
- Template application with format string parsing
- Preview System
- Advanced preview generator for showing proposed changes
- Interactive diff display for file operations
- Batch preview functionality for multiple files
- Interactive approval system for changes
- CLI Template Commands
- New `templates` command with `list` and `show` subcommands
- Interactive template preview functionality
- Support for viewing all registered templates
- Enhanced test coverage for all template commands
- Comprehensive Documentation
- Getting Started guide with step-by-step instructions
- Template System documentation
- Command reference for all CLI operations
- Troubleshooting section with common issues and solutions
Changed
- Completed refactoring of the template system:
- Split large name_templates.py module (1200+ lines) into smaller, focused modules
- Created new modules: template_types.py, template_manager.py, template_formatter.py,
multi_episode_formatter.py, default_formatters.py, template_registry.py, and file_utils.py
- Improved type annotations and docstrings throughout
- Enhanced test coverage with dedicated test files for each module
- Fixed circular dependencies and improved code organization
- Added clear interfaces between modules
- Improved MediaType enum compatibility and consolidation:
- Created type-safe compatibility layers for existing MediaType implementations
- Fixed attribute access on enum instances with proper type annotations
- Enhanced backward compatibility between core, parser, and fetcher MediaType variants
- Added type variables and improved generics for better static analysis
- Enhanced template formatting system:
- Added `get_default_template` function for consistent template defaults
- Implemented support for multi-episode formatting in template strings
- Created template directory structure for future customization
- Fixed type issues in template formatter functions
- Added proper deprecation warnings for obsolete functions
- Improved test compatibility with mocking support
- Added proper handling for special test cases
Deprecated
- None
Removed
- Removed name_templates.py after completing refactoring into smaller modules
- Removed redundant backup test files that were moved to proper locations
- Removed temporary helper scripts (move_tests.py and check_syntax.py) that were used during refactoring
Fixed
- Comprehensive type annotation improvements for test files
- Added mypy type checking with `--disallow-untyped-defs` for all test files
- Fixed type annotations in test mocks and fixtures
- Created properly typed conftest.py for pytest fixtures
- Fixed failing tests in metadata manager
- Improved mocking strategy for MetadataManager.fetch_metadata
- Added proper error handling for invalid IDs
- Enhanced test coverage for edge cases
- Removed unused variables in test files
- Improved code quality throughout test codebase
- Added typing_roadmap.md to track typing progress
- Fixed various mypy typing issues:
- Improved type annotations in safe_cast.py with proper generic support
- Fixed typing in the template system and formatter modules
- Added proper typing for the multi-episode formatter
- Resolved MediaType enum typing issues across multiple modules
- Added mypy-specific directives where needed for compatibility with older Python versions
- Ensured type-safe instance attribute access on enum instances
- Fixed template formatter tests:
- Resolved test failures in multi-episode formatting
- Fixed template application with proper error handling
- Ensured consistent behavior in template registry functionality
- Added comprehensive test cases for all template formatter functions
- Fixed inconsistencies between test files and implementation
Security
- None