rework(ui/uix): total update of ui/ux
This commit is contained in:
@@ -202,3 +202,26 @@ def test_narrator_in_path_and_tags(client):
|
||||
/ "Harry Potter und der Stein der Weisen.mp3")
|
||||
assert dest.is_file()
|
||||
assert str(ID3(dest)["TCOM"]) == "Rufus Beck"
|
||||
|
||||
|
||||
def test_scan_rel_dir_and_request_update(client):
|
||||
lib_id = client.post("/api/libraries", json={
|
||||
"name": "A", "media_type": "audiobook", "root_path": str(client.tmp_path / "a"),
|
||||
}).json()["id"]
|
||||
|
||||
nested = client.downloads / "Sammlung" / "Sonderfolgen" / "CD1"
|
||||
nested.mkdir(parents=True)
|
||||
for i in range(2):
|
||||
(nested / f"t{i}.mp3").write_bytes(b"")
|
||||
item = client.get("/api/import/scan").json()["items"][0]
|
||||
assert item["name"] == "CD1"
|
||||
assert item["rel_dir"] == "Sammlung/Sonderfolgen"
|
||||
|
||||
req = client.post("/api/requests", json={"library_id": lib_id, "title": "X"}).json()
|
||||
updated = client.put(f"/api/requests/{req['id']}", json={
|
||||
"library_id": lib_id, "title": "X", "narrator": "Rufus Beck",
|
||||
"series": "HP", "volume": 1,
|
||||
}).json()
|
||||
assert updated["narrator"] == "Rufus Beck"
|
||||
assert updated["series"] == "HP"
|
||||
assert client.get("/api/requests", params={"status": "missing"}).json()[0]["narrator"] == "Rufus Beck"
|
||||
|
||||
Reference in New Issue
Block a user