mirror of
https://github.com/MrPatben8/konduktor.git
synced 2026-11-27 10:22:51 +01:00
Added setting for export playlist root folder toggle
This commit is contained in:
1 parent
2c352b76a1
commit
3385b794e9
12 files changed
+113
-40
No files matched your search
@@ -173,9 +173,23 @@ for platform, reopen in (
|
||||
|
||||
tree.clear()
|
||||
walk(back.playlist_tree())
|
||||
check("a folder named after the export", ("GIG",) in tree)
|
||||
check("nested folders are preserved", ("GIG", "House") in tree)
|
||||
check("no folder named after the export by default", ("GIG",) not in tree)
|
||||
check("nested folders are preserved, at the top level", ("House",) in tree)
|
||||
check("with the playlist inside",
|
||||
("House", "Peak Time") in tree
|
||||
and tree[("House", "Peak Time")].count == len(chosen))
|
||||
|
||||
print(f"-- {platform}: with the root-folder setting")
|
||||
rooted_root = Path(tempfile.mkdtemp()) / "GIG"
|
||||
rooted_payload = build(rooted_root)
|
||||
rooted_payload.root_folder = True
|
||||
exporter.write(rooted_payload, rooted_root)
|
||||
rooted = reopen(rooted_root)
|
||||
tree.clear()
|
||||
walk(rooted.playlist_tree())
|
||||
check("one top-level node: a folder named after the export",
|
||||
[n.name for n in rooted.playlist_tree()] == ["GIG"])
|
||||
check("the tree nests inside it",
|
||||
("GIG", "House", "Peak Time") in tree
|
||||
and tree[("GIG", "House", "Peak Time")].count == len(chosen))
|
||||
|
||||
|
||||
Reference in new issue
Block a user