fix(import): keep the values a service set on exported tracks and export a song as a song

This commit is contained in:
imSp4rky
2026-12-02 17:19:10 -07:00
parent 95d36378f4
commit 0c93f1dc63
6 changed files with 122 additions and 18 deletions
+9 -4
View File
@@ -758,14 +758,19 @@ def test_export_movie_meta() -> None:
def test_export_meta_of_another_title_is_a_movie_named_by_str() -> None:
assert title_to_meta(song()) == {
"id": "song-0001",
"language": "en",
assert title_to_meta(OtherTitle()) == {
"id": "other-0001",
"language": None,
"type": "movie",
"name": "Example Artist - Example Album (2022) / 03. Example Song",
"name": "Other Thing",
}
def test_export_song_meta_rebuilds_the_song_the_rest_form_rebuilds() -> None:
rebuilt = title_fields(build_title(json_copy(title_to_meta(song())), "EXAMPLE", "fallback-id"))
assert rebuilt == title_fields(build_title(json_copy(REST_SONG), "EXAMPLE", "fallback-id"))
def test_build_title_from_rest_episode() -> None:
assert title_fields(build_title(json_copy(REST_EPISODE), "EXAMPLE", "fallback-id")) == EPISODE_FIELDS