Add movie-keyed pool index with multi-version movies, ČSFD title bridge, subtitles and miniDLNA library scoping

This commit is contained in:
2026-09-13 17:16:48 +02:00
parent c0ad1c1553
commit c399a6aed3
26 changed files with 4635 additions and 221 deletions
+27
View File
@@ -942,3 +942,30 @@ class TestMirrorAsIs:
"""Neexistující zdroj nic neudělá"""
manager = HardlinkManager(tmp_path / "out")
assert manager.mirror_as_is(tmp_path / "missing", "Seriály") == (0, 0)
class TestRemoveMirror:
"""Removing a whole mirrored library (or one bucket entry) from the output."""
def test_removes_a_whole_mirrored_folder(self, tmp_path):
output = tmp_path / "out"
(output / "Dokumenty" / "sub").mkdir(parents=True)
(output / "Dokumenty" / "sub" / "clip.mp4").write_bytes(b"x")
manager = HardlinkManager(output)
assert manager.remove_mirror("Dokumenty") is True
assert not (output / "Dokumenty").exists()
def test_removes_one_bucket_entry_by_compound_name(self, tmp_path):
output = tmp_path / "out"
(output / "Seriály" / "Show A").mkdir(parents=True)
(output / "Seriály" / "Show B").mkdir(parents=True)
manager = HardlinkManager(output)
assert manager.remove_mirror("Seriály/Show A") is True
assert not (output / "Seriály" / "Show A").exists()
assert (output / "Seriály" / "Show B").exists() # sibling untouched
def test_missing_target_returns_false(self, tmp_path):
manager = HardlinkManager(tmp_path / "out")
assert manager.remove_mirror("Nope") is False