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/README.md b/README.md index 03c7a2b..b4b913d 100644 --- a/README.md +++ b/README.md @@ -222,15 +222,20 @@ Options: -c, --config PATH Override the config file location. --help Show this message and exit. - Commands: - cache Manage the read cache. - collages Manage collages. - config Utilites for configuring Rosé. - fs Manage the virtual filesystem. - playlists Manage playlists. - releases Manage releases. - rules Run metadata upda + artists Manage artists. + cache Manage the read cache. + collages Manage collages. + config Utilites for configuring Rosé. + descriptors Manage descriptors. + fs Manage the virtual filesystem. + genres Manage genres. + labels Manage labels. + playlists Manage playlists. + releases Manage releases. + rules Run metadata update rules on the entire library. + tracks Manage tracks. + version Print version. ``` > [!NOTE] 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/docs/AVAILABLE_COMMANDS.md b/docs/AVAILABLE_COMMANDS.md index 089857d..9085a15 100644 --- a/docs/AVAILABLE_COMMANDS.md +++ b/docs/AVAILABLE_COMMANDS.md @@ -64,6 +64,18 @@ resource they effect. Most commands are of the structure `rose {resource} {actio - `playlists remove-track`: Remove a track from a playlist. - `playlists set-cover`: Set the cover art for a playlist. Replaces any existing cover art. - `playlists delete-cover`: Remove the cover art of a playlist. +- artists/ + - `artists print`: Print a single artist's metadata and releases in JSON. + - `artists print-all`: Print all artists' metadata and releases in JSON. +- genres/ + - `genres print`: Print a single genre's metadata and releases in JSON. + - `genres print-all`: Print all genres' metadata and releases in JSON. +- labels/ + - `labels print`: Print a single label's metadata and releases in JSON. + - `labels print-all`: Print all labels' metadata and releases in JSON. +- descriptors/ + - `descriptors print`: Print a single descriptor's metadata and releases in JSON. + - `descriptors print-all`: Print all descriptors' metadata and releases in JSON. - rules/ _(see [Improving Your Music Metadata](./METADATA_TOOLS.md))_ - `rules run`: Run an ad hoc rule in the command line interface. You can also easily test rules with the `--dry-run` flag. 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..e3e984d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,6 +9,7 @@ exclude = [ ".mypy_cache", ".ruff_cache", ".venv", + "snapshots", ] [tool.ruff.lint] @@ -82,6 +83,9 @@ ignore_missing_imports = true [[tool.mypy.overrides]] module = "setuptools" ignore_missing_imports = true +[[tool.mypy.overrides]] +module = "snapshottest" +ignore_missing_imports = true [tool.pytest.ini_options] addopts = [ 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/config.py b/rose/config.py index 7e4e6b0..d16caa1 100644 --- a/rose/config.py +++ b/rose/config.py @@ -564,9 +564,10 @@ def parse(cls, config_path_override: Path | None = None) -> Config: dfs_state.append((child_accessor, v)) continue unrecognized_accessors.append(accessor) - logger.warning( - f"Unrecognized options found in configuration file: {', '.join(unrecognized_accessors)}" - ) + if unrecognized_accessors: + logger.warning( + f"Unrecognized options found in configuration file: {', '.join(unrecognized_accessors)}" + ) return Config( music_source_dir=music_source_dir, diff --git a/rose_cli/cli.py b/rose_cli/cli.py index d0a590e..16365e5 100644 --- a/rose_cli/cli.py +++ b/rose_cli/cli.py @@ -52,11 +52,19 @@ update_cache, ) from rose_cli.dump import ( + dump_all_artists, dump_all_collages, + dump_all_descriptors, + dump_all_genres, + dump_all_labels, dump_all_playlists, dump_all_releases, dump_all_tracks, + dump_artist, dump_collage, + dump_descriptor, + dump_genre, + dump_label, dump_playlist, dump_release, dump_track, @@ -523,6 +531,86 @@ def delete_cover_playlist(ctx: Context, playlist: str) -> None: delete_playlist_cover_art(ctx.config, playlist) +@cli.group() +def artists() -> None: + """Manage artists.""" + + +@artists.command(name="print") +@click.argument("artist", type=str, nargs=1) +@click.pass_obj +def print_artist(ctx: Context, artist: str) -> None: + """Print a artist (in JSON). Accepts a artist's name.""" + click.echo(dump_artist(ctx.config, artist)) + + +@artists.command(name="print-all") +@click.pass_obj +def print_all_artists(ctx: Context) -> None: + """Print all artists (in JSON).""" + click.echo(dump_all_artists(ctx.config)) + + +@cli.group() +def genres() -> None: + """Manage genres.""" + + +@genres.command(name="print") +@click.argument("genre", type=str, nargs=1) +@click.pass_obj +def print_genre(ctx: Context, genre: str) -> None: + """Print a genre (in JSON). Accepts a genre's name.""" + click.echo(dump_genre(ctx.config, genre)) + + +@genres.command(name="print-all") +@click.pass_obj +def print_all_genres(ctx: Context) -> None: + """Print all genres (in JSON).""" + click.echo(dump_all_genres(ctx.config)) + + +@cli.group() +def labels() -> None: + """Manage labels.""" + + +@labels.command(name="print") +@click.argument("label", type=str, nargs=1) +@click.pass_obj +def print_label(ctx: Context, label: str) -> None: + """Print a label (in JSON). Accepts a label's name.""" + click.echo(dump_label(ctx.config, label)) + + +@labels.command(name="print-all") +@click.pass_obj +def print_all_labels(ctx: Context) -> None: + """Print all labels (in JSON).""" + click.echo(dump_all_labels(ctx.config)) + + +@cli.group() +def descriptors() -> None: + """Manage descriptors.""" + + +@descriptors.command(name="print") +@click.argument("descriptor", type=str, nargs=1) +@click.pass_obj +def print_descriptor(ctx: Context, descriptor: str) -> None: + """Print a descriptor (in JSON). Accepts a descriptor's name.""" + click.echo(dump_descriptor(ctx.config, descriptor)) + + +@descriptors.command(name="print-all") +@click.pass_obj +def print_all_descriptors(ctx: Context) -> None: + """Print all descriptors (in JSON).""" + click.echo(dump_all_descriptors(ctx.config)) + + @cli.group() def rules() -> None: """Run metadata update rules on the entire library.""" diff --git a/rose_cli/dump.py b/rose_cli/dump.py index 0193d63..f20aa70 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,101 @@ 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 e in list_genres(c): + genre_releases = list_releases_delete_this(c, genre_filter=e.genre) + releases = [release_to_json(r) for r in genre_releases] + out.append( + {"name": e.genre, "only_new_releases": e.only_new_releases, "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 e in list_labels(c): + label_releases = list_releases_delete_this(c, label_filter=e.label) + releases = [release_to_json(r) for r in label_releases] + out.append( + {"name": e.label, "only_new_releases": e.only_new_releases, "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 e in list_descriptors(c): + descriptor_releases = list_releases_delete_this(c, descriptor_filter=e.descriptor) + releases = [release_to_json(r) for r in descriptor_releases] + out.append( + {"name": e.descriptor, "only_new_releases": e.only_new_releases, "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..cb9ab91 100644 --- a/rose_cli/dump_test.py +++ b/rose_cli/dump_test.py @@ -1,1203 +1,116 @@ import json +from typing import Any import pytest from rose import Config, MetadataMatcher from rose_cli.dump import ( + dump_all_artists, dump_all_collages, + dump_all_descriptors, + dump_all_genres, + dump_all_labels, dump_all_playlists, dump_all_releases, dump_all_tracks, + dump_artist, dump_collage, + dump_descriptor, + dump_genre, + dump_label, dump_playlist, dump_release, dump_track, ) -@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_artist(config: Config, snapshot: Any) -> None: + snapshot.assert_match(json.loads(dump_artist(config, "Bass Man"))) -@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_artists(config: Config, snapshot: Any) -> None: + snapshot.assert_match(json.loads(dump_all_artists(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_genre(config: Config, snapshot: Any) -> None: + snapshot.assert_match(json.loads(dump_genre(config, "Deep House"))) -@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_genres(config: Config, snapshot: Any) -> None: + snapshot.assert_match(json.loads(dump_all_genres(config))) + + +@pytest.mark.usefixtures("static_cache") +def test_dump_label(config: Config, snapshot: Any) -> None: + snapshot.assert_match(json.loads(dump_label(config, "Silk Music"))) + + +@pytest.mark.usefixtures("static_cache") +def test_dump_labels(config: Config, snapshot: Any) -> None: + snapshot.assert_match(json.loads(dump_all_labels(config))) + + +@pytest.mark.usefixtures("static_cache") +def test_dump_descriptor(config: Config, snapshot: Any) -> None: + snapshot.assert_match(json.loads(dump_descriptor(config, "Warm"))) + + +@pytest.mark.usefixtures("static_cache") +def test_dump_descriptors(config: Config, snapshot: Any) -> None: + snapshot.assert_match(json.loads(dump_all_descriptors(config))) + + +@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("static_cache") +def test_dump_collages(config: Config, snapshot: Any) -> None: + snapshot.assert_match(json.loads(dump_all_collages(config))) + + +@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("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..321d6cf --- /dev/null +++ b/rose_cli/snapshots/snap_dump_test.py @@ -0,0 +1,3479 @@ +# -*- coding: utf-8 -*- +# snapshottest: v1 - https://goo.gl/zC4yUc +from __future__ import unicode_literals + +from snapshottest import Snapshot + + +snapshots = Snapshot() + +snapshots['test_dump_artist 1'] = { + 'name': 'Bass Man', + 'roles': { + 'composer': [ + ], + 'conductor': [ + ], + 'djmixer': [ + ], + 'guest': [ + ], + 'main': [ + { + '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' + } + ], + 'producer': [ + ], + 'remixer': [ + ] + } +} + +snapshots['test_dump_artists 1'] = [ + { + 'name': 'Bass Man', + 'roles': { + 'composer': [ + ], + 'conductor': [ + ], + 'djmixer': [ + ], + 'guest': [ + ], + 'main': [ + { + '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' + } + ], + 'producer': [ + ], + 'remixer': [ + ] + } + }, + { + 'name': 'Conductor Woman', + 'roles': { + 'composer': [ + ], + 'conductor': [ + ], + 'djmixer': [ + ], + 'guest': [ + { + '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' + } + ], + 'main': [ + ], + 'producer': [ + ], + 'remixer': [ + ] + } + }, + { + 'name': 'Techno Man', + 'roles': { + 'composer': [ + ], + 'conductor': [ + ], + 'djmixer': [ + ], + 'guest': [ + ], + 'main': [ + { + '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' + } + ], + 'producer': [ + ], + 'remixer': [ + ] + } + }, + { + 'name': 'Violin Woman', + 'roles': { + 'composer': [ + ], + 'conductor': [ + ], + 'djmixer': [ + ], + 'guest': [ + ], + 'main': [ + { + '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' + } + ], + 'producer': [ + ], + 'remixer': [ + ] + } + } +] + +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_descriptor 1'] = { + 'name': 'Warm', + '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' + ], + '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' + } + ] +} + +snapshots['test_dump_descriptors 1'] = [ + { + 'name': 'Hot', + 'only_new_releases': False, + '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' + ], + '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' + } + ] + }, + { + 'name': 'Warm', + 'only_new_releases': False, + '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' + ], + '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' + } + ] + }, + { + 'name': 'Wet', + 'only_new_releases': True, + 'releases': [ + { + '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' + } + ] + } +] + +snapshots['test_dump_genre 1'] = { + 'name': 'Deep House', + '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' + ], + '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' + } + ] +} + +snapshots['test_dump_genres 1'] = [ + { + 'name': 'Deep House', + 'only_new_releases': False, + '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' + ], + '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' + } + ] + }, + { + 'name': 'Dance', + 'only_new_releases': False, + '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' + ], + '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' + } + ] + }, + { + 'name': 'Electronic', + 'only_new_releases': False, + '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' + ], + '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' + } + ] + }, + { + 'name': 'Electronic Dance Music', + 'only_new_releases': False, + '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' + ], + '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' + } + ] + }, + { + 'name': 'House', + 'only_new_releases': False, + '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' + ], + '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' + } + ] + }, + { + 'name': 'Modern Classical', + 'only_new_releases': True, + 'releases': [ + { + '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' + } + ] + }, + { + 'name': 'Classical Music', + 'only_new_releases': True, + 'releases': [ + { + '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' + } + ] + }, + { + 'name': 'Western Classical Music', + 'only_new_releases': True, + 'releases': [ + { + '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' + } + ] + }, + { + 'name': 'Techno', + 'only_new_releases': False, + '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' + ], + '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' + } + ] + } +] + +snapshots['test_dump_label 1'] = { + 'name': 'Silk Music', + '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' + ], + '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' + } + ] +} + +snapshots['test_dump_labels 1'] = [ + { + 'name': 'Native State', + 'only_new_releases': True, + 'releases': [ + { + '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' + } + ] + }, + { + 'name': 'Silk Music', + 'only_new_releases': False, + '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' + ], + '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' + } + ] + } +] + +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 + } +]