chore: debug

This commit is contained in:
Cory Dransfeldt 2024-03-29 11:22:57 -07:00
parent 8a7679dadb
commit 783495d248
No known key found for this signature in database

View file

@ -13,9 +13,7 @@ export default async (request, context) => {
const data = await request.formData()
const payload = data.get('payload')
console.log(payload)
const artist = payload['Metadata']['grandparentTitle']
const album = payload['Metadata']['parentTitle']
const track = payload['Metadata']['title']
console.log(payload['Metadata'])
const artists = getStore('artists')
@ -36,6 +34,9 @@ export default async (request, context) => {
if (payload?.event === 'media.scrobble') {
const artist = payload['Metadata']['grandparentTitle']
const album = payload['Metadata']['parentTitle']
const track = payload['Metadata']['title']
const artistKey = sanitizeMediaString(artist).replace(/\s+/g, '-').toLowerCase()
const artistInfo = await artists.getJSON(artistKey)
if (!artistInfo) {