feat: album releases feeds + tv in search

This commit is contained in:
Cory Dransfeldt 2024-09-01 22:05:24 -07:00
parent cf33610473
commit 84b718f24e
No known key found for this signature in database
7 changed files with 71 additions and 41 deletions

View file

@ -38,9 +38,10 @@ const fetchAlbumReleases = async () => {
timestamp: releaseDate.toSeconds(),
}
}).sort((a, b) => a['timestamp'] - b['timestamp'])
const upcoming = all.filter(album => (!album['total_plays'] || album['total_plays'] <= 0) && album['release_date'] > today);
const upcoming = all.filter(album => (!album['total_plays'] || album['total_plays'] <= 0) && album['release_date'] > today)
const current = all.filter(album => album['release_date'] <= today)
return { all, upcoming }
return { all, upcoming, current }
}
export default async function () {