diff --git a/plugins/acousticbrainz/__init__.py b/plugins/acousticbrainz/__init__.py index 90c63da1..93efbc33 100644 --- a/plugins/acousticbrainz/__init__.py +++ b/plugins/acousticbrainz/__init__.py @@ -310,10 +310,6 @@ def _batch(self, action, recording_ids, callback, result, response=None, reply=N callback=partial(self._batch, action, recording_ids, callback, result)) def _do_request(self, action, recording_ids, callback): - queryargs = { - 'recording_ids': ';'.join(recording_ids), - 'map_classes': 'true' - } self.album.tagger.webservice.get( ACOUSTICBRAINZ_HOST, ACOUSTICBRAINZ_PORT, @@ -321,9 +317,17 @@ def _do_request(self, action, recording_ids, callback): callback, priority=True, parse_response_type='json', - queryargs=queryargs + queryargs=self._get_query_args(action, recording_ids) ) + def _get_query_args(self, action, recording_ids): + queryargs = { + 'recording_ids': ';'.join(recording_ids), + } + if action == 'high-level': + queryargs['map_classes'] = 'true' + return queryargs + def _merge_results(self, full, new): mapping = new.get('mbid_mapping', {}) new = {mapping.get(k, k): v for (k, v) in new.items() if k != 'mbid_mapping'}