Musicbrainz: fix original release id access for a pseudo releae

This commit is contained in:
Šarūnas Nejus 2025-12-29 17:05:32 +00:00
parent 21e6a1f757
commit f9c3aae4ed
No known key found for this signature in database
2 changed files with 7 additions and 4 deletions

View file

@ -914,7 +914,7 @@ class MusicBrainzPlugin(MetadataSourcePlugin):
rel["type"] == "transl-tracklisting"
and rel["direction"] == "backward"
):
actual_res = self.api.get_release(rel["target"])
actual_res = self.api.get_release(rel["release"]["id"])
# release is potentially a pseudo release
release = self.album_info(res)

View file

@ -204,7 +204,6 @@ class MBAlbumInfoTest(MusicBrainzTestCase):
{
"type": "remixer",
"type-id": "RELATION TYPE ID",
"target": "RECORDING REMIXER ARTIST ID",
"direction": "RECORDING RELATION DIRECTION",
"artist": {
"id": "RECORDING REMIXER ARTIST ID",
@ -820,8 +819,10 @@ class MBLibraryTest(MusicBrainzTestCase):
"release-relations": [
{
"type": "transl-tracklisting",
"target": "d2a6f856-b553-40a0-ac54-a321e8e2da01",
"direction": "backward",
"release": {
"id": "d2a6f856-b553-40a0-ac54-a321e8e2da01"
},
}
],
},
@ -993,8 +994,10 @@ class MBLibraryTest(MusicBrainzTestCase):
"release-relations": [
{
"type": "remaster",
"target": "d2a6f856-b553-40a0-ac54-a321e8e2da01",
"direction": "backward",
"release": {
"id": "d2a6f856-b553-40a0-ac54-a321e8e2da01"
},
}
],
}