fixed omnibus for audio books
This commit is contained in:
@@ -190,6 +190,14 @@ def test_write_agent_log_serializes_metadata_as_json_object(tmp_path) -> None:
|
||||
assert record["path"] == str(tmp_path)
|
||||
|
||||
|
||||
def test_system_prompt_instructs_agent_to_detect_omnibuses() -> None:
|
||||
prompt = metadata_agent.system_prompt()
|
||||
|
||||
assert "Detect omnibus or box-set editions" in prompt
|
||||
assert "books-1-3" in prompt
|
||||
assert "Keep series_index as the" in prompt
|
||||
|
||||
|
||||
def test_standard_book_metadata_accepts_valid_tool_output(tmp_path, monkeypatch, audiobook_engine) -> None:
|
||||
install_fake_ollama(
|
||||
monkeypatch,
|
||||
@@ -928,7 +936,16 @@ def test_main_dry_run_prints_outputs_without_converting(tmp_path, monkeypatch, c
|
||||
|
||||
assert calls == []
|
||||
assert capsys.readouterr().out == (
|
||||
f"{source} -> "
|
||||
f"{source} -> {output_directory / 'charles_lamb-alice_01-alice' / 'charles_lamb-alice_01-alice.m4b'}\n"
|
||||
)
|
||||
dry_run_file = (
|
||||
output_directory
|
||||
/ ".audible_convert"
|
||||
/ "dry-run"
|
||||
/ "charles_lamb-alice_01-alice"
|
||||
/ "charles_lamb-alice_01-alice.m4b"
|
||||
)
|
||||
assert dry_run_file.read_text(encoding="utf-8") == (
|
||||
f"{output_directory / 'charles_lamb-alice_01-alice' / 'charles_lamb-alice_01-alice.m4b'}\n"
|
||||
)
|
||||
assert (output_directory / ".audible_convert" / "logs").is_dir()
|
||||
|
||||
Reference in New Issue
Block a user