/**
 * Downloads management (Legacy - Modernized to HTMX)
 * This file is kept for backward compatibility but internal polling is disabled.
 */

async function loadDownloads() {
    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' });
    }
};
