From cfe0dc5acec464fee1aae2010b9f97efe22114d7 Mon Sep 17 00:00:00 2001 From: blissful Date: Sun, 5 May 2024 23:52:30 -0400 Subject: [PATCH] switch to snapshottest --- .prettierignore | 1 + Makefile | 3 + conftest.py | 37 +- flake.nix | 1 + pyproject.toml | 1 + rose/__init__.py | 8 + rose/common.py | 16 + rose_cli/dump.py | 100 ++ rose_cli/dump_test.py | 1197 +---------------- rose_cli/snapshots/__init__.py | 0 rose_cli/snapshots/snap_dump_test.py | 1851 ++++++++++++++++++++++++++ 11 files changed, 2037 insertions(+), 1178 deletions(-) create mode 100644 rose_cli/snapshots/__init__.py create mode 100644 rose_cli/snapshots/snap_dump_test.py diff --git a/.prettierignore b/.prettierignore index a73c216..6257991 100644 --- a/.prettierignore +++ b/.prettierignore @@ -10,3 +10,4 @@ .pytest_cache .mypy_cache result +snapshots diff --git a/Makefile b/Makefile index 02898fe..0b7a74e 100644 --- a/Makefile +++ b/Makefile @@ -11,6 +11,9 @@ test-seq: pytest . coverage html +snapshot: + pytest --snapshot-update . + lintcheck: ruff format --check . ruff check . diff --git a/conftest.py b/conftest.py index a2fc72c..c5627f9 100644 --- a/conftest.py +++ b/conftest.py @@ -1,3 +1,4 @@ +import dataclasses import hashlib import logging import shutil @@ -100,6 +101,17 @@ def config(isolated_dir: Path) -> Config: @pytest.fixture() def seeded_cache(config: Config) -> None: + _seed_cache(config, True) + + +@pytest.fixture() +def static_cache(config: Config) -> None: + """A variant of the seeded cache with static hardcoded (fake) paths. Useful for snapshot tests.""" + config = dataclasses.replace(config, music_source_dir=Path("/dummy")) + _seed_cache(config, False) + + +def _seed_cache(config: Config, mkfiles: bool) -> None: dirpaths = [ config.music_source_dir / "r1", config.music_source_dir / "r2", @@ -246,18 +258,19 @@ def seeded_cache(config: Config) -> None: """, ) - (config.music_source_dir / "!collages").mkdir() - (config.music_source_dir / "!playlists").mkdir() - - for d in dirpaths: - d.mkdir() - (d / f".rose.{d.name}.toml").touch() - for f in musicpaths + imagepaths: - f.touch() - for cn in ["Rose Gold", "Ruby Red"]: - (config.music_source_dir / "!collages" / f"{cn}.toml").touch() - for pn in ["Lala Lisa", "Turtle Rabbit"]: - (config.music_source_dir / "!playlists" / f"{pn}.toml").touch() + if mkfiles: + (config.music_source_dir / "!collages").mkdir() + (config.music_source_dir / "!playlists").mkdir() + + for d in dirpaths: + d.mkdir() + (d / f".rose.{d.name}.toml").touch() + for f in musicpaths + imagepaths: + f.touch() + for cn in ["Rose Gold", "Ruby Red"]: + (config.music_source_dir / "!collages" / f"{cn}.toml").touch() + for pn in ["Lala Lisa", "Turtle Rabbit"]: + (config.music_source_dir / "!playlists" / f"{pn}.toml").touch() @pytest.fixture() diff --git a/flake.nix b/flake.nix index c02c53a..ef55553 100644 --- a/flake.nix +++ b/flake.nix @@ -44,6 +44,7 @@ pytest-timeout pytest-cov pytest-xdist + snapshottest ]; dev-cli = pkgs.writeShellScriptBin "rose" '' cd $ROSE_ROOT diff --git a/pyproject.toml b/pyproject.toml index e08d5d9..11a2580 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,6 +9,7 @@ exclude = [ ".mypy_cache", ".ruff_cache", ".venv", + "snapshots", ] [tool.ruff.lint] diff --git a/rose/__init__.py b/rose/__init__.py index 7f95e15..d0e3c69 100644 --- a/rose/__init__.py +++ b/rose/__init__.py @@ -65,7 +65,11 @@ from rose.common import ( VERSION, Artist, + ArtistDoesNotExistError, ArtistMapping, + DescriptorDoesNotExistError, + GenreDoesNotExistError, + LabelDoesNotExistError, RoseError, RoseExpectedError, initialize_logging, @@ -207,18 +211,22 @@ "artist_exists", "list_artists", "UnknownArtistRoleError", + "ArtistDoesNotExistError", # Genres "GenreEntry", "list_genres", "genre_exists", + "GenreDoesNotExistError", # Descriptors "DescriptorEntry", "list_descriptors", "descriptor_exists", + "DescriptorDoesNotExistError", # Labels "LabelEntry", "list_labels", "label_exists", + "LabelDoesNotExistError", # Collages "Collage", "add_release_to_collage", diff --git a/rose/common.py b/rose/common.py index 61bb64e..5cea58a 100644 --- a/rose/common.py +++ b/rose/common.py @@ -36,6 +36,22 @@ class RoseExpectedError(RoseError): pass +class GenreDoesNotExistError(RoseExpectedError): + pass + + +class LabelDoesNotExistError(RoseExpectedError): + pass + + +class DescriptorDoesNotExistError(RoseExpectedError): + pass + + +class ArtistDoesNotExistError(RoseExpectedError): + pass + + @dataclasses.dataclass class Artist: name: str diff --git a/rose_cli/dump.py b/rose_cli/dump.py index 0193d63..3af5cbe 100644 --- a/rose_cli/dump.py +++ b/rose_cli/dump.py @@ -4,14 +4,19 @@ from rose import ( CollageDoesNotExistError, Config, + DescriptorDoesNotExistError, + GenreDoesNotExistError, + LabelDoesNotExistError, MetadataMatcher, PlaylistDoesNotExistError, Release, ReleaseDoesNotExistError, Track, TrackDoesNotExistError, + descriptor_exists, find_releases_matching_rule, find_tracks_matching_rule, + genre_exists, get_collage, get_collage_releases, get_playlist, @@ -20,11 +25,17 @@ get_track, get_tracks_of_release, get_tracks_of_releases, + label_exists, list_collages, + list_descriptors, + list_genres, + list_labels, list_playlists, list_releases, list_tracks, ) +from rose.cache import artist_exists, list_artists, list_releases_delete_this +from rose.common import ArtistDoesNotExistError def release_to_json(r: Release) -> dict[str, Any]: @@ -129,6 +140,95 @@ def dump_all_tracks(c: Config, matcher: MetadataMatcher | None = None) -> str: return json.dumps([track_to_json(t) for t in tracks]) +def dump_artist(c: Config, artist_name: str) -> str: + if not artist_exists(c, artist_name): + raise ArtistDoesNotExistError(f"artist {artist_name} does not exist") + artist_releases = list_releases_delete_this(c, artist_filter=artist_name) + roles = _partition_releases_by_role(artist_name, artist_releases) + roles_json = {k: [release_to_json(x) for x in v] for k, v in roles.items()} + return json.dumps({"name": artist_name, "roles": roles_json}) + + +def dump_all_artists(c: Config) -> str: + out: list[dict[str, Any]] = [] + for name in list_artists(c): + artist_releases = list_releases_delete_this(c, artist_filter=name) + roles = _partition_releases_by_role(name, artist_releases) + roles_json = {k: [release_to_json(x) for x in v] for k, v in roles.items()} + out.append({"name": name, "roles": roles_json}) + return json.dumps(out) + + +def _partition_releases_by_role(artist: str, releases: list[Release]) -> dict[str, list[Release]]: + rval: dict[str, list[Release]] = { + "main": [], + "guest": [], + "remixer": [], + "producer": [], + "composer": [], + "conductor": [], + "djmixer": [], + } + for release in releases: + # It is possible for a release to end up in multiple roles. That's intentional. + for role, names in release.releaseartists.items(): + if any(artist == x.name for x in names): + rval[role].append(release) + break + return rval + + +def dump_genre(c: Config, genre_name: str) -> str: + if not genre_exists(c, genre_name): + raise GenreDoesNotExistError(f"Genre {genre_name} does not exist") + genre_releases = list_releases_delete_this(c, genre_filter=genre_name) + releases = [release_to_json(r) for r in genre_releases] + return json.dumps({"name": genre_name, "releases": releases}) + + +def dump_all_genres(c: Config) -> str: + out: list[dict[str, Any]] = [] + for name in list_genres(c): + genre_releases = list_releases_delete_this(c, genre_filter=name.genre) + releases = [release_to_json(r) for r in genre_releases] + out.append({"name": name, "releases": releases}) + return json.dumps(out) + + +def dump_label(c: Config, label_name: str) -> str: + if not label_exists(c, label_name): + raise LabelDoesNotExistError(f"label {label_name} does not exist") + label_releases = list_releases_delete_this(c, label_filter=label_name) + releases = [release_to_json(r) for r in label_releases] + return json.dumps({"name": label_name, "releases": releases}) + + +def dump_all_labels(c: Config) -> str: + out: list[dict[str, Any]] = [] + for name in list_labels(c): + label_releases = list_releases_delete_this(c, label_filter=name.label) + releases = [release_to_json(r) for r in label_releases] + out.append({"name": name, "releases": releases}) + return json.dumps(out) + + +def dump_descriptor(c: Config, descriptor_name: str) -> str: + if not descriptor_exists(c, descriptor_name): + raise DescriptorDoesNotExistError(f"descriptor {descriptor_name} does not exist") + descriptor_releases = list_releases_delete_this(c, descriptor_filter=descriptor_name) + releases = [release_to_json(r) for r in descriptor_releases] + return json.dumps({"name": descriptor_name, "releases": releases}) + + +def dump_all_descriptors(c: Config) -> str: + out: list[dict[str, Any]] = [] + for name in list_descriptors(c): + descriptor_releases = list_releases_delete_this(c, descriptor_filter=name.descriptor) + releases = [release_to_json(r) for r in descriptor_releases] + out.append({"name": name, "releases": releases}) + return json.dumps(out) + + def dump_collage(c: Config, collage_name: str) -> str: collage = get_collage(c, collage_name) if collage is None: diff --git a/rose_cli/dump_test.py b/rose_cli/dump_test.py index ebd1103..6579da2 100644 --- a/rose_cli/dump_test.py +++ b/rose_cli/dump_test.py @@ -1,4 +1,5 @@ import json +from typing import Any import pytest @@ -15,1189 +16,53 @@ ) -@pytest.mark.usefixtures("seeded_cache") -def test_dump_release(config: Config) -> None: - assert json.loads(dump_release(config, "r1")) == { - "id": "r1", - "source_path": f"{config.music_source_dir}/r1", - "cover_image_path": None, - "added_at": "0000-01-01T00:00:00+00:00", - "releasetitle": "Release 1", - "releasetype": "album", - "releasedate": "2023", - "compositiondate": None, - "catalognumber": None, - "new": False, - "disctotal": 1, - "genres": ["Techno", "Deep House"], - "parent_genres": [ - "Dance", - "Electronic", - "Electronic Dance Music", - "House", - ], - "labels": ["Silk Music"], - "originaldate": None, - "edition": None, - "secondary_genres": ["Rominimal", "Ambient"], - "parent_secondary_genres": [ - "Dance", - "Electronic", - "Electronic Dance Music", - "House", - "Tech House", - ], - "descriptors": ["Warm", "Hot"], - "releaseartists": { - "main": [ - {"name": "Techno Man", "alias": False}, - {"name": "Bass Man", "alias": False}, - ], - "guest": [], - "remixer": [], - "producer": [], - "composer": [], - "conductor": [], - "djmixer": [], - }, - "tracks": [ - { - "trackartists": { - "composer": [], - "djmixer": [], - "guest": [], - "main": [ - {"alias": False, "name": "Techno Man"}, - {"alias": False, "name": "Bass Man"}, - ], - "producer": [], - "remixer": [], - "conductor": [], - }, - "discnumber": "01", - "duration_seconds": 120, - "id": "t1", - "source_path": f"{config.music_source_dir}/r1/01.m4a", - "tracktitle": "Track 1", - "tracknumber": "01", - "tracktotal": 2, - }, - { - "trackartists": { - "composer": [], - "djmixer": [], - "guest": [], - "main": [ - {"alias": False, "name": "Techno Man"}, - {"alias": False, "name": "Bass Man"}, - ], - "producer": [], - "remixer": [], - "conductor": [], - }, - "discnumber": "01", - "duration_seconds": 240, - "id": "t2", - "source_path": f"{config.music_source_dir}/r1/02.m4a", - "tracktitle": "Track 2", - "tracknumber": "02", - "tracktotal": 2, - }, - ], - } +@pytest.mark.usefixtures("static_cache") +def test_dump_release(config: Config, snapshot: Any) -> None: + snapshot.assert_match(json.loads(dump_release(config, "r1"))) -@pytest.mark.usefixtures("seeded_cache") -def test_dump_releases(config: Config) -> None: - assert json.loads(dump_all_releases(config)) == [ - { - "id": "r1", - "source_path": f"{config.music_source_dir}/r1", - "cover_image_path": None, - "added_at": "0000-01-01T00:00:00+00:00", - "releasetitle": "Release 1", - "releasetype": "album", - "releasedate": "2023", - "compositiondate": None, - "catalognumber": None, - "new": False, - "disctotal": 1, - "genres": ["Techno", "Deep House"], - "parent_genres": [ - "Dance", - "Electronic", - "Electronic Dance Music", - "House", - ], - "labels": ["Silk Music"], - "originaldate": None, - "edition": None, - "secondary_genres": ["Rominimal", "Ambient"], - "parent_secondary_genres": [ - "Dance", - "Electronic", - "Electronic Dance Music", - "House", - "Tech House", - ], - "descriptors": ["Warm", "Hot"], - "releaseartists": { - "main": [ - {"name": "Techno Man", "alias": False}, - {"name": "Bass Man", "alias": False}, - ], - "guest": [], - "remixer": [], - "producer": [], - "composer": [], - "conductor": [], - "djmixer": [], - }, - "tracks": [ - { - "trackartists": { - "composer": [], - "djmixer": [], - "guest": [], - "main": [ - {"alias": False, "name": "Techno Man"}, - {"alias": False, "name": "Bass Man"}, - ], - "producer": [], - "remixer": [], - "conductor": [], - }, - "discnumber": "01", - "duration_seconds": 120, - "id": "t1", - "source_path": f"{config.music_source_dir}/r1/01.m4a", - "tracktitle": "Track 1", - "tracknumber": "01", - "tracktotal": 2, - }, - { - "trackartists": { - "composer": [], - "djmixer": [], - "guest": [], - "main": [ - {"alias": False, "name": "Techno Man"}, - {"alias": False, "name": "Bass Man"}, - ], - "producer": [], - "remixer": [], - "conductor": [], - }, - "discnumber": "01", - "duration_seconds": 240, - "id": "t2", - "source_path": f"{config.music_source_dir}/r1/02.m4a", - "tracktitle": "Track 2", - "tracknumber": "02", - "tracktotal": 2, - }, - ], - }, - { - "id": "r2", - "source_path": f"{config.music_source_dir}/r2", - "cover_image_path": f"{config.music_source_dir}/r2/cover.jpg", - "added_at": "0000-01-01T00:00:00+00:00", - "releasetitle": "Release 2", - "releasetype": "album", - "releasedate": "2021", - "compositiondate": None, - "catalognumber": "DG-001", - "new": True, - "disctotal": 1, - "genres": ["Modern Classical"], - "parent_genres": ["Classical Music", "Western Classical Music"], - "labels": ["Native State"], - "originaldate": "2019", - "edition": "Deluxe", - "secondary_genres": ["Orchestral"], - "parent_secondary_genres": [ - "Classical Music", - "Western Classical Music", - ], - "descriptors": ["Wet"], - "releaseartists": { - "main": [{"name": "Violin Woman", "alias": False}], - "guest": [{"name": "Conductor Woman", "alias": False}], - "remixer": [], - "producer": [], - "composer": [], - "conductor": [], - "djmixer": [], - }, - "tracks": [ - { - "trackartists": { - "composer": [], - "djmixer": [], - "guest": [{"alias": False, "name": "Conductor Woman"}], - "main": [{"alias": False, "name": "Violin Woman"}], - "producer": [], - "remixer": [], - "conductor": [], - }, - "discnumber": "01", - "duration_seconds": 120, - "id": "t3", - "source_path": f"{config.music_source_dir}/r2/01.m4a", - "tracktitle": "Track 1", - "tracknumber": "01", - "tracktotal": 1, - } - ], - }, - { - "id": "r3", - "source_path": f"{config.music_source_dir}/r3", - "cover_image_path": None, - "added_at": "0000-01-01T00:00:00+00:00", - "releasetitle": "Release 3", - "releasetype": "album", - "releasedate": "2021-04-20", - "compositiondate": "1780", - "catalognumber": "DG-002", - "new": False, - "disctotal": 1, - "genres": [], - "parent_genres": [], - "labels": [], - "originaldate": None, - "edition": None, - "secondary_genres": [], - "parent_secondary_genres": [], - "descriptors": [], - "releaseartists": { - "main": [], - "guest": [], - "remixer": [], - "producer": [], - "composer": [], - "conductor": [], - "djmixer": [], - }, - "tracks": [ - { - "trackartists": { - "composer": [], - "djmixer": [], - "guest": [], - "main": [], - "producer": [], - "remixer": [], - "conductor": [], - }, - "discnumber": "01", - "duration_seconds": 120, - "id": "t4", - "source_path": f"{config.music_source_dir}/r3/01.m4a", - "tracktitle": "Track 1", - "tracknumber": "01", - "tracktotal": 1, - } - ], - }, - ] +@pytest.mark.usefixtures("static_cache") +def test_dump_releases(config: Config, snapshot: Any) -> None: + snapshot.assert_match(json.loads(dump_all_releases(config))) -@pytest.mark.usefixtures("seeded_cache") -def test_dump_releases_matcher(config: Config) -> None: +@pytest.mark.usefixtures("static_cache") +def test_dump_releases_matcher(config: Config, snapshot: Any) -> None: matcher = MetadataMatcher.parse("releasetitle:2$") - assert json.loads(dump_all_releases(config, matcher)) == [ - { - "id": "r2", - "source_path": f"{config.music_source_dir}/r2", - "cover_image_path": f"{config.music_source_dir}/r2/cover.jpg", - "added_at": "0000-01-01T00:00:00+00:00", - "releasetitle": "Release 2", - "releasetype": "album", - "releasedate": "2021", - "compositiondate": None, - "catalognumber": "DG-001", - "new": True, - "disctotal": 1, - "genres": ["Modern Classical"], - "parent_genres": ["Classical Music", "Western Classical Music"], - "labels": ["Native State"], - "originaldate": "2019", - "edition": "Deluxe", - "secondary_genres": ["Orchestral"], - "parent_secondary_genres": [ - "Classical Music", - "Western Classical Music", - ], - "descriptors": ["Wet"], - "releaseartists": { - "main": [{"name": "Violin Woman", "alias": False}], - "guest": [{"name": "Conductor Woman", "alias": False}], - "remixer": [], - "producer": [], - "composer": [], - "conductor": [], - "djmixer": [], - }, - "tracks": [ - { - "trackartists": { - "composer": [], - "djmixer": [], - "guest": [{"name": "Conductor Woman", "alias": False}], - "main": [{"name": "Violin Woman", "alias": False}], - "producer": [], - "remixer": [], - "conductor": [], - }, - "discnumber": "01", - "duration_seconds": 120, - "id": "t3", - "source_path": f"{config.music_source_dir}/r2/01.m4a", - "tracktitle": "Track 1", - "tracknumber": "01", - "tracktotal": 1, - } - ], - }, - ] + snapshot.assert_match(json.loads(dump_all_releases(config, matcher))) -@pytest.mark.usefixtures("seeded_cache") -def test_dump_tracks(config: Config) -> None: - assert json.loads(dump_all_tracks(config)) == [ - { - "trackartists": { - "composer": [], - "djmixer": [], - "guest": [], - "main": [ - {"alias": False, "name": "Techno Man"}, - {"alias": False, "name": "Bass Man"}, - ], - "producer": [], - "remixer": [], - "conductor": [], - }, - "discnumber": "01", - "disctotal": 1, - "duration_seconds": 120, - "id": "t1", - "source_path": f"{config.music_source_dir}/r1/01.m4a", - "tracktitle": "Track 1", - "tracknumber": "01", - "tracktotal": 2, - "added_at": "0000-01-01T00:00:00+00:00", - "release_id": "r1", - "releasetitle": "Release 1", - "releasetype": "album", - "releasedate": "2023", - "compositiondate": None, - "catalognumber": None, - "new": False, - "genres": ["Techno", "Deep House"], - "parent_genres": [ - "Dance", - "Electronic", - "Electronic Dance Music", - "House", - ], - "labels": ["Silk Music"], - "originaldate": None, - "edition": None, - "secondary_genres": ["Rominimal", "Ambient"], - "parent_secondary_genres": [ - "Dance", - "Electronic", - "Electronic Dance Music", - "House", - "Tech House", - ], - "descriptors": ["Warm", "Hot"], - "releaseartists": { - "main": [ - {"name": "Techno Man", "alias": False}, - {"name": "Bass Man", "alias": False}, - ], - "guest": [], - "remixer": [], - "conductor": [], - "producer": [], - "composer": [], - "djmixer": [], - }, - }, - { - "trackartists": { - "composer": [], - "djmixer": [], - "guest": [], - "main": [ - {"alias": False, "name": "Techno Man"}, - {"alias": False, "name": "Bass Man"}, - ], - "producer": [], - "remixer": [], - "conductor": [], - }, - "discnumber": "01", - "disctotal": 1, - "duration_seconds": 240, - "id": "t2", - "source_path": f"{config.music_source_dir}/r1/02.m4a", - "tracktitle": "Track 2", - "tracknumber": "02", - "tracktotal": 2, - "added_at": "0000-01-01T00:00:00+00:00", - "release_id": "r1", - "releasetitle": "Release 1", - "releasetype": "album", - "releasedate": "2023", - "compositiondate": None, - "catalognumber": None, - "new": False, - "genres": ["Techno", "Deep House"], - "parent_genres": [ - "Dance", - "Electronic", - "Electronic Dance Music", - "House", - ], - "labels": ["Silk Music"], - "originaldate": None, - "edition": None, - "secondary_genres": ["Rominimal", "Ambient"], - "parent_secondary_genres": [ - "Dance", - "Electronic", - "Electronic Dance Music", - "House", - "Tech House", - ], - "descriptors": ["Warm", "Hot"], - "releaseartists": { - "main": [ - {"name": "Techno Man", "alias": False}, - {"name": "Bass Man", "alias": False}, - ], - "guest": [], - "remixer": [], - "conductor": [], - "producer": [], - "composer": [], - "djmixer": [], - }, - }, - { - "trackartists": { - "composer": [], - "djmixer": [], - "guest": [{"alias": False, "name": "Conductor Woman"}], - "main": [{"alias": False, "name": "Violin Woman"}], - "producer": [], - "remixer": [], - "conductor": [], - }, - "discnumber": "01", - "disctotal": 1, - "duration_seconds": 120, - "id": "t3", - "source_path": f"{config.music_source_dir}/r2/01.m4a", - "tracktitle": "Track 1", - "tracknumber": "01", - "tracktotal": 1, - "added_at": "0000-01-01T00:00:00+00:00", - "release_id": "r2", - "releasetitle": "Release 2", - "releasetype": "album", - "releasedate": "2021", - "compositiondate": None, - "catalognumber": "DG-001", - "new": True, - "genres": ["Modern Classical"], - "parent_genres": ["Classical Music", "Western Classical Music"], - "labels": ["Native State"], - "originaldate": "2019", - "edition": "Deluxe", - "secondary_genres": ["Orchestral"], - "parent_secondary_genres": [ - "Classical Music", - "Western Classical Music", - ], - "descriptors": ["Wet"], - "releaseartists": { - "main": [{"name": "Violin Woman", "alias": False}], - "guest": [{"name": "Conductor Woman", "alias": False}], - "remixer": [], - "conductor": [], - "producer": [], - "composer": [], - "djmixer": [], - }, - }, - { - "trackartists": { - "composer": [], - "djmixer": [], - "guest": [], - "main": [], - "producer": [], - "remixer": [], - "conductor": [], - }, - "discnumber": "01", - "disctotal": 1, - "duration_seconds": 120, - "id": "t4", - "source_path": f"{config.music_source_dir}/r3/01.m4a", - "tracktitle": "Track 1", - "tracknumber": "01", - "tracktotal": 1, - "added_at": "0000-01-01T00:00:00+00:00", - "release_id": "r3", - "releasetitle": "Release 3", - "releasetype": "album", - "releasedate": "2021-04-20", - "compositiondate": "1780", - "catalognumber": "DG-002", - "new": False, - "genres": [], - "parent_genres": [], - "labels": [], - "originaldate": None, - "edition": None, - "secondary_genres": [], - "parent_secondary_genres": [], - "descriptors": [], - "releaseartists": { - "main": [], - "guest": [], - "remixer": [], - "conductor": [], - "producer": [], - "composer": [], - "djmixer": [], - }, - }, - ] +@pytest.mark.usefixtures("static_cache") +def test_dump_tracks(config: Config, snapshot: Any) -> None: + snapshot.assert_match(json.loads(dump_all_tracks(config))) -@pytest.mark.usefixtures("seeded_cache") -def test_dump_tracks_with_matcher(config: Config) -> None: +@pytest.mark.usefixtures("static_cache") +def test_dump_tracks_with_matcher(config: Config, snapshot: Any) -> None: matcher = MetadataMatcher.parse("artist:Techno Man") - assert json.loads(dump_all_tracks(config, matcher)) == [ - { - "trackartists": { - "composer": [], - "djmixer": [], - "guest": [], - "main": [ - {"alias": False, "name": "Techno Man"}, - {"alias": False, "name": "Bass Man"}, - ], - "producer": [], - "remixer": [], - "conductor": [], - }, - "discnumber": "01", - "disctotal": 1, - "duration_seconds": 120, - "id": "t1", - "source_path": f"{config.music_source_dir}/r1/01.m4a", - "tracktitle": "Track 1", - "tracknumber": "01", - "tracktotal": 2, - "added_at": "0000-01-01T00:00:00+00:00", - "release_id": "r1", - "releasetitle": "Release 1", - "releasetype": "album", - "releasedate": "2023", - "compositiondate": None, - "catalognumber": None, - "new": False, - "genres": ["Techno", "Deep House"], - "parent_genres": [ - "Dance", - "Electronic", - "Electronic Dance Music", - "House", - ], - "labels": ["Silk Music"], - "originaldate": None, - "edition": None, - "secondary_genres": ["Rominimal", "Ambient"], - "parent_secondary_genres": [ - "Dance", - "Electronic", - "Electronic Dance Music", - "House", - "Tech House", - ], - "descriptors": ["Warm", "Hot"], - "releaseartists": { - "main": [ - {"name": "Techno Man", "alias": False}, - {"name": "Bass Man", "alias": False}, - ], - "guest": [], - "remixer": [], - "conductor": [], - "producer": [], - "composer": [], - "djmixer": [], - }, - }, - { - "trackartists": { - "composer": [], - "djmixer": [], - "guest": [], - "main": [ - {"alias": False, "name": "Techno Man"}, - {"alias": False, "name": "Bass Man"}, - ], - "producer": [], - "remixer": [], - "conductor": [], - }, - "discnumber": "01", - "disctotal": 1, - "duration_seconds": 240, - "id": "t2", - "source_path": f"{config.music_source_dir}/r1/02.m4a", - "tracktitle": "Track 2", - "tracknumber": "02", - "tracktotal": 2, - "added_at": "0000-01-01T00:00:00+00:00", - "release_id": "r1", - "releasetitle": "Release 1", - "releasetype": "album", - "releasedate": "2023", - "compositiondate": None, - "catalognumber": None, - "new": False, - "genres": ["Techno", "Deep House"], - "parent_genres": [ - "Dance", - "Electronic", - "Electronic Dance Music", - "House", - ], - "labels": ["Silk Music"], - "originaldate": None, - "edition": None, - "secondary_genres": ["Rominimal", "Ambient"], - "parent_secondary_genres": [ - "Dance", - "Electronic", - "Electronic Dance Music", - "House", - "Tech House", - ], - "descriptors": ["Warm", "Hot"], - "releaseartists": { - "main": [ - {"name": "Techno Man", "alias": False}, - {"name": "Bass Man", "alias": False}, - ], - "guest": [], - "remixer": [], - "conductor": [], - "producer": [], - "composer": [], - "djmixer": [], - }, - }, - ] + snapshot.assert_match(json.loads(dump_all_tracks(config, matcher))) -@pytest.mark.usefixtures("seeded_cache") -def test_dump_track(config: Config) -> None: - assert json.loads(dump_track(config, "t1")) == { - "trackartists": { - "composer": [], - "djmixer": [], - "guest": [], - "main": [ - {"alias": False, "name": "Techno Man"}, - {"alias": False, "name": "Bass Man"}, - ], - "producer": [], - "remixer": [], - "conductor": [], - }, - "discnumber": "01", - "disctotal": 1, - "duration_seconds": 120, - "id": "t1", - "source_path": f"{config.music_source_dir}/r1/01.m4a", - "tracktitle": "Track 1", - "tracknumber": "01", - "tracktotal": 2, - "added_at": "0000-01-01T00:00:00+00:00", - "release_id": "r1", - "releasetitle": "Release 1", - "releasetype": "album", - "releasedate": "2023", - "compositiondate": None, - "catalognumber": None, - "new": False, - "genres": ["Techno", "Deep House"], - "parent_genres": [ - "Dance", - "Electronic", - "Electronic Dance Music", - "House", - ], - "labels": ["Silk Music"], - "originaldate": None, - "edition": None, - "secondary_genres": ["Rominimal", "Ambient"], - "parent_secondary_genres": [ - "Dance", - "Electronic", - "Electronic Dance Music", - "House", - "Tech House", - ], - "descriptors": ["Warm", "Hot"], - "releaseartists": { - "main": [ - {"name": "Techno Man", "alias": False}, - {"name": "Bass Man", "alias": False}, - ], - "guest": [], - "remixer": [], - "producer": [], - "composer": [], - "conductor": [], - "djmixer": [], - }, - } +@pytest.mark.usefixtures("static_cache") +def test_dump_track(config: Config, snapshot: Any) -> None: + snapshot.assert_match(json.loads(dump_track(config, "t1"))) -@pytest.mark.usefixtures("seeded_cache") -def test_dump_collage(config: Config) -> None: - out = dump_collage(config, "Rose Gold") - assert json.loads(out) == { - "name": "Rose Gold", - "releases": [ - { - "position": 1, - "id": "r1", - "source_path": f"{config.music_source_dir}/r1", - "cover_image_path": None, - "added_at": "0000-01-01T00:00:00+00:00", - "releasetitle": "Release 1", - "releasetype": "album", - "releasedate": "2023", - "compositiondate": None, - "catalognumber": None, - "new": False, - "disctotal": 1, - "genres": ["Techno", "Deep House"], - "parent_genres": [ - "Dance", - "Electronic", - "Electronic Dance Music", - "House", - ], - "labels": ["Silk Music"], - "originaldate": None, - "edition": None, - "secondary_genres": ["Rominimal", "Ambient"], - "parent_secondary_genres": [ - "Dance", - "Electronic", - "Electronic Dance Music", - "House", - "Tech House", - ], - "descriptors": ["Warm", "Hot"], - "releaseartists": { - "main": [ - {"name": "Techno Man", "alias": False}, - {"name": "Bass Man", "alias": False}, - ], - "guest": [], - "remixer": [], - "conductor": [], - "producer": [], - "composer": [], - "djmixer": [], - }, - }, - { - "position": 2, - "id": "r2", - "source_path": f"{config.music_source_dir}/r2", - "cover_image_path": f"{config.music_source_dir}/r2/cover.jpg", - "added_at": "0000-01-01T00:00:00+00:00", - "releasetitle": "Release 2", - "releasetype": "album", - "releasedate": "2021", - "compositiondate": None, - "catalognumber": "DG-001", - "new": True, - "disctotal": 1, - "genres": ["Modern Classical"], - "parent_genres": ["Classical Music", "Western Classical Music"], - "labels": ["Native State"], - "originaldate": "2019", - "edition": "Deluxe", - "secondary_genres": ["Orchestral"], - "parent_secondary_genres": [ - "Classical Music", - "Western Classical Music", - ], - "descriptors": ["Wet"], - "releaseartists": { - "main": [{"name": "Violin Woman", "alias": False}], - "guest": [{"name": "Conductor Woman", "alias": False}], - "remixer": [], - "conductor": [], - "producer": [], - "composer": [], - "djmixer": [], - }, - }, - ], - } +@pytest.mark.usefixtures("static_cache") +def test_dump_collage(config: Config, snapshot: Any) -> None: + snapshot.assert_match(json.loads(dump_collage(config, "Rose Gold"))) -@pytest.mark.usefixtures("seeded_cache") -def test_dump_collages(config: Config) -> None: - out = dump_all_collages(config) - assert json.loads(out) == [ - { - "name": "Rose Gold", - "releases": [ - { - "position": 1, - "id": "r1", - "source_path": f"{config.music_source_dir}/r1", - "cover_image_path": None, - "added_at": "0000-01-01T00:00:00+00:00", - "releasetitle": "Release 1", - "releasetype": "album", - "releasedate": "2023", - "compositiondate": None, - "catalognumber": None, - "new": False, - "disctotal": 1, - "genres": ["Techno", "Deep House"], - "parent_genres": [ - "Dance", - "Electronic", - "Electronic Dance Music", - "House", - ], - "labels": ["Silk Music"], - "originaldate": None, - "edition": None, - "secondary_genres": ["Rominimal", "Ambient"], - "parent_secondary_genres": [ - "Dance", - "Electronic", - "Electronic Dance Music", - "House", - "Tech House", - ], - "descriptors": ["Warm", "Hot"], - "releaseartists": { - "main": [ - {"name": "Techno Man", "alias": False}, - {"name": "Bass Man", "alias": False}, - ], - "guest": [], - "remixer": [], - "conductor": [], - "producer": [], - "composer": [], - "djmixer": [], - }, - }, - { - "position": 2, - "id": "r2", - "source_path": f"{config.music_source_dir}/r2", - "cover_image_path": f"{config.music_source_dir}/r2/cover.jpg", - "added_at": "0000-01-01T00:00:00+00:00", - "releasetitle": "Release 2", - "releasetype": "album", - "releasedate": "2021", - "compositiondate": None, - "catalognumber": "DG-001", - "new": True, - "disctotal": 1, - "genres": ["Modern Classical"], - "parent_genres": ["Classical Music", "Western Classical Music"], - "labels": ["Native State"], - "originaldate": "2019", - "edition": "Deluxe", - "secondary_genres": ["Orchestral"], - "parent_secondary_genres": [ - "Classical Music", - "Western Classical Music", - ], - "descriptors": ["Wet"], - "releaseartists": { - "main": [{"name": "Violin Woman", "alias": False}], - "guest": [{"name": "Conductor Woman", "alias": False}], - "remixer": [], - "conductor": [], - "producer": [], - "composer": [], - "djmixer": [], - }, - }, - ], - }, - {"name": "Ruby Red", "releases": []}, - ] +@pytest.mark.usefixtures("static_cache") +def test_dump_collages(config: Config, snapshot: Any) -> None: + snapshot.assert_match(json.loads(dump_all_collages(config))) -@pytest.mark.usefixtures("seeded_cache") -def test_dump_playlist(config: Config) -> None: - out = dump_playlist(config, "Lala Lisa") - assert json.loads(out) == { - "name": "Lala Lisa", - "cover_image_path": f"{config.music_source_dir}/!playlists/Lala Lisa.jpg", - "tracks": [ - { - "position": 1, - "id": "t1", - "source_path": f"{config.music_source_dir}/r1/01.m4a", - "tracktitle": "Track 1", - "tracknumber": "01", - "tracktotal": 2, - "discnumber": "01", - "disctotal": 1, - "duration_seconds": 120, - "trackartists": { - "main": [ - {"name": "Techno Man", "alias": False}, - {"name": "Bass Man", "alias": False}, - ], - "guest": [], - "remixer": [], - "producer": [], - "composer": [], - "conductor": [], - "djmixer": [], - }, - "added_at": "0000-01-01T00:00:00+00:00", - "release_id": "r1", - "releasetitle": "Release 1", - "releasetype": "album", - "releasedate": "2023", - "compositiondate": None, - "catalognumber": None, - "new": False, - "genres": ["Techno", "Deep House"], - "parent_genres": [ - "Dance", - "Electronic", - "Electronic Dance Music", - "House", - ], - "labels": ["Silk Music"], - "originaldate": None, - "edition": None, - "secondary_genres": ["Rominimal", "Ambient"], - "parent_secondary_genres": [ - "Dance", - "Electronic", - "Electronic Dance Music", - "House", - "Tech House", - ], - "descriptors": ["Warm", "Hot"], - "releaseartists": { - "main": [ - {"name": "Techno Man", "alias": False}, - {"name": "Bass Man", "alias": False}, - ], - "guest": [], - "remixer": [], - "producer": [], - "composer": [], - "conductor": [], - "djmixer": [], - }, - }, - { - "position": 2, - "id": "t3", - "source_path": f"{config.music_source_dir}/r2/01.m4a", - "tracktitle": "Track 1", - "tracknumber": "01", - "tracktotal": 1, - "discnumber": "01", - "disctotal": 1, - "duration_seconds": 120, - "trackartists": { - "main": [{"name": "Violin Woman", "alias": False}], - "guest": [{"name": "Conductor Woman", "alias": False}], - "remixer": [], - "producer": [], - "composer": [], - "conductor": [], - "djmixer": [], - }, - "added_at": "0000-01-01T00:00:00+00:00", - "release_id": "r2", - "releasetitle": "Release 2", - "releasetype": "album", - "releasedate": "2021", - "compositiondate": None, - "catalognumber": "DG-001", - "new": True, - "genres": ["Modern Classical"], - "parent_genres": ["Classical Music", "Western Classical Music"], - "labels": ["Native State"], - "originaldate": "2019", - "edition": "Deluxe", - "secondary_genres": ["Orchestral"], - "parent_secondary_genres": [ - "Classical Music", - "Western Classical Music", - ], - "descriptors": ["Wet"], - "releaseartists": { - "main": [{"name": "Violin Woman", "alias": False}], - "guest": [{"name": "Conductor Woman", "alias": False}], - "remixer": [], - "producer": [], - "composer": [], - "conductor": [], - "djmixer": [], - }, - }, - ], - } +@pytest.mark.usefixtures("static_cache") +def test_dump_playlist(config: Config, snapshot: Any) -> None: + snapshot.assert_match(json.loads(dump_playlist(config, "Lala Lisa"))) -@pytest.mark.usefixtures("seeded_cache") -def test_dump_playlists(config: Config) -> None: - out = dump_all_playlists(config) - assert json.loads(out) == [ - { - "name": "Lala Lisa", - "cover_image_path": f"{config.music_source_dir}/!playlists/Lala Lisa.jpg", - "tracks": [ - { - "position": 1, - "id": "t1", - "source_path": f"{config.music_source_dir}/r1/01.m4a", - "tracktitle": "Track 1", - "tracknumber": "01", - "tracktotal": 2, - "discnumber": "01", - "disctotal": 1, - "duration_seconds": 120, - "trackartists": { - "main": [ - {"name": "Techno Man", "alias": False}, - {"name": "Bass Man", "alias": False}, - ], - "guest": [], - "remixer": [], - "producer": [], - "composer": [], - "conductor": [], - "djmixer": [], - }, - "added_at": "0000-01-01T00:00:00+00:00", - "release_id": "r1", - "releasetitle": "Release 1", - "releasetype": "album", - "releasedate": "2023", - "compositiondate": None, - "catalognumber": None, - "new": False, - "genres": ["Techno", "Deep House"], - "parent_genres": [ - "Dance", - "Electronic", - "Electronic Dance Music", - "House", - ], - "labels": ["Silk Music"], - "originaldate": None, - "edition": None, - "secondary_genres": ["Rominimal", "Ambient"], - "parent_secondary_genres": [ - "Dance", - "Electronic", - "Electronic Dance Music", - "House", - "Tech House", - ], - "descriptors": ["Warm", "Hot"], - "releaseartists": { - "main": [ - {"name": "Techno Man", "alias": False}, - {"name": "Bass Man", "alias": False}, - ], - "guest": [], - "remixer": [], - "producer": [], - "composer": [], - "conductor": [], - "djmixer": [], - }, - }, - { - "position": 2, - "id": "t3", - "source_path": f"{config.music_source_dir}/r2/01.m4a", - "tracktitle": "Track 1", - "tracknumber": "01", - "tracktotal": 1, - "discnumber": "01", - "disctotal": 1, - "duration_seconds": 120, - "trackartists": { - "main": [{"name": "Violin Woman", "alias": False}], - "guest": [{"name": "Conductor Woman", "alias": False}], - "remixer": [], - "producer": [], - "composer": [], - "conductor": [], - "djmixer": [], - }, - "added_at": "0000-01-01T00:00:00+00:00", - "release_id": "r2", - "releasetitle": "Release 2", - "releasetype": "album", - "releasedate": "2021", - "compositiondate": None, - "catalognumber": "DG-001", - "new": True, - "genres": ["Modern Classical"], - "parent_genres": ["Classical Music", "Western Classical Music"], - "labels": ["Native State"], - "originaldate": "2019", - "edition": "Deluxe", - "secondary_genres": ["Orchestral"], - "parent_secondary_genres": [ - "Classical Music", - "Western Classical Music", - ], - "descriptors": ["Wet"], - "releaseartists": { - "main": [{"name": "Violin Woman", "alias": False}], - "guest": [{"name": "Conductor Woman", "alias": False}], - "remixer": [], - "producer": [], - "composer": [], - "conductor": [], - "djmixer": [], - }, - }, - ], - }, - {"name": "Turtle Rabbit", "cover_image_path": None, "tracks": []}, - ] +@pytest.mark.usefixtures("static_cache") +def test_dump_playlists(config: Config, snapshot: Any) -> None: + snapshot.assert_match(json.loads(dump_all_playlists(config))) diff --git a/rose_cli/snapshots/__init__.py b/rose_cli/snapshots/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/rose_cli/snapshots/snap_dump_test.py b/rose_cli/snapshots/snap_dump_test.py new file mode 100644 index 0000000..806a093 --- /dev/null +++ b/rose_cli/snapshots/snap_dump_test.py @@ -0,0 +1,1851 @@ +# -*- coding: utf-8 -*- +# snapshottest: v1 - https://goo.gl/zC4yUc +from __future__ import unicode_literals + +from snapshottest import Snapshot + + +snapshots = Snapshot() + +snapshots['test_dump_collage 1'] = { + 'name': 'Rose Gold', + 'releases': [ + { + 'added_at': '0000-01-01T00:00:00+00:00', + 'catalognumber': None, + 'compositiondate': None, + 'cover_image_path': None, + 'descriptors': [ + 'Warm', + 'Hot' + ], + 'disctotal': 1, + 'edition': None, + 'genres': [ + 'Techno', + 'Deep House' + ], + 'id': 'r1', + 'labels': [ + 'Silk Music' + ], + 'new': False, + 'originaldate': None, + 'parent_genres': [ + 'Dance', + 'Electronic', + 'Electronic Dance Music', + 'House' + ], + 'parent_secondary_genres': [ + 'Dance', + 'Electronic', + 'Electronic Dance Music', + 'House', + 'Tech House' + ], + 'position': 1, + 'releaseartists': { + 'composer': [ + ], + 'conductor': [ + ], + 'djmixer': [ + ], + 'guest': [ + ], + 'main': [ + { + 'alias': False, + 'name': 'Techno Man' + }, + { + 'alias': False, + 'name': 'Bass Man' + } + ], + 'producer': [ + ], + 'remixer': [ + ] + }, + 'releasedate': '2023', + 'releasetitle': 'Release 1', + 'releasetype': 'album', + 'secondary_genres': [ + 'Rominimal', + 'Ambient' + ], + 'source_path': '/dummy/r1' + }, + { + 'added_at': '0000-01-01T00:00:00+00:00', + 'catalognumber': 'DG-001', + 'compositiondate': None, + 'cover_image_path': '/dummy/r2/cover.jpg', + 'descriptors': [ + 'Wet' + ], + 'disctotal': 1, + 'edition': 'Deluxe', + 'genres': [ + 'Modern Classical' + ], + 'id': 'r2', + 'labels': [ + 'Native State' + ], + 'new': True, + 'originaldate': '2019', + 'parent_genres': [ + 'Classical Music', + 'Western Classical Music' + ], + 'parent_secondary_genres': [ + 'Classical Music', + 'Western Classical Music' + ], + 'position': 2, + 'releaseartists': { + 'composer': [ + ], + 'conductor': [ + ], + 'djmixer': [ + ], + 'guest': [ + { + 'alias': False, + 'name': 'Conductor Woman' + } + ], + 'main': [ + { + 'alias': False, + 'name': 'Violin Woman' + } + ], + 'producer': [ + ], + 'remixer': [ + ] + }, + 'releasedate': '2021', + 'releasetitle': 'Release 2', + 'releasetype': 'album', + 'secondary_genres': [ + 'Orchestral' + ], + 'source_path': '/dummy/r2' + } + ] +} + +snapshots['test_dump_collages 1'] = [ + { + 'name': 'Rose Gold', + 'releases': [ + { + 'added_at': '0000-01-01T00:00:00+00:00', + 'catalognumber': None, + 'compositiondate': None, + 'cover_image_path': None, + 'descriptors': [ + 'Warm', + 'Hot' + ], + 'disctotal': 1, + 'edition': None, + 'genres': [ + 'Techno', + 'Deep House' + ], + 'id': 'r1', + 'labels': [ + 'Silk Music' + ], + 'new': False, + 'originaldate': None, + 'parent_genres': [ + 'Dance', + 'Electronic', + 'Electronic Dance Music', + 'House' + ], + 'parent_secondary_genres': [ + 'Dance', + 'Electronic', + 'Electronic Dance Music', + 'House', + 'Tech House' + ], + 'position': 1, + 'releaseartists': { + 'composer': [ + ], + 'conductor': [ + ], + 'djmixer': [ + ], + 'guest': [ + ], + 'main': [ + { + 'alias': False, + 'name': 'Techno Man' + }, + { + 'alias': False, + 'name': 'Bass Man' + } + ], + 'producer': [ + ], + 'remixer': [ + ] + }, + 'releasedate': '2023', + 'releasetitle': 'Release 1', + 'releasetype': 'album', + 'secondary_genres': [ + 'Rominimal', + 'Ambient' + ], + 'source_path': '/dummy/r1' + }, + { + 'added_at': '0000-01-01T00:00:00+00:00', + 'catalognumber': 'DG-001', + 'compositiondate': None, + 'cover_image_path': '/dummy/r2/cover.jpg', + 'descriptors': [ + 'Wet' + ], + 'disctotal': 1, + 'edition': 'Deluxe', + 'genres': [ + 'Modern Classical' + ], + 'id': 'r2', + 'labels': [ + 'Native State' + ], + 'new': True, + 'originaldate': '2019', + 'parent_genres': [ + 'Classical Music', + 'Western Classical Music' + ], + 'parent_secondary_genres': [ + 'Classical Music', + 'Western Classical Music' + ], + 'position': 2, + 'releaseartists': { + 'composer': [ + ], + 'conductor': [ + ], + 'djmixer': [ + ], + 'guest': [ + { + 'alias': False, + 'name': 'Conductor Woman' + } + ], + 'main': [ + { + 'alias': False, + 'name': 'Violin Woman' + } + ], + 'producer': [ + ], + 'remixer': [ + ] + }, + 'releasedate': '2021', + 'releasetitle': 'Release 2', + 'releasetype': 'album', + 'secondary_genres': [ + 'Orchestral' + ], + 'source_path': '/dummy/r2' + } + ] + }, + { + 'name': 'Ruby Red', + 'releases': [ + ] + } +] + +snapshots['test_dump_playlist 1'] = { + 'cover_image_path': '/dummy/!playlists/Lala Lisa.jpg', + 'name': 'Lala Lisa', + 'tracks': [ + { + 'added_at': '0000-01-01T00:00:00+00:00', + 'catalognumber': None, + 'compositiondate': None, + 'descriptors': [ + 'Warm', + 'Hot' + ], + 'discnumber': '01', + 'disctotal': 1, + 'duration_seconds': 120, + 'edition': None, + 'genres': [ + 'Techno', + 'Deep House' + ], + 'id': 't1', + 'labels': [ + 'Silk Music' + ], + 'new': False, + 'originaldate': None, + 'parent_genres': [ + 'Dance', + 'Electronic', + 'Electronic Dance Music', + 'House' + ], + 'parent_secondary_genres': [ + 'Dance', + 'Electronic', + 'Electronic Dance Music', + 'House', + 'Tech House' + ], + 'position': 1, + 'release_id': 'r1', + 'releaseartists': { + 'composer': [ + ], + 'conductor': [ + ], + 'djmixer': [ + ], + 'guest': [ + ], + 'main': [ + { + 'alias': False, + 'name': 'Techno Man' + }, + { + 'alias': False, + 'name': 'Bass Man' + } + ], + 'producer': [ + ], + 'remixer': [ + ] + }, + 'releasedate': '2023', + 'releasetitle': 'Release 1', + 'releasetype': 'album', + 'secondary_genres': [ + 'Rominimal', + 'Ambient' + ], + 'source_path': '/dummy/r1/01.m4a', + 'trackartists': { + 'composer': [ + ], + 'conductor': [ + ], + 'djmixer': [ + ], + 'guest': [ + ], + 'main': [ + { + 'alias': False, + 'name': 'Techno Man' + }, + { + 'alias': False, + 'name': 'Bass Man' + } + ], + 'producer': [ + ], + 'remixer': [ + ] + }, + 'tracknumber': '01', + 'tracktitle': 'Track 1', + 'tracktotal': 2 + }, + { + 'added_at': '0000-01-01T00:00:00+00:00', + 'catalognumber': 'DG-001', + 'compositiondate': None, + 'descriptors': [ + 'Wet' + ], + 'discnumber': '01', + 'disctotal': 1, + 'duration_seconds': 120, + 'edition': 'Deluxe', + 'genres': [ + 'Modern Classical' + ], + 'id': 't3', + 'labels': [ + 'Native State' + ], + 'new': True, + 'originaldate': '2019', + 'parent_genres': [ + 'Classical Music', + 'Western Classical Music' + ], + 'parent_secondary_genres': [ + 'Classical Music', + 'Western Classical Music' + ], + 'position': 2, + 'release_id': 'r2', + 'releaseartists': { + 'composer': [ + ], + 'conductor': [ + ], + 'djmixer': [ + ], + 'guest': [ + { + 'alias': False, + 'name': 'Conductor Woman' + } + ], + 'main': [ + { + 'alias': False, + 'name': 'Violin Woman' + } + ], + 'producer': [ + ], + 'remixer': [ + ] + }, + 'releasedate': '2021', + 'releasetitle': 'Release 2', + 'releasetype': 'album', + 'secondary_genres': [ + 'Orchestral' + ], + 'source_path': '/dummy/r2/01.m4a', + 'trackartists': { + 'composer': [ + ], + 'conductor': [ + ], + 'djmixer': [ + ], + 'guest': [ + { + 'alias': False, + 'name': 'Conductor Woman' + } + ], + 'main': [ + { + 'alias': False, + 'name': 'Violin Woman' + } + ], + 'producer': [ + ], + 'remixer': [ + ] + }, + 'tracknumber': '01', + 'tracktitle': 'Track 1', + 'tracktotal': 1 + } + ] +} + +snapshots['test_dump_playlists 1'] = [ + { + 'cover_image_path': '/dummy/!playlists/Lala Lisa.jpg', + 'name': 'Lala Lisa', + 'tracks': [ + { + 'added_at': '0000-01-01T00:00:00+00:00', + 'catalognumber': None, + 'compositiondate': None, + 'descriptors': [ + 'Warm', + 'Hot' + ], + 'discnumber': '01', + 'disctotal': 1, + 'duration_seconds': 120, + 'edition': None, + 'genres': [ + 'Techno', + 'Deep House' + ], + 'id': 't1', + 'labels': [ + 'Silk Music' + ], + 'new': False, + 'originaldate': None, + 'parent_genres': [ + 'Dance', + 'Electronic', + 'Electronic Dance Music', + 'House' + ], + 'parent_secondary_genres': [ + 'Dance', + 'Electronic', + 'Electronic Dance Music', + 'House', + 'Tech House' + ], + 'position': 1, + 'release_id': 'r1', + 'releaseartists': { + 'composer': [ + ], + 'conductor': [ + ], + 'djmixer': [ + ], + 'guest': [ + ], + 'main': [ + { + 'alias': False, + 'name': 'Techno Man' + }, + { + 'alias': False, + 'name': 'Bass Man' + } + ], + 'producer': [ + ], + 'remixer': [ + ] + }, + 'releasedate': '2023', + 'releasetitle': 'Release 1', + 'releasetype': 'album', + 'secondary_genres': [ + 'Rominimal', + 'Ambient' + ], + 'source_path': '/dummy/r1/01.m4a', + 'trackartists': { + 'composer': [ + ], + 'conductor': [ + ], + 'djmixer': [ + ], + 'guest': [ + ], + 'main': [ + { + 'alias': False, + 'name': 'Techno Man' + }, + { + 'alias': False, + 'name': 'Bass Man' + } + ], + 'producer': [ + ], + 'remixer': [ + ] + }, + 'tracknumber': '01', + 'tracktitle': 'Track 1', + 'tracktotal': 2 + }, + { + 'added_at': '0000-01-01T00:00:00+00:00', + 'catalognumber': 'DG-001', + 'compositiondate': None, + 'descriptors': [ + 'Wet' + ], + 'discnumber': '01', + 'disctotal': 1, + 'duration_seconds': 120, + 'edition': 'Deluxe', + 'genres': [ + 'Modern Classical' + ], + 'id': 't3', + 'labels': [ + 'Native State' + ], + 'new': True, + 'originaldate': '2019', + 'parent_genres': [ + 'Classical Music', + 'Western Classical Music' + ], + 'parent_secondary_genres': [ + 'Classical Music', + 'Western Classical Music' + ], + 'position': 2, + 'release_id': 'r2', + 'releaseartists': { + 'composer': [ + ], + 'conductor': [ + ], + 'djmixer': [ + ], + 'guest': [ + { + 'alias': False, + 'name': 'Conductor Woman' + } + ], + 'main': [ + { + 'alias': False, + 'name': 'Violin Woman' + } + ], + 'producer': [ + ], + 'remixer': [ + ] + }, + 'releasedate': '2021', + 'releasetitle': 'Release 2', + 'releasetype': 'album', + 'secondary_genres': [ + 'Orchestral' + ], + 'source_path': '/dummy/r2/01.m4a', + 'trackartists': { + 'composer': [ + ], + 'conductor': [ + ], + 'djmixer': [ + ], + 'guest': [ + { + 'alias': False, + 'name': 'Conductor Woman' + } + ], + 'main': [ + { + 'alias': False, + 'name': 'Violin Woman' + } + ], + 'producer': [ + ], + 'remixer': [ + ] + }, + 'tracknumber': '01', + 'tracktitle': 'Track 1', + 'tracktotal': 1 + } + ] + }, + { + 'cover_image_path': None, + 'name': 'Turtle Rabbit', + 'tracks': [ + ] + } +] + +snapshots['test_dump_release 1'] = { + 'added_at': '0000-01-01T00:00:00+00:00', + 'catalognumber': None, + 'compositiondate': None, + 'cover_image_path': None, + 'descriptors': [ + 'Warm', + 'Hot' + ], + 'disctotal': 1, + 'edition': None, + 'genres': [ + 'Techno', + 'Deep House' + ], + 'id': 'r1', + 'labels': [ + 'Silk Music' + ], + 'new': False, + 'originaldate': None, + 'parent_genres': [ + 'Dance', + 'Electronic', + 'Electronic Dance Music', + 'House' + ], + 'parent_secondary_genres': [ + 'Dance', + 'Electronic', + 'Electronic Dance Music', + 'House', + 'Tech House' + ], + 'releaseartists': { + 'composer': [ + ], + 'conductor': [ + ], + 'djmixer': [ + ], + 'guest': [ + ], + 'main': [ + { + 'alias': False, + 'name': 'Techno Man' + }, + { + 'alias': False, + 'name': 'Bass Man' + } + ], + 'producer': [ + ], + 'remixer': [ + ] + }, + 'releasedate': '2023', + 'releasetitle': 'Release 1', + 'releasetype': 'album', + 'secondary_genres': [ + 'Rominimal', + 'Ambient' + ], + 'source_path': '/dummy/r1', + 'tracks': [ + { + 'discnumber': '01', + 'duration_seconds': 120, + 'id': 't1', + 'source_path': '/dummy/r1/01.m4a', + 'trackartists': { + 'composer': [ + ], + 'conductor': [ + ], + 'djmixer': [ + ], + 'guest': [ + ], + 'main': [ + { + 'alias': False, + 'name': 'Techno Man' + }, + { + 'alias': False, + 'name': 'Bass Man' + } + ], + 'producer': [ + ], + 'remixer': [ + ] + }, + 'tracknumber': '01', + 'tracktitle': 'Track 1', + 'tracktotal': 2 + }, + { + 'discnumber': '01', + 'duration_seconds': 240, + 'id': 't2', + 'source_path': '/dummy/r1/02.m4a', + 'trackartists': { + 'composer': [ + ], + 'conductor': [ + ], + 'djmixer': [ + ], + 'guest': [ + ], + 'main': [ + { + 'alias': False, + 'name': 'Techno Man' + }, + { + 'alias': False, + 'name': 'Bass Man' + } + ], + 'producer': [ + ], + 'remixer': [ + ] + }, + 'tracknumber': '02', + 'tracktitle': 'Track 2', + 'tracktotal': 2 + } + ] +} + +snapshots['test_dump_releases 1'] = [ + { + 'added_at': '0000-01-01T00:00:00+00:00', + 'catalognumber': None, + 'compositiondate': None, + 'cover_image_path': None, + 'descriptors': [ + 'Warm', + 'Hot' + ], + 'disctotal': 1, + 'edition': None, + 'genres': [ + 'Techno', + 'Deep House' + ], + 'id': 'r1', + 'labels': [ + 'Silk Music' + ], + 'new': False, + 'originaldate': None, + 'parent_genres': [ + 'Dance', + 'Electronic', + 'Electronic Dance Music', + 'House' + ], + 'parent_secondary_genres': [ + 'Dance', + 'Electronic', + 'Electronic Dance Music', + 'House', + 'Tech House' + ], + 'releaseartists': { + 'composer': [ + ], + 'conductor': [ + ], + 'djmixer': [ + ], + 'guest': [ + ], + 'main': [ + { + 'alias': False, + 'name': 'Techno Man' + }, + { + 'alias': False, + 'name': 'Bass Man' + } + ], + 'producer': [ + ], + 'remixer': [ + ] + }, + 'releasedate': '2023', + 'releasetitle': 'Release 1', + 'releasetype': 'album', + 'secondary_genres': [ + 'Rominimal', + 'Ambient' + ], + 'source_path': '/dummy/r1', + 'tracks': [ + { + 'discnumber': '01', + 'duration_seconds': 120, + 'id': 't1', + 'source_path': '/dummy/r1/01.m4a', + 'trackartists': { + 'composer': [ + ], + 'conductor': [ + ], + 'djmixer': [ + ], + 'guest': [ + ], + 'main': [ + { + 'alias': False, + 'name': 'Techno Man' + }, + { + 'alias': False, + 'name': 'Bass Man' + } + ], + 'producer': [ + ], + 'remixer': [ + ] + }, + 'tracknumber': '01', + 'tracktitle': 'Track 1', + 'tracktotal': 2 + }, + { + 'discnumber': '01', + 'duration_seconds': 240, + 'id': 't2', + 'source_path': '/dummy/r1/02.m4a', + 'trackartists': { + 'composer': [ + ], + 'conductor': [ + ], + 'djmixer': [ + ], + 'guest': [ + ], + 'main': [ + { + 'alias': False, + 'name': 'Techno Man' + }, + { + 'alias': False, + 'name': 'Bass Man' + } + ], + 'producer': [ + ], + 'remixer': [ + ] + }, + 'tracknumber': '02', + 'tracktitle': 'Track 2', + 'tracktotal': 2 + } + ] + }, + { + 'added_at': '0000-01-01T00:00:00+00:00', + 'catalognumber': 'DG-001', + 'compositiondate': None, + 'cover_image_path': '/dummy/r2/cover.jpg', + 'descriptors': [ + 'Wet' + ], + 'disctotal': 1, + 'edition': 'Deluxe', + 'genres': [ + 'Modern Classical' + ], + 'id': 'r2', + 'labels': [ + 'Native State' + ], + 'new': True, + 'originaldate': '2019', + 'parent_genres': [ + 'Classical Music', + 'Western Classical Music' + ], + 'parent_secondary_genres': [ + 'Classical Music', + 'Western Classical Music' + ], + 'releaseartists': { + 'composer': [ + ], + 'conductor': [ + ], + 'djmixer': [ + ], + 'guest': [ + { + 'alias': False, + 'name': 'Conductor Woman' + } + ], + 'main': [ + { + 'alias': False, + 'name': 'Violin Woman' + } + ], + 'producer': [ + ], + 'remixer': [ + ] + }, + 'releasedate': '2021', + 'releasetitle': 'Release 2', + 'releasetype': 'album', + 'secondary_genres': [ + 'Orchestral' + ], + 'source_path': '/dummy/r2', + 'tracks': [ + { + 'discnumber': '01', + 'duration_seconds': 120, + 'id': 't3', + 'source_path': '/dummy/r2/01.m4a', + 'trackartists': { + 'composer': [ + ], + 'conductor': [ + ], + 'djmixer': [ + ], + 'guest': [ + { + 'alias': False, + 'name': 'Conductor Woman' + } + ], + 'main': [ + { + 'alias': False, + 'name': 'Violin Woman' + } + ], + 'producer': [ + ], + 'remixer': [ + ] + }, + 'tracknumber': '01', + 'tracktitle': 'Track 1', + 'tracktotal': 1 + } + ] + }, + { + 'added_at': '0000-01-01T00:00:00+00:00', + 'catalognumber': 'DG-002', + 'compositiondate': '1780', + 'cover_image_path': None, + 'descriptors': [ + ], + 'disctotal': 1, + 'edition': None, + 'genres': [ + ], + 'id': 'r3', + 'labels': [ + ], + 'new': False, + 'originaldate': None, + 'parent_genres': [ + ], + 'parent_secondary_genres': [ + ], + 'releaseartists': { + 'composer': [ + ], + 'conductor': [ + ], + 'djmixer': [ + ], + 'guest': [ + ], + 'main': [ + ], + 'producer': [ + ], + 'remixer': [ + ] + }, + 'releasedate': '2021-04-20', + 'releasetitle': 'Release 3', + 'releasetype': 'album', + 'secondary_genres': [ + ], + 'source_path': '/dummy/r3', + 'tracks': [ + { + 'discnumber': '01', + 'duration_seconds': 120, + 'id': 't4', + 'source_path': '/dummy/r3/01.m4a', + 'trackartists': { + 'composer': [ + ], + 'conductor': [ + ], + 'djmixer': [ + ], + 'guest': [ + ], + 'main': [ + ], + 'producer': [ + ], + 'remixer': [ + ] + }, + 'tracknumber': '01', + 'tracktitle': 'Track 1', + 'tracktotal': 1 + } + ] + } +] + +snapshots['test_dump_releases_matcher 1'] = [ + { + 'added_at': '0000-01-01T00:00:00+00:00', + 'catalognumber': 'DG-001', + 'compositiondate': None, + 'cover_image_path': '/dummy/r2/cover.jpg', + 'descriptors': [ + 'Wet' + ], + 'disctotal': 1, + 'edition': 'Deluxe', + 'genres': [ + 'Modern Classical' + ], + 'id': 'r2', + 'labels': [ + 'Native State' + ], + 'new': True, + 'originaldate': '2019', + 'parent_genres': [ + 'Classical Music', + 'Western Classical Music' + ], + 'parent_secondary_genres': [ + 'Classical Music', + 'Western Classical Music' + ], + 'releaseartists': { + 'composer': [ + ], + 'conductor': [ + ], + 'djmixer': [ + ], + 'guest': [ + { + 'alias': False, + 'name': 'Conductor Woman' + } + ], + 'main': [ + { + 'alias': False, + 'name': 'Violin Woman' + } + ], + 'producer': [ + ], + 'remixer': [ + ] + }, + 'releasedate': '2021', + 'releasetitle': 'Release 2', + 'releasetype': 'album', + 'secondary_genres': [ + 'Orchestral' + ], + 'source_path': '/dummy/r2', + 'tracks': [ + { + 'discnumber': '01', + 'duration_seconds': 120, + 'id': 't3', + 'source_path': '/dummy/r2/01.m4a', + 'trackartists': { + 'composer': [ + ], + 'conductor': [ + ], + 'djmixer': [ + ], + 'guest': [ + { + 'alias': False, + 'name': 'Conductor Woman' + } + ], + 'main': [ + { + 'alias': False, + 'name': 'Violin Woman' + } + ], + 'producer': [ + ], + 'remixer': [ + ] + }, + 'tracknumber': '01', + 'tracktitle': 'Track 1', + 'tracktotal': 1 + } + ] + } +] + +snapshots['test_dump_track 1'] = { + 'added_at': '0000-01-01T00:00:00+00:00', + 'catalognumber': None, + 'compositiondate': None, + 'descriptors': [ + 'Warm', + 'Hot' + ], + 'discnumber': '01', + 'disctotal': 1, + 'duration_seconds': 120, + 'edition': None, + 'genres': [ + 'Techno', + 'Deep House' + ], + 'id': 't1', + 'labels': [ + 'Silk Music' + ], + 'new': False, + 'originaldate': None, + 'parent_genres': [ + 'Dance', + 'Electronic', + 'Electronic Dance Music', + 'House' + ], + 'parent_secondary_genres': [ + 'Dance', + 'Electronic', + 'Electronic Dance Music', + 'House', + 'Tech House' + ], + 'release_id': 'r1', + 'releaseartists': { + 'composer': [ + ], + 'conductor': [ + ], + 'djmixer': [ + ], + 'guest': [ + ], + 'main': [ + { + 'alias': False, + 'name': 'Techno Man' + }, + { + 'alias': False, + 'name': 'Bass Man' + } + ], + 'producer': [ + ], + 'remixer': [ + ] + }, + 'releasedate': '2023', + 'releasetitle': 'Release 1', + 'releasetype': 'album', + 'secondary_genres': [ + 'Rominimal', + 'Ambient' + ], + 'source_path': '/dummy/r1/01.m4a', + 'trackartists': { + 'composer': [ + ], + 'conductor': [ + ], + 'djmixer': [ + ], + 'guest': [ + ], + 'main': [ + { + 'alias': False, + 'name': 'Techno Man' + }, + { + 'alias': False, + 'name': 'Bass Man' + } + ], + 'producer': [ + ], + 'remixer': [ + ] + }, + 'tracknumber': '01', + 'tracktitle': 'Track 1', + 'tracktotal': 2 +} + +snapshots['test_dump_tracks 1'] = [ + { + 'added_at': '0000-01-01T00:00:00+00:00', + 'catalognumber': None, + 'compositiondate': None, + 'descriptors': [ + 'Warm', + 'Hot' + ], + 'discnumber': '01', + 'disctotal': 1, + 'duration_seconds': 120, + 'edition': None, + 'genres': [ + 'Techno', + 'Deep House' + ], + 'id': 't1', + 'labels': [ + 'Silk Music' + ], + 'new': False, + 'originaldate': None, + 'parent_genres': [ + 'Dance', + 'Electronic', + 'Electronic Dance Music', + 'House' + ], + 'parent_secondary_genres': [ + 'Dance', + 'Electronic', + 'Electronic Dance Music', + 'House', + 'Tech House' + ], + 'release_id': 'r1', + 'releaseartists': { + 'composer': [ + ], + 'conductor': [ + ], + 'djmixer': [ + ], + 'guest': [ + ], + 'main': [ + { + 'alias': False, + 'name': 'Techno Man' + }, + { + 'alias': False, + 'name': 'Bass Man' + } + ], + 'producer': [ + ], + 'remixer': [ + ] + }, + 'releasedate': '2023', + 'releasetitle': 'Release 1', + 'releasetype': 'album', + 'secondary_genres': [ + 'Rominimal', + 'Ambient' + ], + 'source_path': '/dummy/r1/01.m4a', + 'trackartists': { + 'composer': [ + ], + 'conductor': [ + ], + 'djmixer': [ + ], + 'guest': [ + ], + 'main': [ + { + 'alias': False, + 'name': 'Techno Man' + }, + { + 'alias': False, + 'name': 'Bass Man' + } + ], + 'producer': [ + ], + 'remixer': [ + ] + }, + 'tracknumber': '01', + 'tracktitle': 'Track 1', + 'tracktotal': 2 + }, + { + 'added_at': '0000-01-01T00:00:00+00:00', + 'catalognumber': None, + 'compositiondate': None, + 'descriptors': [ + 'Warm', + 'Hot' + ], + 'discnumber': '01', + 'disctotal': 1, + 'duration_seconds': 240, + 'edition': None, + 'genres': [ + 'Techno', + 'Deep House' + ], + 'id': 't2', + 'labels': [ + 'Silk Music' + ], + 'new': False, + 'originaldate': None, + 'parent_genres': [ + 'Dance', + 'Electronic', + 'Electronic Dance Music', + 'House' + ], + 'parent_secondary_genres': [ + 'Dance', + 'Electronic', + 'Electronic Dance Music', + 'House', + 'Tech House' + ], + 'release_id': 'r1', + 'releaseartists': { + 'composer': [ + ], + 'conductor': [ + ], + 'djmixer': [ + ], + 'guest': [ + ], + 'main': [ + { + 'alias': False, + 'name': 'Techno Man' + }, + { + 'alias': False, + 'name': 'Bass Man' + } + ], + 'producer': [ + ], + 'remixer': [ + ] + }, + 'releasedate': '2023', + 'releasetitle': 'Release 1', + 'releasetype': 'album', + 'secondary_genres': [ + 'Rominimal', + 'Ambient' + ], + 'source_path': '/dummy/r1/02.m4a', + 'trackartists': { + 'composer': [ + ], + 'conductor': [ + ], + 'djmixer': [ + ], + 'guest': [ + ], + 'main': [ + { + 'alias': False, + 'name': 'Techno Man' + }, + { + 'alias': False, + 'name': 'Bass Man' + } + ], + 'producer': [ + ], + 'remixer': [ + ] + }, + 'tracknumber': '02', + 'tracktitle': 'Track 2', + 'tracktotal': 2 + }, + { + 'added_at': '0000-01-01T00:00:00+00:00', + 'catalognumber': 'DG-001', + 'compositiondate': None, + 'descriptors': [ + 'Wet' + ], + 'discnumber': '01', + 'disctotal': 1, + 'duration_seconds': 120, + 'edition': 'Deluxe', + 'genres': [ + 'Modern Classical' + ], + 'id': 't3', + 'labels': [ + 'Native State' + ], + 'new': True, + 'originaldate': '2019', + 'parent_genres': [ + 'Classical Music', + 'Western Classical Music' + ], + 'parent_secondary_genres': [ + 'Classical Music', + 'Western Classical Music' + ], + 'release_id': 'r2', + 'releaseartists': { + 'composer': [ + ], + 'conductor': [ + ], + 'djmixer': [ + ], + 'guest': [ + { + 'alias': False, + 'name': 'Conductor Woman' + } + ], + 'main': [ + { + 'alias': False, + 'name': 'Violin Woman' + } + ], + 'producer': [ + ], + 'remixer': [ + ] + }, + 'releasedate': '2021', + 'releasetitle': 'Release 2', + 'releasetype': 'album', + 'secondary_genres': [ + 'Orchestral' + ], + 'source_path': '/dummy/r2/01.m4a', + 'trackartists': { + 'composer': [ + ], + 'conductor': [ + ], + 'djmixer': [ + ], + 'guest': [ + { + 'alias': False, + 'name': 'Conductor Woman' + } + ], + 'main': [ + { + 'alias': False, + 'name': 'Violin Woman' + } + ], + 'producer': [ + ], + 'remixer': [ + ] + }, + 'tracknumber': '01', + 'tracktitle': 'Track 1', + 'tracktotal': 1 + }, + { + 'added_at': '0000-01-01T00:00:00+00:00', + 'catalognumber': 'DG-002', + 'compositiondate': '1780', + 'descriptors': [ + ], + 'discnumber': '01', + 'disctotal': 1, + 'duration_seconds': 120, + 'edition': None, + 'genres': [ + ], + 'id': 't4', + 'labels': [ + ], + 'new': False, + 'originaldate': None, + 'parent_genres': [ + ], + 'parent_secondary_genres': [ + ], + 'release_id': 'r3', + 'releaseartists': { + 'composer': [ + ], + 'conductor': [ + ], + 'djmixer': [ + ], + 'guest': [ + ], + 'main': [ + ], + 'producer': [ + ], + 'remixer': [ + ] + }, + 'releasedate': '2021-04-20', + 'releasetitle': 'Release 3', + 'releasetype': 'album', + 'secondary_genres': [ + ], + 'source_path': '/dummy/r3/01.m4a', + 'trackartists': { + 'composer': [ + ], + 'conductor': [ + ], + 'djmixer': [ + ], + 'guest': [ + ], + 'main': [ + ], + 'producer': [ + ], + 'remixer': [ + ] + }, + 'tracknumber': '01', + 'tracktitle': 'Track 1', + 'tracktotal': 1 + } +] + +snapshots['test_dump_tracks_with_matcher 1'] = [ + { + 'added_at': '0000-01-01T00:00:00+00:00', + 'catalognumber': None, + 'compositiondate': None, + 'descriptors': [ + 'Warm', + 'Hot' + ], + 'discnumber': '01', + 'disctotal': 1, + 'duration_seconds': 120, + 'edition': None, + 'genres': [ + 'Techno', + 'Deep House' + ], + 'id': 't1', + 'labels': [ + 'Silk Music' + ], + 'new': False, + 'originaldate': None, + 'parent_genres': [ + 'Dance', + 'Electronic', + 'Electronic Dance Music', + 'House' + ], + 'parent_secondary_genres': [ + 'Dance', + 'Electronic', + 'Electronic Dance Music', + 'House', + 'Tech House' + ], + 'release_id': 'r1', + 'releaseartists': { + 'composer': [ + ], + 'conductor': [ + ], + 'djmixer': [ + ], + 'guest': [ + ], + 'main': [ + { + 'alias': False, + 'name': 'Techno Man' + }, + { + 'alias': False, + 'name': 'Bass Man' + } + ], + 'producer': [ + ], + 'remixer': [ + ] + }, + 'releasedate': '2023', + 'releasetitle': 'Release 1', + 'releasetype': 'album', + 'secondary_genres': [ + 'Rominimal', + 'Ambient' + ], + 'source_path': '/dummy/r1/01.m4a', + 'trackartists': { + 'composer': [ + ], + 'conductor': [ + ], + 'djmixer': [ + ], + 'guest': [ + ], + 'main': [ + { + 'alias': False, + 'name': 'Techno Man' + }, + { + 'alias': False, + 'name': 'Bass Man' + } + ], + 'producer': [ + ], + 'remixer': [ + ] + }, + 'tracknumber': '01', + 'tracktitle': 'Track 1', + 'tracktotal': 2 + }, + { + 'added_at': '0000-01-01T00:00:00+00:00', + 'catalognumber': None, + 'compositiondate': None, + 'descriptors': [ + 'Warm', + 'Hot' + ], + 'discnumber': '01', + 'disctotal': 1, + 'duration_seconds': 240, + 'edition': None, + 'genres': [ + 'Techno', + 'Deep House' + ], + 'id': 't2', + 'labels': [ + 'Silk Music' + ], + 'new': False, + 'originaldate': None, + 'parent_genres': [ + 'Dance', + 'Electronic', + 'Electronic Dance Music', + 'House' + ], + 'parent_secondary_genres': [ + 'Dance', + 'Electronic', + 'Electronic Dance Music', + 'House', + 'Tech House' + ], + 'release_id': 'r1', + 'releaseartists': { + 'composer': [ + ], + 'conductor': [ + ], + 'djmixer': [ + ], + 'guest': [ + ], + 'main': [ + { + 'alias': False, + 'name': 'Techno Man' + }, + { + 'alias': False, + 'name': 'Bass Man' + } + ], + 'producer': [ + ], + 'remixer': [ + ] + }, + 'releasedate': '2023', + 'releasetitle': 'Release 1', + 'releasetype': 'album', + 'secondary_genres': [ + 'Rominimal', + 'Ambient' + ], + 'source_path': '/dummy/r1/02.m4a', + 'trackartists': { + 'composer': [ + ], + 'conductor': [ + ], + 'djmixer': [ + ], + 'guest': [ + ], + 'main': [ + { + 'alias': False, + 'name': 'Techno Man' + }, + { + 'alias': False, + 'name': 'Bass Man' + } + ], + 'producer': [ + ], + 'remixer': [ + ] + }, + 'tracknumber': '02', + 'tracktitle': 'Track 2', + 'tracktotal': 2 + } +]