eS v1
All checks were successful
Deploy App / build (push) Successful in 2m14s
Deploy App / deploy (push) Successful in 14s

This commit is contained in:
valere
2025-10-16 00:42:38 +02:00
parent ce73155cfa
commit 3ad8cb8795
21 changed files with 752 additions and 332 deletions

View File

@@ -1,126 +1,140 @@
import { eventHandler } from 'h3'
export default eventHandler(() => {
return [
const boxes = [
{
id: 'ES2012',
type: 'playlist',
name: '2012',
duration: 0,
description: '🐉💧',
description: '🐉<i class="indice">💧</i>',
color1: '#ffffff',
color2: '#32021F',
color3: '#00ff00'
},
{
id: 'ES2013',
type: 'playlist',
name: '2013',
duration: 0,
description: '🐍💧',
description: '🐍<i class="indice">💧</i>',
color1: '#ffffff',
color2: '#32021F',
color3: '#00ff00'
},
{
id: 'ES2015',
type: 'playlist',
name: '2015',
duration: 0,
description: '🐐🌳',
description: '🐐<i class="indice">🌳</i>',
color1: '#ffffff',
color2: '#32021F',
color3: '#00ff00'
},
{
id: 'ES2016',
type: 'playlist',
name: '2016',
duration: 0,
description: '🐒🔥',
description: '🐒<i class="indice">🔥</i>',
color1: '#ffffff',
color2: '#32021F',
color3: '#00ff00'
},
{
id: 'ES2017',
type: 'playlist',
name: '2017',
duration: 0,
description: '🐓🔥',
description: '🐓<i class="indice">🔥</i>',
color1: '#ffffff',
color2: '#32021F',
color3: '#00ff00'
},
{
id: 'ES2018',
type: 'playlist',
name: '2018',
duration: 0,
description: '🐕🌱',
description: '🐕<i class="indice">🌱</i>',
color1: '#ffffff',
color2: '#32021F',
color3: '#00ff00'
},
{
id: 'ES2019',
type: 'playlist',
name: '2019',
duration: 0,
description: '🐖🌱',
description: '🐖<i class="indice">🌱</i>',
color1: '#ffffff',
color2: '#32021F',
color3: '#00ff00'
},
{
id: 'ES2020',
type: 'playlist',
name: '2020',
duration: 0,
description: '🐀🪙',
description: '🐀<i class="indice">🪙</i>',
color1: '#ffffff',
color2: '#32021F',
color3: '#00ff00'
},
{
id: 'ES2021',
type: 'playlist',
name: '2021',
duration: 0,
description: '🐃🪙',
description: '🐃<i class="indice">🪙</i>',
color1: '#ffffff',
color2: '#32021F',
color3: '#00ff00'
},
{
id: 'ES2022',
type: 'playlist',
name: '2022',
duration: 0,
description: '🐅💧',
description: '🐅<i class="indice">💧</i>',
color1: '#ffffff',
color2: '#32021F',
color3: '#00ff00'
},
{
id: 'ES2023',
type: 'playlist',
name: '2023',
duration: 0,
description: '🐇💧',
description: '🐇<i class="indice">💧</i>',
color1: '#ffffff',
color2: '#32021F',
color3: '#00ff00'
},
{
id: 'ES2024',
type: 'playlist',
name: '2024',
duration: 0,
description: '🐉🌳',
description: '🐉<i class="indice">🌳</i>',
color1: '#ffffff',
color2: '#32021F',
color3: '#00ff00'
},
{
id: 'ES2025',
type: 'playlist',
name: '2025',
duration: 0,
description: '🐍🌳',
description: '🐍<i class="indice">🌳</i>',
color1: '#ffffff',
color2: '#32021F',
color3: '#00ff00'
},
{
id: 'ES00A',
type: 'compilation',
name: 'manifeste',
duration: 2794,
description: 'Zero is for manifesto',
@@ -130,6 +144,7 @@ export default eventHandler(() => {
},
{
id: 'ES00B',
type: 'compilation',
name: 'manifeste B',
duration: 2470,
description: 'Even Zero has a b-side',
@@ -139,6 +154,7 @@ export default eventHandler(() => {
},
{
id: 'ES01A',
type: 'compilation',
name: '...',
duration: 3487,
description: '...',
@@ -148,6 +164,7 @@ export default eventHandler(() => {
},
{
id: 'ES01B',
type: 'compilation',
name: '... B',
duration: 3773,
description: '...',
@@ -156,4 +173,5 @@ export default eventHandler(() => {
color3: '#00ff00'
}
]
return boxes.map((b) => ({ ...b, state: 'box-hidden' }))
})

View File

@@ -4,7 +4,7 @@ export default eventHandler(() => {
const tracks = [
{
order: 1,
compilationId: 'ES00A',
boxId: 'ES00A',
title: 'The grinding wheel',
artist: 0,
start: 0,
@@ -13,7 +13,7 @@ export default eventHandler(() => {
},
{
order: 2,
compilationId: 'ES00A',
boxId: 'ES00A',
title: 'Bleach',
artist: 1,
start: 392,
@@ -22,7 +22,7 @@ export default eventHandler(() => {
},
{
order: 3,
compilationId: 'ES00A',
boxId: 'ES00A',
title: 'Televised mind',
artist: 2,
start: 896,
@@ -31,7 +31,7 @@ export default eventHandler(() => {
},
{
order: 4,
compilationId: 'ES00A',
boxId: 'ES00A',
title: 'In it',
artist: 3,
start: 1139,
@@ -40,7 +40,7 @@ export default eventHandler(() => {
},
{
order: 5,
compilationId: 'ES00A',
boxId: 'ES00A',
title: 'Bad michel',
artist: 4,
start: 1245,
@@ -49,7 +49,7 @@ export default eventHandler(() => {
},
{
order: 6,
compilationId: 'ES00A',
boxId: 'ES00A',
title: 'Overall',
artist: 5,
start: 1394,
@@ -58,7 +58,7 @@ export default eventHandler(() => {
},
{
order: 7,
compilationId: 'ES00A',
boxId: 'ES00A',
title: 'Blowup',
artist: 6,
start: 1674,
@@ -67,7 +67,7 @@ export default eventHandler(() => {
},
{
order: 8,
compilationId: 'ES00A',
boxId: 'ES00A',
title: 'Guitar jet',
artist: 7,
start: 1880,
@@ -76,7 +76,7 @@ export default eventHandler(() => {
},
{
order: 9,
compilationId: 'ES00A',
boxId: 'ES00A',
title: 'Intercontinental radio waves',
artist: 8,
start: 2024,
@@ -85,7 +85,7 @@ export default eventHandler(() => {
},
{
order: 10,
compilationId: 'ES00A',
boxId: 'ES00A',
title: 'Here comes the sun',
artist: 9,
start: 2211,
@@ -94,7 +94,7 @@ export default eventHandler(() => {
},
{
order: 11,
compilationId: 'ES00A',
boxId: 'ES00A',
title: 'Like in the movies',
artist: 10,
start: 2560,
@@ -103,7 +103,7 @@ export default eventHandler(() => {
},
{
order: 1,
compilationId: 'ES00B',
boxId: 'ES00B',
title: "Ce que révèle l'éclipse",
artist: 0,
start: 0,
@@ -112,7 +112,7 @@ export default eventHandler(() => {
},
{
order: 2,
compilationId: 'ES00B',
boxId: 'ES00B',
title: "Bleedin' Gums Mushrool",
artist: 1,
start: 263,
@@ -121,7 +121,7 @@ export default eventHandler(() => {
},
{
order: 3,
compilationId: 'ES00B',
boxId: 'ES00B',
title: 'A lucid dream',
artist: 2,
start: 554,
@@ -130,7 +130,7 @@ export default eventHandler(() => {
},
{
order: 4,
compilationId: 'ES00B',
boxId: 'ES00B',
title: 'Lights off',
artist: 3,
start: 781,
@@ -139,7 +139,7 @@ export default eventHandler(() => {
},
{
order: 5,
compilationId: 'ES00B',
boxId: 'ES00B',
title: "I'm sentimental",
artist: 4,
start: 969,
@@ -148,7 +148,7 @@ export default eventHandler(() => {
},
{
order: 6,
compilationId: 'ES00B',
boxId: 'ES00B',
title: 'Thrill or trip',
artist: 5,
start: 1128,
@@ -157,7 +157,7 @@ export default eventHandler(() => {
},
{
order: 7,
compilationId: 'ES00B',
boxId: 'ES00B',
title: 'Redhead',
artist: 6,
start: 1303,
@@ -166,7 +166,7 @@ export default eventHandler(() => {
},
{
order: 8,
compilationId: 'ES00B',
boxId: 'ES00B',
title: 'Supersonic twist',
artist: 7,
start: 1584,
@@ -175,7 +175,7 @@ export default eventHandler(() => {
},
{
order: 9,
compilationId: 'ES00B',
boxId: 'ES00B',
title: 'Flowers',
artist: 8,
start: 1749,
@@ -184,7 +184,7 @@ export default eventHandler(() => {
},
{
order: 10,
compilationId: 'ES00B',
boxId: 'ES00B',
title: 'The shade',
artist: 9,
start: 1924,
@@ -193,7 +193,7 @@ export default eventHandler(() => {
},
{
order: 11,
compilationId: 'ES00B',
boxId: 'ES00B',
title: 'Like in the movies',
artist: 10,
start: 2186,
@@ -202,7 +202,7 @@ export default eventHandler(() => {
},
{
order: 1,
compilationId: 'ES01A',
boxId: 'ES01A',
title: 'He Walked In',
artist: 11,
start: 0,
@@ -211,7 +211,7 @@ export default eventHandler(() => {
},
{
order: 2,
compilationId: 'ES01A',
boxId: 'ES01A',
title: 'The Third Wave',
artist: 12,
start: 841,
@@ -220,7 +220,7 @@ export default eventHandler(() => {
},
{
order: 3,
compilationId: 'ES01A',
boxId: 'ES01A',
title: 'Broadcaster',
artist: 13,
start: 1104.5,
@@ -229,7 +229,7 @@ export default eventHandler(() => {
},
{
order: 4,
compilationId: 'ES01A',
boxId: 'ES01A',
title: 'Mourn',
artist: 14,
start: 1441,
@@ -238,7 +238,7 @@ export default eventHandler(() => {
},
{
order: 5,
compilationId: 'ES01A',
boxId: 'ES01A',
title: 'Let it Blow',
artist: 15,
start: 1844.8,
@@ -247,7 +247,7 @@ export default eventHandler(() => {
},
{
order: 6,
compilationId: 'ES01A',
boxId: 'ES01A',
title: 'Sunday Mourning',
artist: 16,
start: 2091.7,
@@ -256,7 +256,7 @@ export default eventHandler(() => {
},
{
order: 7,
compilationId: 'ES01A',
boxId: 'ES01A',
title: '3030 Instrumental',
artist: 17,
start: 2339.3,
@@ -265,7 +265,7 @@ export default eventHandler(() => {
},
{
order: 8,
compilationId: 'ES01A',
boxId: 'ES01A',
title: 'Immortality Break',
artist: 18,
start: 2530.5,
@@ -274,7 +274,7 @@ export default eventHandler(() => {
},
{
order: 9,
compilationId: 'ES01A',
boxId: 'ES01A',
title: 'Lazy Bones',
artist: 19,
start: 2718,
@@ -283,7 +283,7 @@ export default eventHandler(() => {
},
{
order: 10,
compilationId: 'ES01A',
boxId: 'ES01A',
title: 'On the Train of Aches',
artist: 20,
start: 2948,
@@ -292,7 +292,7 @@ export default eventHandler(() => {
},
{
order: 11,
compilationId: 'ES01A',
boxId: 'ES01A',
title: 'Me',
artist: 21,
start: 3265,
@@ -301,7 +301,7 @@ export default eventHandler(() => {
},
{
order: 1,
compilationId: 'ES01B',
boxId: 'ES01B',
title: 'Lady Hawke Blues',
artist: 11,
start: 0,
@@ -310,7 +310,7 @@ export default eventHandler(() => {
},
{
order: 2,
compilationId: 'ES01B',
boxId: 'ES01B',
title: 'Dreamscapes',
artist: 12,
start: 235,
@@ -319,7 +319,7 @@ export default eventHandler(() => {
},
{
order: 3,
compilationId: 'ES01B',
boxId: 'ES01B',
title: 'Crispy Skin',
artist: 13,
start: 644.2,
@@ -328,7 +328,7 @@ export default eventHandler(() => {
},
{
order: 4,
compilationId: 'ES01B',
boxId: 'ES01B',
title: 'The Boy Who Stood Above The Earth',
artist: 14,
start: 1018,
@@ -337,7 +337,7 @@ export default eventHandler(() => {
},
{
order: 5,
compilationId: 'ES01B',
boxId: 'ES01B',
title: 'Better Off Alone',
artist: 15,
start: 1698,
@@ -346,7 +346,7 @@ export default eventHandler(() => {
},
{
order: 6,
compilationId: 'ES01B',
boxId: 'ES01B',
title: 'Celebration #1',
artist: 16,
start: 2235,
@@ -355,7 +355,7 @@ export default eventHandler(() => {
},
{
order: 7,
compilationId: 'ES01B',
boxId: 'ES01B',
title: '3030 Instrumental',
artist: 17,
start: 2458.3,
@@ -364,7 +364,7 @@ export default eventHandler(() => {
},
{
order: 8,
compilationId: 'ES01B',
boxId: 'ES01B',
title: 'The Emptiness Of Nothingness',
artist: 18,
start: 2864.5,
@@ -373,7 +373,7 @@ export default eventHandler(() => {
},
{
order: 9,
compilationId: 'ES01B',
boxId: 'ES01B',
title: 'Rising',
artist: 19,
start: 3145,
@@ -382,7 +382,7 @@ export default eventHandler(() => {
},
{
order: 10,
compilationId: 'ES01B',
boxId: 'ES01B',
title: 'The Last Time',
artist: 22,
start: 3447,
@@ -392,7 +392,7 @@ export default eventHandler(() => {
},
{
order: 11,
compilationId: 'ES01B',
boxId: 'ES01B',
title: 'Guajira Con Arpa',
artist: 23,
start: 3586,
@@ -404,6 +404,8 @@ export default eventHandler(() => {
return tracks.map((track, index) => ({
id: index + 1,
...track,
url: `https://files.erudi.fr/evilspins/${track.compilationId}.mp3`
url: `https://files.erudi.fr/evilspins/${track.boxId}.mp3`,
coverId: `https://f4.bcbits.com/img/${track.coverId}_4.jpg`,
type: 'compilation',
}))
})

View File

@@ -1,7 +1,7 @@
import fs from 'fs'
import path from 'path'
import { eventHandler } from 'h3'
import { getCardFromDate } from '../../utils/cards'
import { getCardFromDate } from '../../../utils/cards'
export default eventHandler(async (event) => {
const basePath = path.join(process.cwd(), '/mnt/media/files/music')
@@ -47,17 +47,21 @@ export default eventHandler(async (event) => {
return {
id: Number(`${year}${index + 1}`),
compilationId: `ES${year}`,
boxId: `ES${year}`,
date,
title: title.trim(),
artist: artist.trim(),
url,
coverId,
card
card,
order: 0,
type: 'playlist',
}
})
tracks.sort((a, b) => b.date.getTime() - a.date.getTime())
// assign a stable order after sort (1..N)
tracks.forEach((t, i) => (t.order = i + 1))
allTracks.push(...tracks)
return allTracks