fix(api/scrobble.php): add default field values for tentative artist records

This commit is contained in:
Cory Dransfeldt 2025-04-18 15:06:24 -07:00
parent 1af90c14ad
commit 15982f220a
No known key found for this signature in database
3 changed files with 22 additions and 18 deletions

View file

@ -137,16 +137,20 @@ class NavidromeScrobbleHandler extends ApiHandler
}
$this->fetchFromPostgREST("artists", "", "POST", [
"mbid" => null,
"mbid" => "",
"art" => "4cef75db-831f-4f5d-9333-79eaa5bb55ee",
"name" => $artistName,
"name_string" => $artistName,
"slug" => "/music",
"country" => "",
"description" => "",
"tentative" => true,
"favorite" => false,
"tattoo" => false,
"total_plays" => 0
]);
$this->sendFailureEmail("New tentative artist record", "A new tentative artist record was inserted:\n\nArtist: $artistName");
$this->sendFailureEmail("New tentative artist record", "A new tentative artist record was inserted for: $artistName");
$artistData = $this->fetchFromPostgREST("artists", "name_string=eq.{$encodedArtist}&limit=1");