mirror of
https://github.com/Psychotoxical/psysonic.git
synced 2026-07-22 15:25:46 +00:00
fix(discord): add Apple Music cover opt-in, show Paused state
- iTunes Search API calls are now gated behind enableAppleMusicCoversDiscord (default: false). No external requests to Apple are made unless the user explicitly enables the new opt-in toggle in Settings. - When the toggle is flipped, Discord presence is immediately re-sent for the current track (coversSettingChanged bypasses the early-return guard). - When paused, activity type switches to Playing (no auto-timer) and state text shows "Paused" instead of the artist name. - New authStore field + setter; new Settings toggle shown only when Discord RPC is enabled; i18n keys added to all 7 languages. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -637,6 +637,21 @@ export default function Settings() {
|
||||
<span className="toggle-track" />
|
||||
</label>
|
||||
</div>
|
||||
{auth.discordRichPresence && (
|
||||
<>
|
||||
<div className="settings-section-divider" />
|
||||
<div className="settings-toggle-row" style={{ paddingLeft: 16 }}>
|
||||
<div>
|
||||
<div style={{ fontWeight: 500 }}>{t('settings.discordAppleCovers')}</div>
|
||||
<div style={{ fontSize: 12, color: 'var(--text-muted)' }}>{t('settings.discordAppleCoversDesc')}</div>
|
||||
</div>
|
||||
<label className="toggle-switch" aria-label={t('settings.discordAppleCovers')}>
|
||||
<input type="checkbox" checked={auth.enableAppleMusicCoversDiscord} onChange={e => auth.setEnableAppleMusicCoversDiscord(e.target.checked)} />
|
||||
<span className="toggle-track" />
|
||||
</label>
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
<div className="settings-section-divider" />
|
||||
<div className="settings-toggle-row">
|
||||
<div>
|
||||
|
||||
Reference in New Issue
Block a user