Listenbrainz: skip tracks that do not have mbid instead of crashing. fixes #249
This commit is contained in:
@@ -179,6 +179,7 @@ namespace Scrobbling::ListenBrainz
|
||||
switch (type)
|
||||
{
|
||||
case FeedbackType::Love:
|
||||
if (starredTrack->getScrobblingState() != ScrobblingState::PendingAdd)
|
||||
starredTrack.modify()->setScrobblingState(ScrobblingState::PendingAdd);
|
||||
break;
|
||||
|
||||
@@ -200,6 +201,12 @@ namespace Scrobbling::ListenBrainz
|
||||
throw Exception {"Unhandled feedback type"};
|
||||
}
|
||||
|
||||
if (!recordingMBID)
|
||||
{
|
||||
LOG(DEBUG) << "Track has no recording MBID: skipping";
|
||||
return;
|
||||
}
|
||||
|
||||
const std::optional<UUID> listenBrainzToken {starredTrack->getUser()->getListenBrainzToken()};
|
||||
if (!listenBrainzToken)
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user