fix: artist concert notes; ics timing

This commit is contained in:
Cory Dransfeldt 2024-08-06 14:09:47 -07:00
parent 82e2fa887a
commit a26e34f2ef
No known key found for this signature in database
5 changed files with 11 additions and 11 deletions

View file

@ -171,14 +171,15 @@ export const albumReleasesCalendar = (collection) => {
const events = albumReleases.map(album => {
const date = DateTime.fromFormat(album.date, 'MMMM d, yyyy')
if (!date.isValid) return null
return {
start: [
date.year,
date.month,
date.day,
0, 0
date.day
],
startInputType: 'local',
startOutputType: 'local',
duration: { days: 1 },
title: `Release: ${album.artist} / ${album.title}`,
description: `Check out this new album release: ${album.url}`,
url: album.url,
@ -189,12 +190,12 @@ export const albumReleasesCalendar = (collection) => {
const { error, value } = ics.createEvents(events)
if (error) {
console.error('Error creating ICS events:', error)
console.error('Error creating events:', error)
events.forEach((event, index) => {
console.error(`Event ${index}:`, event)
})
return ''
}
return value
return value;
}