mirror of
https://github.com/unshackle-dl/unshackle.git
synced 2026-12-03 06:25:10 +00:00
fix(import): keep the values a service set on exported tracks and export a song as a song
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user