mirror of
https://github.com/tomru/advcal.git
synced 2026-03-03 22:47:23 +01:00
130 lines
3.0 KiB
JavaScript
130 lines
3.0 KiB
JavaScript
const { DateTime } = require("luxon");
|
|
|
|
const SONGS = [
|
|
{
|
|
id: "Bys-OE_C7lQ",
|
|
title: "A Christmas Twist - Si Cranstoun",
|
|
startSeconds: 4,
|
|
},
|
|
{
|
|
id: "lheIRyhsUSE",
|
|
title: "EAV - Fata Morgana 1986",
|
|
},
|
|
{
|
|
id: "Dqn01vCQnUs",
|
|
title: "Sheena Easton - My Baby Takes The Morning Train (with Lyric)HQ",
|
|
},
|
|
{
|
|
id: "b_BzMuOAKUs",
|
|
title: "Rod Stewart - Have I Told You Lately",
|
|
},
|
|
{
|
|
id: "3D-j9PcOPAk",
|
|
title: "Deifedanz",
|
|
},
|
|
{
|
|
id: "9HvpIgHBSdo",
|
|
title: 'Gregory Porter - "Be Good (Lion\'s Song)" Official Video',
|
|
},
|
|
{
|
|
id: "3FKA-3uRdQY",
|
|
title:
|
|
"Doris Day - Whatever Will Be Will Be Que Sera Sera (Best All Time Hits Forever 2014 / HQ) Mu©o",
|
|
},
|
|
{
|
|
id: "WIoHSu5v1Mo",
|
|
title: "The Specials - Message to you Rudy",
|
|
},
|
|
{
|
|
id: "6ZwjdGSqO0k",
|
|
title: "George Harrison - Got My Mind Set On You (Version I)",
|
|
startSeconds: 14,
|
|
},
|
|
{
|
|
id: "lAj-Q_W9AT4",
|
|
title: "George Strait - Write This Down (Closed Captioned)",
|
|
},
|
|
{
|
|
id: "YiadNVhaGwk",
|
|
title: "Chuck Berry - Run Rudolph Run (Official Video)",
|
|
},
|
|
{
|
|
id: "_6FBfAQ-NDE",
|
|
title: "Depeche Mode - Just Can't Get Enough (Official Video)",
|
|
},
|
|
{
|
|
id: "X22vAmpZSdY",
|
|
title: "MIEKE TELKAMP ★★★ TULPEN AUS AMSTERDAM ★★★ 1961",
|
|
},
|
|
{
|
|
id: "uvGvmsLQaHA",
|
|
title: "Elvis Presley - Green Green Grass Of Home (best video)",
|
|
startSeconds: 6,
|
|
},
|
|
{
|
|
id: "5vheNbQlsyU",
|
|
title:
|
|
"Lady Gaga - Always Remember Us This Way (from A Star Is Born) (Official Music Video)",
|
|
startSeconds: 31,
|
|
},
|
|
{
|
|
id: "4WM_R-6AKHE",
|
|
title: "Mockingbird - Carly Simon & James Taylor",
|
|
},
|
|
{
|
|
id: "MgIwLeASnkw",
|
|
title: "Elmo & Patsy - Grandma Got Run over by a Reindeer",
|
|
},
|
|
{
|
|
id: "SLErVV1TxUI",
|
|
title: "Gänsehaut - Karl der Käfer 1983",
|
|
},
|
|
{
|
|
id: "js-2cqqY1K8",
|
|
title: "The Beautiful South - Perfect 10 (Official Video)",
|
|
},
|
|
{
|
|
id: "S6nSpBiekzQ",
|
|
title: "Les Négresses Vertes - Zobi La Mouche (Official Music Video)",
|
|
},
|
|
{
|
|
id: "z0qW9P-uYfM",
|
|
title: "Elton John - Don't Go Breaking My Heart (with Kiki Dee)",
|
|
},
|
|
{
|
|
id: "Pgqa3cVOxUc",
|
|
title: "The Undertones - My Perfect Cousin (Official Video)",
|
|
},
|
|
{
|
|
id: "lLLL1KxpYMA",
|
|
title: "Madness - Night Boat to Cairo (Official HD Video)",
|
|
startSeconds: 12,
|
|
},
|
|
{
|
|
id: "qTx-sdR6Yzk",
|
|
title: 'Dropkick Murphys - "The Season\'s Upon Us" (Video)',
|
|
},
|
|
];
|
|
|
|
export default async (req, res) => {
|
|
const unlocked = Boolean(req.query.unlock) === true;
|
|
const NOW = DateTime.utc().setZone("Europe/Berlin");
|
|
|
|
const getLockedData = (index) => {
|
|
const dayString = ("00" + (index + 1)).substr(-2, 2);
|
|
const lockedUntilDateTime = DateTime.fromISO(
|
|
`${NOW.year}-12-${dayString}T00:00:00.000+01:00`
|
|
);
|
|
return {
|
|
locked: unlocked ? false : NOW < lockedUntilDateTime,
|
|
lockedUntil: lockedUntilDateTime.toISO(),
|
|
};
|
|
};
|
|
|
|
const songs = SONGS.map((item, index) => ({
|
|
...item,
|
|
...getLockedData(index),
|
|
}));
|
|
res.json({ songs });
|
|
};
|