WebUI: restore Soulseek-only gating for the Quality Profile tile

Reinstate the Soulseek dependency (quality profile only affects Soulseek
downloads) that was dropped while fixing the empty-tile bug. Gate the whole
collapsible tile (#quality-profile-tile) as a unit instead of the inner group,
so it fully shows (Soulseek active + downloads tab) or fully hides — no empty
expandable shell. switchSettingsTab runs updateDownloadSourceUI after the
data-stg tab filter, so this gate is authoritative on tab switches.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
dev 2026-06-05 22:59:30 +02:00
parent 37140dff34
commit 69a37e96b7

View file

@ -1713,13 +1713,17 @@ function updateDownloadSourceUI() {
prowlarrRedirect.style.display = showProwlarr ? 'block' : 'none'; prowlarrRedirect.style.display = showProwlarr ? 'block' : 'none';
} }
// Quality Profile tile visibility is handled entirely by the settings tab // Quality profile is Soulseek-only (it only affects Soulseek downloads) and
// filter (data-stg="downloads" on #quality-profile-tile) — the same mechanism // downloads-tab-only. Gate the WHOLE collapsible tile (#quality-profile-tile
// the Retry Logic tile uses. The old Soulseek-only JS gate fought the tab // = header + body) as a unit, so it either fully shows (Soulseek active) or
// filter for control of `display` and, depending on activeSources/tab timing, // fully hides — never an empty expandable shell (the earlier bug came from
// left the tile either empty (when it gated the inner group) or fully hidden // gating only the inner #quality-profile-section).
// (when it gated the wrapper). Letting the tab filter own visibility makes it const qualityProfileTile = document.getElementById('quality-profile-tile');
// behave exactly like the working Retry Logic tile. if (qualityProfileTile) {
const activeTab = document.querySelector('.stg-tab.active');
const onDownloadsTab = activeTab && activeTab.dataset.tab === 'downloads';
qualityProfileTile.style.display = (activeSources.has('soulseek') && onDownloadsTab) ? '' : 'none';
}
if (activeSources.has('tidal')) { if (activeSources.has('tidal')) {
checkTidalDownloadAuthStatus(); checkTidalDownloadAuthStatus();