From f9c3aae4ed2212232e4ede683d5aa3fb8088eab6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0ar=C5=ABnas=20Nejus?= Date: Mon, 29 Dec 2025 17:05:32 +0000 Subject: [PATCH] Musicbrainz: fix original release id access for a pseudo releae --- beetsplug/musicbrainz.py | 2 +- test/plugins/test_musicbrainz.py | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/beetsplug/musicbrainz.py b/beetsplug/musicbrainz.py index 221afea71..8cab1786b 100644 --- a/beetsplug/musicbrainz.py +++ b/beetsplug/musicbrainz.py @@ -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) diff --git a/test/plugins/test_musicbrainz.py b/test/plugins/test_musicbrainz.py index 0a3155430..30b9f7d1a 100644 --- a/test/plugins/test_musicbrainz.py +++ b/test/plugins/test_musicbrainz.py @@ -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" + }, } ], }