feat: nommage UNFR -ReMoRa automatique après téléchargement
Docker / docker (push) Has been cancelled
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:
+3
-1
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user