feat: téléchargement dans sous-dossiers par catégorie
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+3
-2
@@ -110,9 +110,10 @@ function renderConcerts(data) {
|
||||
const dl = state.downloadedUrls.has(c.url) ? `<span class="card-downloaded">✓ Téléchargé</span>` : '';
|
||||
const date = fmtDate(c.upload_date);
|
||||
const sub = c.subtitle ? `<div class="card-subtitle">${c.subtitle}</div>` : '';
|
||||
const downloadedClass = state.downloadedUrls.has(c.url) ? 'downloaded' : '';
|
||||
|
||||
return `
|
||||
<div class="card" data-id="${c.id}" tabindex="0" role="button" aria-label="${c.title}">
|
||||
<div class="card ${downloadedClass}" data-id="${c.id}" tabindex="0" role="button" aria-label="${c.title}">
|
||||
<div class="card-thumb-wrap">
|
||||
${thumb}${dur}${dl}
|
||||
</div>
|
||||
@@ -270,7 +271,7 @@ $('btn-download').addEventListener('click', async () => {
|
||||
const res = await fetch('/api/download', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ url: c.url, title: c.title, subtitle: c.subtitle || '', year }),
|
||||
body: JSON.stringify({ url: c.url, title: c.title, subtitle: c.subtitle || '', year, category: state.category }),
|
||||
});
|
||||
const { id } = await res.json();
|
||||
trackDownload(id, c.title, c.url);
|
||||
|
||||
Reference in New Issue
Block a user