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:
@@ -134,3 +134,48 @@ enrichment:
|
||||
|
||||
assert result.exit_code == 1
|
||||
assert "mutually exclusive" in result.output
|
||||
|
||||
|
||||
def test_enrich_prints_text_progress_when_not_tty(tmp_path):
|
||||
"""Non-TTY execution should emit textual progress updates."""
|
||||
library_root = tmp_path / "library"
|
||||
library_root.mkdir(parents=True)
|
||||
|
||||
config_file = tmp_path / "config.yaml"
|
||||
config_file.write_text(
|
||||
f"""
|
||||
library_root: {library_root}
|
||||
categories:
|
||||
movie: [movie, movies]
|
||||
series: [series, tv, shows]
|
||||
anime: [anime]
|
||||
enrichment:
|
||||
cache_db: {tmp_path / 'cache.db'}
|
||||
""".strip()
|
||||
)
|
||||
|
||||
identities_file = tmp_path / "identities.json"
|
||||
identities_file.write_text(json.dumps({
|
||||
"metadata": {},
|
||||
"movies": [
|
||||
{
|
||||
"path": "/library/movie/Test.2024.mkv",
|
||||
"filename": "Test.2024.mkv",
|
||||
"category": "movie",
|
||||
"title": "Test",
|
||||
"year": 2024,
|
||||
"confidence": 0.9,
|
||||
"needs_review": False,
|
||||
}
|
||||
],
|
||||
"series": [],
|
||||
"anime": [],
|
||||
"other": [],
|
||||
}))
|
||||
|
||||
runner = CliRunner()
|
||||
result = runner.invoke(main, ["--config", str(config_file), "enrich", "--input", str(identities_file)])
|
||||
|
||||
assert result.exit_code == 0
|
||||
assert "Progress: 1/1 (100%)" in result.output
|
||||
assert "Skip reasons: no_key=1" in result.output
|
||||
|
||||
Reference in New Issue
Block a user