96b12b66e2
- Neutralized downloads.js, watchlist-ui.js, and anime.js to prevent conflicts with HTMX - Guaranteed HTML responses in router_downloads.py via strict header detection - Unified frontend logic to follow the new server-driven architecture
20 lines
591 B
JavaScript
20 lines
591 B
JavaScript
/**
|
|
* Downloads management (Legacy - Modernized to HTMX)
|
|
* This file is kept for backward compatibility but internal polling is disabled.
|
|
*/
|
|
|
|
async function loadDownloads() {
|
|
console.log('Legacy loadDownloads called - redirected to HTMX refresh');
|
|
if (typeof htmx !== 'undefined') {
|
|
htmx.trigger('#downloads-container-inner', 'refresh');
|
|
}
|
|
}
|
|
|
|
// Disable legacy intervals
|
|
window.loadDownloads = loadDownloads;
|
|
window.handleCleanupDownloads = () => {
|
|
if (typeof htmx !== 'undefined') {
|
|
htmx.ajax('POST', '/api/downloads/cleanup', { swap: 'none' });
|
|
}
|
|
};
|