// ── Download Origins modal ── // "What did the watchlist / playlist syncs download?" One modal, two tabs, // opened from the Watchlist page (watchlist tab) and the Sync page (playlists // tab). Entries come from library_history rows stamped with origin provenance // at the import chokepoint (core/downloads/origin.py). Delete removes the // file on disk, the library track row, and the history entries. let _originModalEl = null; let _originActiveTab = 'watchlist'; let _originEntries = []; let _originSelected = new Set(); function openDownloadOriginsModal(tab) { _originActiveTab = tab === 'playlist' ? 'playlist' : 'watchlist'; _originSelected = new Set(); if (!_originModalEl) { _originModalEl = document.createElement('div'); _originModalEl.className = 'modal-overlay origin-modal-overlay'; _originModalEl.innerHTML = `
What your watchlist and playlist syncs have downloaded.