Skip to content

Commit

Permalink
add playlist text fixtures
Browse files Browse the repository at this point in the history
  • Loading branch information
azuline committed Oct 25, 2023
1 parent 41f7b82 commit b3d70de
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ Commands:
collages Manage collages.
fs Manage the virtual library.
releases Manage releases.
playlists Manage playlists.
```

## Configuration
Expand Down
12 changes: 12 additions & 0 deletions conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
TEST_RELEASE_2 = TESTDATA / "Test Release 2"
TEST_RELEASE_3 = TESTDATA / "Test Release 3"
TEST_COLLAGE_1 = TESTDATA / "Collage 1"
TEST_PLAYLIST_1 = TESTDATA / "Playlist 1"
TEST_TAGGER = TESTDATA / "tagger"


Expand Down Expand Up @@ -151,6 +152,16 @@ def seeded_cache(config: Config) -> None:
(collage_name, release_id, position)
VALUES ('Rose Gold' , 'r1' , 0)
, ('Rose Gold' , 'r2' , 1);
INSERT INTO playlists
(name , source_mtime)
VALUES ('Lala Lisa' , '999')
, ('Turtle Rabbit', '999');
INSERT INTO playlists_tracks
(playlist_name, track_id, position)
VALUES ('Lala Lisa' , 't1' , 0)
, ('Lala Lisa' , 't3' , 1);
""" # noqa: E501
)

Expand All @@ -166,6 +177,7 @@ def source_dir(config: Config) -> Path:
shutil.copytree(TEST_RELEASE_2, config.music_source_dir / TEST_RELEASE_2.name)
shutil.copytree(TEST_RELEASE_3, config.music_source_dir / TEST_RELEASE_3.name)
shutil.copytree(TEST_COLLAGE_1, config.music_source_dir / "!collages")
shutil.copytree(TEST_PLAYLIST_1, config.music_source_dir / "!playlists")
update_cache(config)
return config.music_source_dir

Expand Down
6 changes: 6 additions & 0 deletions testdata/Playlist 1/Lala Lisa.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[[tracks]]
uuid = "iloveloona"
description_meta = "lalala"
[[tracks]]
uuid = "ilovetwice"
description_meta = "hahaha"
Binary file modified testdata/Test Release 2/01.m4a
Binary file not shown.
Binary file modified testdata/Test Release 2/02.m4a
Binary file not shown.

0 comments on commit b3d70de

Please sign in to comment.