feat: persist als metadata and prevent duplicates

This commit is contained in:
renato97
2025-12-01 02:47:10 +00:00
parent ec8335a322
commit 5dafb7fcbf
3 changed files with 279 additions and 19 deletions

View File

@@ -93,3 +93,10 @@ Se añadió un flow en `data/flows.json` que usa Node-RED Dashboard para mostrar
- Puedes automatizar la subida llamando directamente al endpoint; el servidor responde con el mismo JSON que consume el dashboard (o `{ error: \"...\" }` en caso de fallo).
> Tip: si cambias el flujo desde el editor de Node-RED, recuerda exportarlo o guardar el nuevo `flows.json` para versionarlo aquí.
### Biblioteca y deduplicación
- Cada análisis queda persistido en `data/als-library.json` junto con su hash MD5 y todos los metadatos.
- Si intentas subir el mismo `.als`, el flujo detecta el hash duplicado, responde `409` y el dashboard avisa sin sobrescribir la biblioteca.
- Para consultar el inventario (por ejemplo, desde una IA) usa `GET /als/library`; el endpoint devuelve el arreglo completo de proyectos almacenados.
- Como el archivo vive dentro de `/data`, puedes versionarlo o respaldarlo fácilmente según tu flujo de trabajo.

173
data/als-library.json Normal file
View File

@@ -0,0 +1,173 @@
[
{
"hash": "9dbed77293415a951c43101ef30873d4",
"projectName": "GHOSTPRODUCTION.PRO (ABLETON LIVE) (Style RUFUS DUU SOL).als",
"meta": {
"creator": "Ableton Live 12.2",
"version": "5.12.0_12203",
"revision": "1c7a2c5dacd710ba28150f2c1534c22b1c158263",
"fileName": "GHOSTPRODUCTION.PRO (ABLETON LIVE) (Style RUFUS DUU SOL).als",
"sizeBytes": 6685879,
"sizeHuman": "6.4 MB"
},
"liveSet": {
"tempo": 124,
"loopLengthBeats": 272,
"durationSeconds": 131.61290322580646,
"durationHuman": "2:12",
"loopStart": 0,
"scenes": []
},
"tracks": [
{
"name": "VOCAL",
"type": "Audio",
"deviceCount": 3,
"color": "22"
},
{
"name": "KICK #1",
"type": "Audio",
"deviceCount": 0,
"color": "22"
},
{
"name": "5-Audio",
"type": "Audio",
"deviceCount": 1,
"color": "22"
},
{
"name": "6-Audio",
"type": "Audio",
"deviceCount": 2,
"color": "22"
},
{
"name": "KSMR FX",
"type": "Audio",
"deviceCount": 1,
"color": "22"
},
{
"name": "Clap",
"type": "MIDI",
"deviceCount": 1,
"color": "22"
},
{
"name": "9-Serum 2",
"type": "MIDI",
"deviceCount": 4,
"color": "22"
},
{
"name": "10-Serum 2",
"type": "MIDI",
"deviceCount": 2,
"color": "22"
},
{
"name": "12-Serum 2",
"type": "MIDI",
"deviceCount": 3,
"color": "22"
},
{
"name": "13-Serum 2",
"type": "MIDI",
"deviceCount": 2,
"color": "22"
},
{
"name": "14-Serum 2",
"type": "MIDI",
"deviceCount": 2,
"color": "22"
},
{
"name": "15-Serum 2",
"type": "MIDI",
"deviceCount": 3,
"color": "22"
},
{
"name": "16-Serum 2",
"type": "MIDI",
"deviceCount": 3,
"color": "22"
},
{
"name": "17-Serum 2",
"type": "MIDI",
"deviceCount": 3,
"color": "22"
},
{
"name": "18-Serum 2",
"type": "MIDI",
"deviceCount": 5,
"color": "22"
},
{
"name": "19-Serum 2",
"type": "MIDI",
"deviceCount": 2,
"color": "22"
},
{
"name": "Drums",
"type": "Grupo",
"deviceCount": 1,
"color": "22"
},
{
"name": "LEAD",
"type": "Grupo",
"deviceCount": 3,
"color": "22"
},
{
"name": "Bass",
"type": "Grupo",
"deviceCount": 1,
"color": "22"
}
],
"stats": {
"audio": 5,
"midi": 11,
"group": 3,
"totalTracks": 19,
"devices": 42,
"scenes": 0,
"samples": 8
},
"samples": {
"total": 8,
"relative": [
"Samples/Imported/RUFUS DU SOL - In the Moment (Adriatique Remix) Acapella.mp3",
"Samples/Processed/Bounce/Bounce KICK #1 [2025-08-30 144250]-3.wav",
"Samples/Recorded/12-Audio 0001 [2025-08-30 143952].wav",
"Presets/Audio Effects/Audio Effect Rack/Filter HI and Low.adg",
"Samples/Recorded/12-Audio 0001 [2025-08-30 144108].wav",
"Samples/Imported/Clap Fx.wav",
"Samples/Imported/Clap.wav",
"Swing and Groove/Swing/Swing 16-99.agr"
],
"absolute": [
"C:/Users/novik/Desktop/YOUTUBE RUFUS DUU SOL & ARTBAT/GHOSTPRODUCTION.PRO (ABLETON LIVE) (Style RUFUS DUU SOL) Project/Samples/Imported/RUFUS DU SOL - In the Moment (Adriatique Remix) Acapella.mp3",
"C:/VST2/Proximity-x64.dll",
"C:/Users/novik/Desktop/YOUTUBE RUFUS DUU SOL & ARTBAT/GHOSTPRODUCTION.PRO (ABLETON LIVE) (Style RUFUS DUU SOL) Project/Samples/Processed/Bounce/Bounce KICK #1 [2025-08-30 144250]-3.wav",
"C:/Users/novik/Desktop/YOUTUBE RUFUS DUU SOL & ARTBAT/GHOSTPRODUCTION.PRO (ABLETON LIVE) (Style RUFUS DUU SOL) Project/Samples/Recorded/12-Audio 0001 [2025-08-30 143952].wav",
"C:/Users/novik/OneDrive/Documenten/Ableton/User Library/Presets/Audio Effects/Audio Effect Rack/Filter HI and Low.adg",
"C:/Users/novik/Desktop/YOUTUBE RUFUS DUU SOL & ARTBAT/GHOSTPRODUCTION.PRO (ABLETON LIVE) (Style RUFUS DUU SOL) Project/Samples/Recorded/12-Audio 0001 [2025-08-30 144108].wav",
"C:/VST2/Fabfilter/FabFilter Pro-Q 4.dll",
"C:/Users/novik/Desktop/YOUTUBE RUFUS DUU SOL & ARTBAT/GHOSTPRODUCTION.PRO (ABLETON LIVE) (Style RUFUS DUU SOL) Project/Samples/Imported/Clap Fx.wav",
"C:/Users/novik/Desktop/YOUTUBE RUFUS DUU SOL & ARTBAT/GHOSTPRODUCTION.PRO (ABLETON LIVE) (Style RUFUS DUU SOL) Project/Samples/Imported/Clap.wav",
"C:/VST2/Fabfilter/FabFilter Pro-C 2.dll"
]
},
"storedAt": "2025-12-01T02:46:38.916Z"
}
]

File diff suppressed because one or more lines are too long