cngcng
February 7, 2021, 1:06am
1
I set up a local musicbrainz-docker server, to tag classical music file using Picard & classical Extra.
If a release has many tracks or media (I’m not sure what is the constraint), the web service API doesn’t include work in the API response.
For example,
http://musicbrainz.org/ws/2/release/788e89aa-10a5-4524-bcfb-bcbf92d10a27?inc=release-groups+media+discids+recordings+artist-credits+artists+aliases+labels+isrcs+collections+artist-rels+release-rels+url-rels+recording-rels+work-rels+recording-level-rels+work-level-rels
This response doesn’t have work relationship in the recording.
How can I change this to include work relationship, even if a release has a large track count?
I mean, changing my own local server setting.
Regards.
Hi!
You want to change this number, or change the code to not set a max:
my $inc_artist_credits = $inc->artist_credits;
if ($inc_artist_credits) {
push @ac_entities, @tracks, @recordings;
}
# The maximum number of recordings to try to get relationships for, if
# inc=recording-level-rels is specified. Certain releases with an enourmous
# number of recordings (audiobooks) will almost always timeout, driving up
# server load average for nothing. Ideally we can remove this limit as soon as
# we resolve the performance issues we have.
my $max_recording_relationships = 500;
if ($inc->recording_level_rels && @recordings <= $max_recording_relationships) {
push @rels_entities, @recordings;
}
# Disable artist-credits during linked_recordings, since we load
# them below together with the tracks and release.
$inc->artist_credits(0) if $inc_artist_credits;
$self->linked_recordings($c, $stash, \@recordings);
$inc->artist_credits(1) if $inc_artist_credits;
3 Likes
cngcng
February 8, 2021, 8:36am
3
Hi.
I increased the size to 3000. I confirmed the server response includes the work relations for the previous example.
Thanks.
1 Like