feat: nommage UNFR -ReMoRa automatique après téléchargement
Docker / docker (push) Has been cancelled

Format : Title.Event.Year.FRENCH.Resolution.WEBRip.x264|HEVC.AAC-ReMoRa.mp4

- build_release_name() : slugify avec strip accents, apostrophe→point,
  déduplique l'année si présente dans le titre ET passée séparément,
  détecte la résolution et le codec depuis les infos yt-dlp
- enqueue() : reçoit subtitle + year depuis l'API
- _run() : renomme le fichier après download, met à jour le filename en DB
- DownloadRequest : subtitle + year ajoutés
- app.js : extrait l'année du subtitle via regex avant d'envoyer la requête

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
dev
2026-04-26 13:48:56 +02:00
parent 9a5e356238
commit 124afb6d20
3 changed files with 86 additions and 8 deletions
+3 -1
View File
@@ -265,10 +265,12 @@ $('btn-download').addEventListener('click', async () => {
btnDl.textContent = 'Démarrage…';
try {
const yearMatch = (c.subtitle || '').match(/\b(20\d{2})\b/);
const year = yearMatch ? parseInt(yearMatch[1]) : null;
const res = await fetch('/api/download', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ url: c.url, title: c.title }),
body: JSON.stringify({ url: c.url, title: c.title, subtitle: c.subtitle || '', year }),
});
const { id } = await res.json();
trackDownload(id, c.title, c.url);