webui: send article/result title with RSS manual downloads
So the daemon names the torrent after the feed article or search result instead of the temp upload filename. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
b1f33d4194
commit
530390089c
1 changed files with 2 additions and 2 deletions
|
|
@ -1010,7 +1010,7 @@ async function renderRssView(host, seq) {
|
|||
}));
|
||||
host.querySelectorAll('.dl-art').forEach((b) => b.addEventListener('click', () => guard(async () => {
|
||||
const a = articles[+b.dataset.art];
|
||||
await api.rssDownload({ magnet: a.magnet || '', torrentUrl: a.torrentUrl || a.link || '', key: a.key || '' });
|
||||
await api.rssDownload({ title: a.title || '', magnet: a.magnet || '', torrentUrl: a.torrentUrl || a.link || '', key: a.key || '' });
|
||||
b.textContent = '✓ Added'; b.disabled = true;
|
||||
}, 'Failed to add torrent')));
|
||||
host.querySelectorAll('[data-rule-edit]').forEach((b) => b.addEventListener('click', () =>
|
||||
|
|
@ -1432,7 +1432,7 @@ function bindSearchRows() {
|
|||
document.querySelectorAll('[data-sr]').forEach((b) =>
|
||||
b.addEventListener('click', () => guard(async () => {
|
||||
const r = state.searchResults[+b.dataset.sr];
|
||||
await api.rssDownload({ magnet: r.magnet || '', torrentUrl: r.torrentUrl || '' });
|
||||
await api.rssDownload({ title: r.name || '', magnet: r.magnet || '', torrentUrl: r.torrentUrl || '' });
|
||||
b.textContent = '✓ Added'; b.disabled = true;
|
||||
}, 'Failed to add torrent')));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue