mirror of
https://git.sr.ht/~phw/scotty
synced 2025-04-29 21:27:05 +02:00
ListenBrainz: Log missing recording MBID on love import
This commit is contained in:
parent
910056b0a6
commit
90bf51a00b
1 changed files with 7 additions and 0 deletions
|
@ -256,6 +256,9 @@ func (b *ListenBrainzApiBackend) ImportLoves(export models.LovesResult, importRe
|
|||
|
||||
for _, love := range export.Items {
|
||||
recordingMBID := love.RecordingMBID
|
||||
if recordingMBID == "" {
|
||||
recordingMBID = love.Track.RecordingMBID
|
||||
}
|
||||
|
||||
if recordingMBID == "" {
|
||||
lookup, err := b.client.Lookup(love.TrackName, love.ArtistName())
|
||||
|
@ -290,6 +293,10 @@ func (b *ListenBrainzApiBackend) ImportLoves(export models.LovesResult, importRe
|
|||
love.TrackName, love.ArtistName(), errMsg)
|
||||
importResult.Log(models.Error, msg)
|
||||
}
|
||||
} else {
|
||||
msg := fmt.Sprintf("Failed import of \"%s\" by %s: no recording MBID",
|
||||
love.TrackName, love.ArtistName())
|
||||
importResult.Log(models.Error, msg)
|
||||
}
|
||||
|
||||
progress <- models.Progress{}.FromImportResult(importResult)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue