feat: Qobuz™ compliance, subscription gating, and settings cleanup

cx
This commit is contained in:
vicrodh committed 2026-01-22 10:33:45 -06:00
1 parent ee515573a2
commit 2a8b7c6d55
29 files changed
+918 -306

No files matched your search

+5 -2
View File
@@ -3,6 +3,7 @@
import { openUrl } from '@tauri-apps/plugin-opener';
import { getName, getVersion } from '@tauri-apps/api/app';
import { onMount } from 'svelte';
import QobuzLegalNotice from '$lib/components/QobuzLegalNotice.svelte';
interface Props {
isOpen: boolean;
@@ -63,10 +64,12 @@
<div class="modal-content">
<!-- Description -->
<p class="description">
A native Qobuz client for Linux, designed for audiophiles who need
A native music streaming client for Linux, designed for audiophiles who need
bit-perfect Hi-Fi playback without browser sample rate limitations.
</p>
<QobuzLegalNotice showCheckbox={false} />
<!-- Links -->
<div class="links">
<button class="link-btn" onclick={() => handleOpenUrl('https://github.com/vicrodh/qbz')}>
@@ -106,7 +109,7 @@
<h3>Acknowledgments</h3>
<div class="attributions">
<div class="attribution">
<strong>Qobuz</strong> — Music streaming service and API
<strong>Qobuz™</strong> — Music streaming service and API
</div>
<div class="attribution">
<strong>Tauri</strong> — Application framework (MIT/Apache-2.0)
+1 -1
View File
@@ -288,7 +288,7 @@
{#if onShareQobuz}
<button class="menu-item" onclick={() => handleAction(onShareQobuz)}>
<Link size={14} />
<span>Qobuz link</span>
<span>Qobuz™ link</span>
</button>
{/if}
{#if onShareSonglink}
+1 -1
View File
@@ -134,7 +134,7 @@
<span class="section-label">
{section.label}
{#if section.source === 'qobuz'}
<span class="source-badge qobuz">Qobuz</span>
<span class="source-badge qobuz">Qobuz™</span>
{:else if section.source === 'ml'}
<span class="source-badge ml">ML</span>
{/if}
+1 -1
View File
@@ -83,7 +83,7 @@
This process will:
</p>
<ul>
<li>Fetch complete metadata from Qobuz</li>
<li>Fetch complete metadata from Qobuz™</li>
<li>Add proper tags to your FLAC files</li>
<li>Organize files into Artist/Album folders</li>
<li>Embed album artwork</li>
@@ -3,6 +3,8 @@
import { X, CloudOff } from 'lucide-svelte';
import { showToast } from '$lib/stores/toastStore';
import { t } from '$lib/i18n';
import QobuzLegalNotice from '$lib/components/QobuzLegalNotice.svelte';
import { qobuzTosAccepted } from '$lib/stores/qobuzLegalStore';
import {
subscribe as subscribeOffline,
isOffline as checkIsOffline
@@ -68,7 +70,7 @@
const detectedProvider = $derived(detectProvider(url));
const activeProvider = $derived(lockedProvider ?? detectedProvider);
const isValid = $derived(!!detectedProvider && !isOffline);
const isValid = $derived(!!detectedProvider && !isOffline && $qobuzTosAccepted);
$effect(() => {
if (isOpen) {
@@ -135,7 +137,7 @@
const preview = await invoke<ImportPlaylist>('playlist_import_preview', { url });
pushLog(`Found ${preview.tracks.length} tracks from ${formatProvider(preview.provider)}.`);
pushLog('Matching tracks in Qobuz...');
pushLog('Matching tracks in Qobuz™...');
const result = await invoke<ImportSummary>('playlist_import_execute', {
url,
nameOverride: null,
@@ -148,7 +150,7 @@
pushLog(`Imported ${result.matched_tracks} of ${result.total_tracks} tracks into QBZ.`, 'success');
if (result.qobuz_playlist_id) {
pushLog('Playlist created in Qobuz.', 'success');
pushLog('Playlist created in Qobuz™.', 'success');
} else {
pushLog('No matching tracks found.', 'error');
}
@@ -202,7 +204,7 @@
<div class="modal" onclick={(e) => e.stopPropagation()}>
<div class="modal-header">
<div class="header-title">
<img src="/qobuz-logo.svg" alt="Qobuz" class="qobuz-logo" />
<img src="/qobuz-logo.svg" alt="Qobuz™" class="qobuz-logo" />
<h2>Import Playlist</h2>
</div>
<button class="close-btn" onclick={onClose}>
@@ -211,6 +213,8 @@
</div>
<div class="modal-body">
<QobuzLegalNotice checkboxDisabled={loading} />
{#if isOffline}
<div class="offline-warning" role="alert" aria-live="polite">
<CloudOff size={16} aria-hidden="true" />
+101
View File
@@ -0,0 +1,101 @@
<script lang="ts">
import { t } from '$lib/i18n';
import { qobuzTosAccepted } from '$lib/stores/qobuzLegalStore';
interface Props {
showCheckbox?: boolean;
showBrandingLine?: boolean;
showTrademarkNotice?: boolean;
showTermsLink?: boolean;
checkboxDisabled?: boolean;
className?: string;
}
let {
showCheckbox = true,
showBrandingLine = true,
showTrademarkNotice = true,
showTermsLink = false,
checkboxDisabled = false,
className = ''
}: Props = $props();
const TERMS_URL = 'https://www.qobuz.com/us-en/legal/terms';
</script>
<div class={`qobuz-legal ${className}`}>
{#if showBrandingLine}
<p class="branding-line">
This application uses the Qobuz API but is not certified by Qobuz.
</p>
{/if}
{#if showTrademarkNotice}
<p class="trademark-line">
{$t('legal.trademarkNotice')}
</p>
{/if}
{#if showCheckbox}
<label class="tos-line">
<input type="checkbox" bind:checked={$qobuzTosAccepted} disabled={checkboxDisabled} />
<span>
{$t('legal.tosAgreementPrefix')}
<a href={TERMS_URL} target="_blank" rel="noopener">
{$t('legal.tosLinkText')}
</a>
</span>
</label>
{:else if showTermsLink}
<p class="tos-link">
<a href={TERMS_URL} target="_blank" rel="noopener">
{$t('legal.tosLinkText')}
</a>
</p>
{/if}
</div>
<style>
.qobuz-legal {
margin-top: 12px;
}
.branding-line {
font-size: 12px;
color: var(--text-muted);
line-height: 1.4;
margin: 0 0 10px;
}
.tos-line {
display: flex;
gap: 10px;
align-items: flex-start;
font-size: 12px;
color: var(--text-muted);
line-height: 1.4;
user-select: none;
}
.tos-line input {
margin-top: 2px;
}
.trademark-line {
font-size: 12px;
color: var(--text-muted);
line-height: 1.4;
margin: 0 0 10px;
}
.tos-line a,
.tos-link a {
color: var(--accent-primary);
text-decoration: none;
}
.tos-line a:hover,
.tos-link a:hover {
text-decoration: underline;
}
</style>
+1 -1
View File
@@ -61,7 +61,7 @@
onAboutClick,
onLogout,
userName = 'User',
subscription = 'Qobuz'
subscription = 'Qobuz™'
}: Props = $props();
let userPlaylists = $state<Playlist[]>([]);
+1 -1
View File
@@ -332,7 +332,7 @@
{#if onShareQobuz}
<button class="menu-item" onclick={() => handleAction(onShareQobuz)}>
<Link size={14} />
<span>Qobuz link</span>
<span>Qobuz™ link</span>
</button>
{/if}
{#if onShareSonglink}
+149 -88
View File
@@ -3,10 +3,13 @@
import TitleBar from '../TitleBar.svelte';
import { t } from '$lib/i18n';
import { setManualOffline } from '$lib/stores/offlineStore';
import { qobuzTosAccepted } from '$lib/stores/qobuzLegalStore';
import { get } from 'svelte/store';
interface UserInfo {
userName: string;
subscription: string;
subscriptionValidUntil?: string | null;
}
interface Props {
@@ -21,7 +24,7 @@
let rememberMe = $state(true);
let isLoading = $state(false);
let isInitializing = $state(true);
let initStatus = $state('Connecting to Qobuz...');
let initStatus = $state('Connecting to Qobuz™...');
let error = $state<string | null>(null);
let initError = $state<string | null>(null);
let isTimedOut = $state(false);
@@ -29,7 +32,7 @@
const LOGIN_TIMEOUT_MS = 60000; // 60 seconds
// Initialize the Qobuz client on mount
// Initialize the Qobuz™ client on mount
$effect(() => {
initializeClient();
return () => {
@@ -46,7 +49,7 @@
isInitializing = true;
initError = null;
isTimedOut = false;
initStatus = 'Connecting to Qobuz...';
initStatus = 'Connecting to Qobuz™...';
// Start timeout timer
if (timeoutId) {
@@ -67,11 +70,15 @@
const loggedIn = await invoke<boolean>('is_logged_in');
if (loggedIn) {
clearTimeoutTimer();
const userInfo = await invoke<{ user_name: string; subscription: string } | null>('get_user_info');
const userInfo = await invoke<{ user_name: string; subscription: string; subscription_valid_until?: string | null } | null>('get_user_info');
if (userInfo) {
onLoginSuccess({ userName: userInfo.user_name, subscription: userInfo.subscription });
onLoginSuccess({
userName: userInfo.user_name,
subscription: userInfo.subscription,
subscriptionValidUntil: userInfo.subscription_valid_until ?? null,
});
} else {
onLoginSuccess({ userName: 'Qobuz User', subscription: 'Active' });
onLoginSuccess({ userName: 'User', subscription: 'Active' });
}
return;
}
@@ -80,25 +87,31 @@
initStatus = 'Checking saved credentials...';
const hasSavedCreds = await invoke<boolean>('has_saved_credentials');
if (hasSavedCreds) {
if (hasSavedCreds && get(qobuzTosAccepted)) {
initStatus = 'Logging in...';
const response = await invoke<{
success: boolean;
user_name?: string;
subscription?: string;
subscription_valid_until?: string | null;
error?: string;
error_code?: string;
}>('auto_login');
if (response.success) {
clearTimeoutTimer();
console.log('Auto-login successful');
onLoginSuccess({
userName: response.user_name || 'Qobuz User',
subscription: response.subscription || 'Active'
userName: response.user_name || 'User',
subscription: response.subscription || 'Active',
subscriptionValidUntil: response.subscription_valid_until ?? null,
});
return;
} else {
console.log('Auto-login failed:', response.error);
if (response.error_code === 'ineligible_user') {
error = $t('auth.ineligibleSubscription');
}
// Don't show error, just fall through to manual login
}
}
@@ -131,6 +144,11 @@
async function handleLogin(e: Event) {
e.preventDefault();
if (!get(qobuzTosAccepted)) {
error = $t('legal.tosRequiredToLogin');
return;
}
if (!email || !password) {
error = 'Please enter email and password';
return;
@@ -144,7 +162,9 @@
success: boolean;
user_name?: string;
subscription?: string;
subscription_valid_until?: string | null;
error?: string;
error_code?: string;
}>('login', { email, password });
console.log('Login response:', response);
@@ -162,11 +182,16 @@
}
onLoginSuccess({
userName: response.user_name || 'Qobuz User',
subscription: response.subscription || 'Active'
});
userName: response.user_name || 'User',
subscription: response.subscription || 'Active',
subscriptionValidUntil: response.subscription_valid_until ?? null,
});
} else {
error = response.error || 'Login failed';
if (response.error_code === 'ineligible_user') {
error = $t('auth.ineligibleSubscription');
} else {
error = response.error || 'Login failed';
}
}
} catch (err) {
console.error('Login error:', err);
@@ -194,15 +219,13 @@
<!-- Logo -->
<div class="logo">
<img src="/logo.png" alt="QBZ Logo" class="logo-img" />
<h1>QBZ</h1>
<p class="subtitle">Native Qobuz Client for Linux</p>
</div>
{#if isTimedOut}
<div class="timeout-box">
<p class="timeout-title">Connection is taking too long</p>
<p class="timeout-detail">
Unable to connect to Qobuz after 60 seconds. This could be a network issue or Qobuz may be temporarily unavailable.
Unable to connect to Qobuz™ after 60 seconds. This could be a network issue or Qobuz™ may be temporarily unavailable.
</p>
<div class="timeout-actions">
<button class="retry-btn" onclick={handleRetryLogin}>Try Again</button>
@@ -216,69 +239,86 @@
</div>
{:else if initError}
<div class="error-box">
<p>Failed to connect to Qobuz</p>
<p>Failed to connect to Qobuz™</p>
<p class="error-detail">{initError}</p>
<button class="retry-btn" onclick={initializeClient}>Retry</button>
</div>
{:else}
<form onsubmit={handleLogin}>
<div class="input-group">
<label for="email">Email</label>
<input
id="email"
type="email"
bind:value={email}
placeholder="your@email.com"
disabled={isLoading}
autocomplete="email"
/>
</div>
<div class="login-body">
<form onsubmit={handleLogin}>
<div class="input-group">
<label for="email">Email</label>
<input
id="email"
type="email"
bind:value={email}
placeholder="your@email.com"
disabled={isLoading}
autocomplete="email"
/>
</div>
<div class="input-group">
<label for="password">Password</label>
<input
id="password"
type="password"
bind:value={password}
placeholder="Password"
disabled={isLoading}
autocomplete="current-password"
/>
</div>
<div class="input-group">
<label for="password">Password</label>
<input
id="password"
type="password"
bind:value={password}
placeholder="Password"
disabled={isLoading}
autocomplete="current-password"
/>
</div>
<div class="remember-me">
<label>
<input type="checkbox" bind:checked={rememberMe} />
<span>Remember me</span>
</label>
</div>
<div class="remember-me">
<label>
<input type="checkbox" bind:checked={rememberMe} />
<span>Remember me</span>
</label>
</div>
{#if error}
<div class="error-message">{error}</div>
{/if}
<div class="remember-me tos-remember">
<label>
<input type="checkbox" bind:checked={$qobuzTosAccepted} disabled={isLoading} />
<span>
{$t('legal.tosAgreementPrefix')}
<a href="https://www.qobuz.com/us-en/legal/terms" target="_blank" rel="noopener">
{$t('legal.tosLinkText')}
</a>
</span>
</label>
</div>
<button type="submit" class="login-btn" disabled={isLoading}>
{#if isLoading}
<div class="spinner small"></div>
<span>Signing in...</span>
{:else}
<span>Sign in with Qobuz</span>
{#if error}
<div class="error-message">{error}</div>
{/if}
</button>
</form>
<p class="disclaimer">
QBZ requires an active Qobuz subscription.
Your credentials are sent directly to Qobuz and stored securely in your system's keyring.
</p>
<p class="offline-link">
<small>
<button type="button" class="link-button" onclick={handleStartOffline}>
{$t('offline.startWithoutLogin')}
<button type="submit" class="login-btn" disabled={isLoading || !$qobuzTosAccepted}>
{#if isLoading}
<div class="spinner small"></div>
<span>Signing in...</span>
{:else}
<span>Sign in with Qobuz™</span>
{/if}
</button>
</small>
</p>
<p class="offline-link">
<small>
<button type="button" class="link-button" onclick={handleStartOffline}>
{$t('offline.startWithoutLogin')}
</button>
</small>
</p>
</form>
<div class="login-footer">
<p class="footer-copy">
QBZ requires an active Qobuz™ subscription. Your credentials are sent directly to Qobuz™.<br />
This application uses the Qobuz API but is not certified by Qobuz. {$t('legal.trademarkNotice')}
</p>
</div>
</div>
{/if}
</div>
</div>
@@ -300,14 +340,19 @@
background-color: var(--bg-primary);
}
.login-card {
width: 100%;
max-width: 400px;
padding: 48px;
background-color: var(--bg-secondary);
border-radius: 16px;
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}
.login-card {
width: 100%;
max-width: 720px;
padding: 52px;
background-color: var(--bg-secondary);
border-radius: 16px;
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
display: flex;
flex-direction: column;
min-height: min(700px, 85vh);
max-height: 90vh;
overflow-y: auto;
}
.logo {
text-align: center;
@@ -321,17 +366,33 @@
object-fit: contain;
}
.logo h1 {
font-size: 24px;
font-weight: 700;
color: var(--text-primary);
margin-top: 16px;
margin-bottom: 4px;
.login-body {
flex: 1;
display: flex;
flex-direction: column;
}
.subtitle {
font-size: 14px;
color: var(--text-muted);
.login-footer {
margin-top: auto;
padding-top: 16px;
text-align: center;
}
.tos-remember label {
width: 100%;
}
.tos-remember span {
white-space: nowrap;
}
.tos-remember a {
color: var(--accent-primary);
text-decoration: none;
}
.tos-remember a:hover {
text-decoration: underline;
}
.initializing {
@@ -524,16 +585,16 @@
cursor: not-allowed;
}
.disclaimer {
margin-top: 24px;
.footer-copy {
font-size: 12px;
color: var(--text-muted);
text-align: center;
line-height: 1.5;
margin: 0;
}
.offline-link {
margin-top: 16px;
margin-top: 4px;
text-align: center;
}
+106 -144
View File
@@ -2,14 +2,13 @@
import { onMount } from 'svelte';
import { invoke } from '@tauri-apps/api/core';
import { getCurrentWebview } from '@tauri-apps/api/webview';
import { ArrowLeft, FolderOpen, ChevronDown, ChevronRight, Loader2 } from 'lucide-svelte';
import { ArrowLeft, ChevronDown, ChevronRight, Loader2 } from 'lucide-svelte';
import Toggle from '../Toggle.svelte';
import Dropdown from '../Dropdown.svelte';
import VolumeSlider from '../VolumeSlider.svelte';
import {
getDownloadCacheStats,
clearDownloadCache,
openDownloadCacheFolder,
type DownloadCacheStats
} from '$lib/stores/downloadState';
import { notifyDownloadSettingsChanged } from '$lib/stores/downloadSettingsStore';
@@ -58,6 +57,7 @@
userName?: string;
userEmail?: string;
subscription?: string;
subscriptionValidUntil?: string | null;
}
interface CacheStats {
@@ -80,7 +80,14 @@
is_active: boolean;
}
let { onBack, onLogout, userName = 'User', userEmail = '', subscription = 'Qobuz' }: Props = $props();
let {
onBack,
onLogout,
userName = 'User',
userEmail = '',
subscription = 'Qobuz™',
subscriptionValidUntil = null
}: Props = $props();
// Cache state (memory cache)
let cacheStats = $state<CacheStats | null>(null);
@@ -93,6 +100,7 @@
// Lyrics cache state
let isClearingLyrics = $state(false);
let lyricsCacheStats = $state<{ entries: number; sizeBytes: number } | null>(null);
// Migration state
let showMigrationModal = $state(false);
@@ -117,7 +125,6 @@
let librarySection: HTMLElement;
let integrationsSection: HTMLElement;
let storageSection: HTMLElement;
let lyricsSection: HTMLElement;
let activeSection = $state('audio');
// Navigation section definitions (static, refs resolved at click/scroll time)
@@ -130,7 +137,6 @@
{ id: 'library', label: 'Library' },
{ id: 'integrations', label: 'Integrations' },
{ id: 'storage', label: 'Storage' },
{ id: 'lyrics', label: 'Lyrics' },
];
// Get section element by id (resolved at call time, not definition time)
@@ -144,7 +150,6 @@
case 'library': return librarySection;
case 'integrations': return integrationsSection;
case 'storage': return storageSection;
case 'lyrics': return lyricsSection;
default: return undefined;
}
}
@@ -366,7 +371,6 @@
// Library settings
let fetchQobuzArtistImages = $state(true);
let showQobuzDownloadsInLibrary = $state(false);
let downloadRoot = $state('');
// Last.fm integration state
let lastfmConnected = $state(false);
@@ -431,6 +435,9 @@
// Load download cache stats
loadDownloadStats();
// Load lyrics cache stats
loadLyricsCacheStats();
// Load audio devices first (includes PipeWire sinks), then settings
// Also load backends and ALSA plugins
Promise.all([
@@ -1146,6 +1153,16 @@
}
}
async function loadLyricsCacheStats() {
try {
const stats = await invoke<{ entries: number; sizeBytes: number }>('lyrics_get_cache_stats');
lyricsCacheStats = stats;
} catch (err) {
console.error('Failed to load lyrics cache stats:', err);
lyricsCacheStats = null;
}
}
async function loadDownloadStats() {
try {
downloadStats = await getDownloadCacheStats();
@@ -1158,7 +1175,6 @@
try {
const settings = await invoke<{download_root: string, show_in_library: boolean}>('get_download_settings');
showQobuzDownloadsInLibrary = settings.show_in_library;
downloadRoot = settings.download_root;
} catch (err) {
console.error('Failed to load download settings:', err);
}
@@ -1220,78 +1236,6 @@
loadDownloadStats();
}
async function handleChangeDownloadFolder() {
try {
const { open } = await import('@tauri-apps/plugin-dialog');
const result = await open({
title: 'Select Downloads Folder',
directory: true,
defaultPath: downloadRoot || undefined
});
if (result) {
// Validate the path
const valid = await invoke<boolean>('validate_download_path', { path: result });
if (!valid) {
alert('Invalid path or insufficient permissions. Please select a different folder.');
return;
}
// Check if this is a network folder and warn user
interface NetworkPathInfo {
isNetwork: boolean;
mountInfo: { fsType: string; kind: string } | null;
path: string;
}
const networkInfo = await invoke<NetworkPathInfo>('check_network_path', { path: result });
if (networkInfo.isNetwork) {
const proceed = confirm(
$t('settings.networkDownloadWarning') + '\n\n' +
$t('settings.networkDownloadWarningDetail')
);
if (!proceed) {
return;
}
}
// Ask if user wants to move existing downloads
const hasDownloads = downloadStats && downloadStats.readyTracks > 0;
let moveFiles = false;
if (hasDownloads) {
moveFiles = confirm(
`You have ${downloadStats!.readyTracks} downloaded tracks.\n\n` +
'Would you like to move them to the new location?\n\n' +
'Click OK to move files, or Cancel to keep them in the old location.'
);
}
// Update download root
const moveResult = await invoke<{moved: number, failed: string[]}>('set_download_root', {
path: result,
moveExisting: moveFiles
});
downloadRoot = result;
if (moveFiles && moveResult.moved > 0) {
alert(`Successfully moved ${moveResult.moved} tracks to the new location.`);
}
if (moveResult.failed.length > 0) {
console.error('Failed to move files:', moveResult.failed);
}
// Reload download stats
await loadDownloadStats();
}
} catch (err) {
console.error('Failed to change download folder:', err);
alert(`Failed to change download folder: ${err}`);
}
}
async function handleRepairDownloads() {
if (isRepairingDownloads) return;
isRepairingDownloads = true;
@@ -1331,14 +1275,6 @@
}
}
async function handleOpenDownloadFolder() {
try {
await openDownloadCacheFolder();
} catch (err) {
console.error('Failed to open download folder:', err);
}
}
async function handleClearCache() {
if (isClearing) return;
isClearing = true;
@@ -1358,6 +1294,7 @@
try {
await clearLyricsCache();
console.log('Lyrics cache cleared');
await loadLyricsCacheStats();
} catch (err) {
console.error('Failed to clear lyrics cache:', err);
} finally {
@@ -1433,6 +1370,11 @@
<div class="email">{userEmail}</div>
{/if}
<div class="subscription">{subscription}</div>
{#if subscriptionValidUntil}
<div class="subscription-until">
{$t('settings.account.validUntil', { values: { date: subscriptionValidUntil } })}
</div>
{/if}
</div>
<button class="logout-btn" onclick={onLogout}>{$t('settings.account.logout')}</button>
</div>
@@ -1726,19 +1668,10 @@
<!-- Downloads Section -->
<section class="section" bind:this={downloadsSection}>
<h3 class="section-title">Downloads</h3>
<h3 class="section-title">{$t('settings.downloads.title')}</h3>
<p class="section-note">{$t('settings.downloads.offlineCacheDisclaimer')}</p>
<div class="setting-row">
<div class="setting-with-description">
<span class="setting-label">Download Folder</span>
<span class="setting-description">{downloadRoot || 'Default location'}</span>
</div>
<button class="secondary-btn" onclick={handleChangeDownloadFolder}>
<FolderOpen size={14} />
<span>Change</span>
</button>
</div>
<div class="setting-row">
<span class="setting-label">Downloaded Tracks</span>
<span class="setting-label">{$t('settings.downloads.downloadedTracks')}</span>
<span class="setting-value">
{#if downloadStats}
{downloadStats.readyTracks} tracks ({formatBytes(downloadStats.totalSizeBytes)})
@@ -1750,7 +1683,7 @@
<div class="setting-row">
<div class="setting-with-description">
<span class="setting-label">Show in Local Library</span>
<span class="setting-description">Display downloaded Qobuz tracks in your Local Library</span>
<span class="setting-description">Display downloaded Qobuz™ tracks in your Local Library</span>
</div>
<Toggle enabled={showQobuzDownloadsInLibrary} onchange={handleShowDownloadsChange} />
</div>
@@ -1767,7 +1700,7 @@
{isRepairingDownloads ? 'Repairing...' : 'Repair'}
</button>
</div>
<div class="setting-row">
<div class="setting-row last">
<span class="setting-label">Clear Downloads</span>
<button
class="clear-btn"
@@ -1777,17 +1710,6 @@
{isClearingDownloads ? 'Clearing...' : 'Clear All'}
</button>
</div>
<div class="setting-row last">
<span class="setting-label">Open Folder</span>
<button
class="folder-btn"
onclick={handleOpenDownloadFolder}
title="Open download folder"
>
<FolderOpen size={16} />
<span>Open</span>
</button>
</div>
</section>
<!-- Library Section -->
@@ -1900,28 +1822,24 @@
<!-- Storage Section (Memory Cache) -->
<section class="section" bind:this={storageSection}>
<h3 class="section-title">{$t('settings.storage.title')}</h3>
<p class="section-note">{$t('settings.storage.queueCacheNote')}</p>
<div class="setting-row">
<span class="setting-label">{$t('settings.storage.cacheSize')}</span>
<span class="setting-value">
{#if cacheStats}
{formatBytes(cacheStats.current_size_bytes)} / {formatBytes(cacheStats.max_size_bytes)}
{:else}
{$t('actions.loading')}
{/if}
</span>
</div>
<div class="setting-row">
<span class="setting-label">{$t('settings.storage.cachedTracks')}</span>
<span class="setting-value">
{#if cacheStats}
{cacheStats.cached_tracks} {$t('album.tracks')}
{:else}
-
{/if}
</span>
</div>
<div class="setting-row last">
<span class="setting-label">{$t('settings.storage.clearCache')}</span>
<div class="setting-info">
<span class="setting-label">{$t('settings.storage.clearCache')}</span>
<small class="setting-note">
{#if cacheStats}
{$t('settings.storage.queueCacheStats', {
values: {
tracks: cacheStats.cached_tracks,
used: formatBytes(cacheStats.current_size_bytes),
max: formatBytes(cacheStats.max_size_bytes)
}
})}
{:else}
{$t('actions.loading')}
{/if}
</small>
</div>
<button
class="clear-btn"
onclick={handleClearCache}
@@ -1930,17 +1848,22 @@
{isClearing ? $t('settings.storage.clearing') : $t('actions.clear')}
</button>
</div>
</section>
<!-- Lyrics Section -->
<section class="section" bind:this={lyricsSection}>
<h3 class="section-title">{$t('settings.lyrics.title')}</h3>
<div class="setting-row">
<span class="setting-label">Provider</span>
<span class="setting-value">LRCLIB / lyrics.ovh</span>
</div>
<div class="setting-row last">
<span class="setting-label">{$t('settings.lyrics.clearLyrics')}</span>
<div class="setting-info">
<span class="setting-label">{$t('settings.lyrics.clearLyrics')}</span>
<small class="setting-note">
{#if lyricsCacheStats}
{$t('settings.lyrics.cacheStats', {
values: {
entries: lyricsCacheStats.entries,
size: formatBytes(lyricsCacheStats.sizeBytes)
}
})}
{:else}
-
{/if}
</small>
</div>
<button
class="clear-btn"
onclick={handleClearLyricsCache}
@@ -2146,6 +2069,13 @@ flatpak override --user --filesystem=$HOME/music-nas com.blitzfc.qbz</pre>
margin-bottom: 16px;
}
.section-note {
margin: -6px 0 16px;
font-size: 12px;
color: var(--text-muted);
line-height: 1.4;
}
.account-card {
display: flex;
align-items: center;
@@ -2186,6 +2116,12 @@ flatpak override --user --filesystem=$HOME/music-nas com.blitzfc.qbz</pre>
color: var(--accent-primary);
}
.subscription-until {
font-size: 12px;
color: var(--text-muted);
margin-top: 2px;
}
.logout-btn {
padding: 8px 24px;
border-radius: 8px;
@@ -2208,6 +2144,7 @@ flatpak override --user --filesystem=$HOME/music-nas com.blitzfc.qbz</pre>
justify-content: space-between;
height: 48px;
border-bottom: 1px solid var(--bg-tertiary);
gap: 16px;
}
.setting-row.last {
@@ -2223,6 +2160,8 @@ flatpak override --user --filesystem=$HOME/music-nas com.blitzfc.qbz</pre>
display: flex;
flex-direction: column;
gap: 2px;
flex: 0 1 60%;
min-width: 0;
}
.setting-description {
@@ -2235,6 +2174,8 @@ flatpak override --user --filesystem=$HOME/music-nas com.blitzfc.qbz</pre>
flex-direction: column;
gap: 2px;
flex: 1;
max-width: 60%;
min-width: 0;
}
.setting-desc {
@@ -2255,6 +2196,13 @@ flatpak override --user --filesystem=$HOME/music-nas com.blitzfc.qbz</pre>
padding: 12px 0;
}
.setting-row:has(.setting-description) {
height: auto;
min-height: 48px;
padding: 12px 0;
align-items: flex-start;
}
.setting-row:has(.setting-desc) {
height: auto;
min-height: 48px;
@@ -2391,6 +2339,20 @@ flatpak override --user --filesystem=$HOME/music-nas com.blitzfc.qbz</pre>
background-color: var(--bg-hover);
}
/* Harmonize button widths across settings rows */
.connect-btn,
.clear-btn,
.folder-btn,
.logout-btn {
min-width: 140px;
padding-top: 7px;
padding-bottom: 7px;
}
.folder-btn {
justify-content: center;
}
/* Last.fm styles */
.lastfm-connected {
display: flex;
+28 -15
View File
@@ -1,7 +1,7 @@
{
"app": {
"name": "QBZ",
"tagline": "Hi-Fi Qobuz Client for Linux"
"tagline": "Hi-Fi streaming client for Linux"
},
"nav": {
"home": "Home",
@@ -54,7 +54,7 @@
"searching": "Searching...",
"recentSearches": "Recent Searches",
"clearHistory": "Clear History",
"startTyping": "Start typing to search Qobuz",
"startTyping": "Start typing to search Qobuz™",
"noAlbumsFor": "No albums found for \"{query}\"",
"noTracksFor": "No tracks found for \"{query}\"",
"noArtistsFor": "No artists found for \"{query}\""
@@ -170,7 +170,7 @@
"renamePlaylist": "Rename Playlist",
"allPlaylists": "All Playlists",
"myPlaylists": "My Playlists",
"qobuzPlaylists": "Qobuz Playlists",
"qobuzPlaylists": "Qobuz™ Playlists",
"emptyPlaylist": "This playlist is empty",
"addTracks": "Add Tracks",
"removeTracks": "Remove",
@@ -307,6 +307,7 @@
"title": "Account",
"loggedInAs": "Logged in as",
"subscription": "Subscription",
"validUntil": "Valid until {date}",
"logout": "Logout",
"login": "Login"
},
@@ -349,13 +350,13 @@
"accentColor": "Accent Color",
"language": "Language",
"uiScale": "UI Scale",
"inAppToasts": "In-app Toasts",
"inAppToasts": "In-app toasts notifications",
"systemNotifications": "System Notifications"
},
"library": {
"title": "Library",
"fetchArtistImages": "Fetch Qobuz Artist Images",
"fetchArtistImagesDesc": "Show artist photos from Qobuz in local library"
"fetchArtistImages": "Fetch Qobuz™ Artist Images",
"fetchArtistImagesDesc": "Show artist photos from Qobuz™ in local library"
},
"integrations": {
"title": "Integrations",
@@ -373,13 +374,16 @@
},
"storage": {
"title": "Storage",
"cachedTracks": "Cached Tracks",
"cacheSize": "Cache Size",
"clearCache": "Clear Cache",
"queueCacheNote": "Queue list storage. Clear if you have playback issues. (This is not the Downloads cache.)",
"queueCacheStats": "{tracks} tracks using {used} / {max}",
"cachedTracks": "Cached Queue Tracks",
"cacheSize": "Queue Cache Size",
"clearCache": "Clear queue cache",
"clearing": "Clearing..."
},
"downloads": {
"title": "Downloads",
"offlineCacheDisclaimer": "Offline downloads are a local cache for offline playback only while you have a valid subscription. You do not receive a license to keep or redistribute the content. If your subscription becomes invalid, QBZ will delete all downloaded content after 3 days.",
"downloadedTracks": "Downloaded Tracks",
"clearDownloads": "Clear All",
"openFolder": "Open Folder"
@@ -389,7 +393,8 @@
"lyrics": {
"title": "Lyrics",
"lyricsCache": "Lyrics Cache",
"clearLyrics": "Clear Lyrics"
"clearLyrics": "Clear Lyrics Cache",
"cacheStats": "{entries} entries using {size}"
},
"about": {
"title": "About",
@@ -407,7 +412,15 @@
"loggingIn": "Signing in...",
"loginError": "Login failed. Please check your credentials.",
"welcomeBack": "Welcome back",
"rememberMe": "Remember me"
"rememberMe": "Remember me",
"ineligibleSubscription": "No active subscription. QBZ will run in offline mode only."
},
"legal": {
"brandingLineSuffix": "",
"tosAgreementPrefix": "I have read the",
"tosLinkText": "Qobuz™ Terms of Service",
"tosRequiredToLogin": "Please confirm that you have read the Qobuz™ Terms of Service to continue.",
"trademarkNotice": "Qobuz™ is a trademark of Qobuz. QBZ is not affiliated with, endorsed by, or certified by Qobuz."
},
"notifications": {
"trackAdded": "Track added to queue",
@@ -478,11 +491,11 @@
},
"offline": {
"title": "Offline Mode",
"message": "Connect to the internet to access Qobuz content.",
"message": "Connect to the internet to access Qobuz™ content.",
"noNetwork": "No Network Connection",
"noNetworkMessage": "Check your internet connection to access Qobuz streaming.",
"noNetworkMessage": "Check your internet connection to access Qobuz™ streaming.",
"notLoggedIn": "Not Logged In",
"notLoggedInMessage": "Log in to your Qobuz account to access streaming content.",
"notLoggedInMessage": "Log in to your Qobuz™ account to access streaming content.",
"manualMode": "Offline Mode Enabled",
"manualModeMessage": "You have manually enabled offline mode. Your local library is still available.",
"goToLibrary": "Go to Local Library",
@@ -499,7 +512,7 @@
"notAvailable": "Not Available Offline",
"trackNotAvailable": "This track is not available offline",
"featureDisabled": "This feature requires internet connection",
"startWithoutLogin": "Start in offline mode without logging in",
"startWithoutLogin": "Start offline (no access to Qobuz™ services)",
"noNetworkToast": "No internet connection available",
"checkingNetwork": "Checking network connection...",
"available": "Fully Available Offline",
+27 -14
View File
@@ -1,7 +1,7 @@
{
"app": {
"name": "QBZ",
"tagline": "Cliente Hi-Fi de Qobuz para Linux"
"tagline": "Cliente Hi-Fi de streaming para Linux"
},
"nav": {
"home": "Inicio",
@@ -54,7 +54,7 @@
"searching": "Buscando...",
"recentSearches": "Búsquedas Recientes",
"clearHistory": "Limpiar Historial",
"startTyping": "Escribe para buscar en Qobuz",
"startTyping": "Escribe para buscar en Qobuz™",
"noAlbumsFor": "No se encontraron álbumes para \"{query}\"",
"noTracksFor": "No se encontraron pistas para \"{query}\"",
"noArtistsFor": "No se encontraron artistas para \"{query}\""
@@ -170,7 +170,7 @@
"renamePlaylist": "Renombrar Lista",
"allPlaylists": "Todas las Listas",
"myPlaylists": "Mis Listas",
"qobuzPlaylists": "Listas de Qobuz",
"qobuzPlaylists": "Listas de Qobuz™",
"emptyPlaylist": "Esta lista está vacía",
"addTracks": "Agregar Pistas",
"removeTracks": "Eliminar",
@@ -307,6 +307,7 @@
"title": "Cuenta",
"loggedInAs": "Conectado como",
"subscription": "Suscripción",
"validUntil": "Válida hasta {date}",
"logout": "Cerrar Sesión",
"login": "Iniciar Sesión"
},
@@ -354,8 +355,8 @@
},
"library": {
"title": "Biblioteca",
"fetchArtistImages": "Obtener Imágenes de Artistas de Qobuz",
"fetchArtistImagesDesc": "Mostrar fotos de artistas de Qobuz en biblioteca local"
"fetchArtistImages": "Obtener imágenes de artistas de Qobuz™",
"fetchArtistImagesDesc": "Mostrar fotos de artistas de Qobuz™ en la biblioteca local"
},
"integrations": {
"title": "Integraciones",
@@ -373,13 +374,16 @@
},
"storage": {
"title": "Almacenamiento",
"cachedTracks": "Pistas en Caché",
"cacheSize": "Tamaño de Caché",
"clearCache": "Limpiar Caché",
"queueCacheNote": "Almacenamiento de la cola. Límpialo si tienes problemas de reproducción. (No es el caché de Descargas.)",
"queueCacheStats": "{tracks} pistas usando {used} / {max}",
"cachedTracks": "Pistas de la cola en caché",
"cacheSize": "Tamaño de caché de la cola",
"clearCache": "Limpiar caché de la cola",
"clearing": "Limpiando..."
},
"downloads": {
"title": "Descargas",
"offlineCacheDisclaimer": "Las descargas offline son un caché local solo para reproducción sin conexión mientras tengas una suscripción válida. No recibes una licencia para conservar o redistribuir el contenido. Si tu suscripción deja de ser válida, QBZ eliminará todo el contenido descargado después de 3 días.",
"downloadedTracks": "Pistas Descargadas",
"clearDownloads": "Limpiar Todo",
"openFolder": "Abrir Carpeta"
@@ -389,7 +393,8 @@
"lyrics": {
"title": "Letras",
"lyricsCache": "Caché de Letras",
"clearLyrics": "Limpiar Letras"
"clearLyrics": "Limpiar caché de letras",
"cacheStats": "{entries} entradas usando {size}"
},
"about": {
"title": "Acerca de",
@@ -407,7 +412,15 @@
"loggingIn": "Iniciando sesión...",
"loginError": "Error al iniciar sesión. Verifica tus credenciales.",
"welcomeBack": "Bienvenido de nuevo",
"rememberMe": "Recordarme"
"rememberMe": "Recordarme",
"ineligibleSubscription": "No hay una suscripción activa. QBZ solo funcionará en modo offline."
},
"legal": {
"brandingLineSuffix": "Esta aplicación usa la API de Qobuz™ pero no está certificada por Qobuz™.",
"tosAgreementPrefix": "He leído los",
"tosLinkText": "Términos de servicio de Qobuz™",
"tosRequiredToLogin": "Confirma que has leído los Términos de servicio de Qobuz™ para continuar.",
"trademarkNotice": "Qobuz™ es una marca comercial de Qobuz. QBZ no está afiliada, respaldada ni certificada por Qobuz."
},
"notifications": {
"trackAdded": "Pista agregada a la cola",
@@ -478,11 +491,11 @@
},
"offline": {
"title": "Modo Offline",
"message": "Conecta a internet para acceder al contenido de Qobuz.",
"message": "Conecta a internet para acceder al contenido de Qobuz™.",
"noNetwork": "Sin Conexion a Internet",
"noNetworkMessage": "Verifica tu conexion para acceder al streaming de Qobuz.",
"noNetworkMessage": "Verifica tu conexión para acceder al streaming de Qobuz™.",
"notLoggedIn": "No Has Iniciado Sesion",
"notLoggedInMessage": "Inicia sesion en tu cuenta de Qobuz para acceder al contenido.",
"notLoggedInMessage": "Inicia sesión en tu cuenta de Qobuz™ para acceder al contenido.",
"manualMode": "Modo Offline Activado",
"manualModeMessage": "Has activado el modo offline manualmente. Tu biblioteca local sigue disponible.",
"goToLibrary": "Ir a Biblioteca Local",
@@ -499,7 +512,7 @@
"notAvailable": "No Disponible Offline",
"trackNotAvailable": "Esta pista no esta disponible offline",
"featureDisabled": "Esta funcion requiere conexion a internet",
"startWithoutLogin": "Iniciar en modo offline sin autenticacion",
"startWithoutLogin": "Iniciar en modo offline (sin acceso a los servicios de Qobuz™)",
"noNetworkToast": "No hay conexion a internet disponible",
"checkingNetwork": "Verificando conexion a internet...",
"available": "Totalmente Disponible Offline",
+1
View File
@@ -7,6 +7,7 @@
export interface UserInfo {
userName: string;
subscription: string;
subscriptionValidUntil?: string | null;
}
// Auth state
+18
View File
@@ -0,0 +1,18 @@
import { browser } from '$app/environment';
import { writable } from 'svelte/store';
const STORAGE_KEY = 'qbz-qobuz-tos-accepted';
function readInitial(): boolean {
if (!browser) return false;
return localStorage.getItem(STORAGE_KEY) === 'true';
}
export const qobuzTosAccepted = writable<boolean>(readInitial());
if (browser) {
qobuzTosAccepted.subscribe((value) => {
localStorage.setItem(STORAGE_KEY, String(value));
});
}
+2 -1
View File
@@ -2090,7 +2090,7 @@
onAboutClick={() => isAboutModalOpen = true}
onLogout={handleLogout}
userName={userInfo?.userName || 'User'}
subscription={userInfo?.subscription || 'Qobuz'}
subscription={userInfo?.subscription || 'Qobuz™'}
/>
<!-- Content Area (main + lyrics sidebar) -->
@@ -2177,6 +2177,7 @@
onLogout={handleLogout}
userName={userInfo?.userName}
subscription={userInfo?.subscription}
subscriptionValidUntil={userInfo?.subscriptionValidUntil}
/>
{:else if activeView === 'album' && selectedAlbum}
<AlbumDetailView