Save recording MBID during probing

This commit is contained in:
Dominik Krivohlavek
2024-06-24 22:58:15 +02:00
parent 1a983fdc90
commit 014182c162

View File

@@ -355,6 +355,12 @@ namespace MediaBrowser.Providers.MediaInfo
}
}
if (options.ReplaceAllMetadata || !audio.TryGetProviderId(MetadataProvider.MusicBrainzRecording, out _))
{
// As mentioned above, `tags.MusicBrainzTrackId` provides the recording MBID.
audio.SetProviderId(MetadataProvider.MusicBrainzRecording, tags.MusicBrainzTrackId);
}
// Save extracted lyrics if they exist,
// and if the audio doesn't yet have lyrics.
var lyrics = track.Lyrics.SynchronizedLyrics.Count > 0 ? track.Lyrics.FormatSynchToLRC() : track.Lyrics.UnsynchronizedLyrics;