Enhance project structure and add new files for enrichment and analysis

- Updated AGENTS.md to reflect changes in CLI commands and module organization, including the addition of an enrichment step and new functional modules.
- Introduced analysis.json, identities.json, inventory.csv, and plan.json to support enriched metadata and execution planning.
- Added CODE_IMPROVEMENTS.md to document identified code issues and proposed solutions for future enhancements.
- Updated README.md to include new enrichment features and configuration options.
- Removed unused dependency on ffmpeg-python from pyproject.toml.

These changes improve the overall functionality and maintainability of the Video Library Manager project.
This commit is contained in:
windyboy
2026-02-10 16:56:17 +08:00
parent f0c951ad7f
commit dcd87754cf
39 changed files with 145509 additions and 642 deletions
+44
View File
@@ -180,6 +180,48 @@ categories:
assert config.categories["movie"] == ["movie", "movies", "films"]
assert config.categories["series"] == ["series", "tv", "shows"]
def test_load_config_with_tmdb_settings(self, tmp_path):
"""Test loading TMDB auth and query preferences from config."""
config_file = tmp_path / "config.yaml"
config_file.write_text("""
library_root: /test/library
enrichment:
api_keys:
tmdb_bearer: bearer-token
tmdb:
language: zh-TW
region: TW
include_adult: false
""")
config = load_config(config_file)
assert config.tmdb_bearer_token == "bearer-token"
assert config.tmdb_language == "zh-TW"
assert config.tmdb_region == "TW"
assert config.tmdb_include_adult is False
def test_load_config_with_enrich_alias(self, tmp_path):
"""Test loading enrichment settings from `enrich` alias."""
config_file = tmp_path / "config.yaml"
config_file.write_text("""
library_root: /test/library
enrich:
enabled: false
providers: [tmdb]
api_keys:
tmdb_bearer: alias-bearer-token
tmdb:
language: en-US
""")
config = load_config(config_file)
assert config.enrichment_enabled is False
assert config.enrichment_providers == ["tmdb"]
assert config.tmdb_bearer_token == "alias-bearer-token"
assert config.tmdb_language == "en-US"
class TestCreateDefaultConfig:
"""Test create_default_config function."""
@@ -211,6 +253,8 @@ class TestCreateDefaultConfig:
assert 'templates' in data
assert 'log_level' in data
assert 'quarantine_dir' in data
assert 'enrichment' in data
assert 'enrich' in data
def test_create_default_config_creates_parent_dirs(self, tmp_path):
"""Test that create_default_config creates parent directories."""