Platine etape 1

This commit is contained in:
valere
2025-12-07 19:44:21 +01:00
parent 9f70419ea5
commit 6176995032
15 changed files with 771 additions and 27 deletions

View File

@@ -4,14 +4,12 @@ import { eventHandler } from 'h3'
import { getCardFromDate } from '../../../utils/cards'
export default eventHandler(async (event) => {
const basePath = path.join(process.cwd(), '/mnt/media/files/music')
const dirPath = path.join(process.cwd(), '/mnt/media/files/music')
const urlPrefix = `https://files.erudi.fr/music`
try {
let allTracks: any[] = []
const dirPath = basePath
const urlPrefix = `https://files.erudi.fr/music`
let files = await fs.promises.readdir(dirPath)
files = files.filter((f) => !f.startsWith('.') && !f.endsWith('.jpg'))