feat(favorites): add Labels tab to Favorites view

Introduces 'labels' as a first-class favorites tab alongside
tracks/albums/artists/playlists. Adds the navigation view
'favorites-labels', plumbs it through sidebar, titlebar dropdown,
favorites preferences modal and navigation store, and renders a
circular grid of followed labels with search and empty states.
Clicking a card navigates to the existing LabelView detail page.

Spanish copy uses 'Sellos' and Portuguese 'Selos' to match
Qobuz mobile terminology.

cc
This commit is contained in:
vicrodh committed 2026-04-14 09:28:34 -06:00
1 parent 50f5fd7778
commit ebe999c43d
12 files changed
+205 -10

No files matched your search

+1 -1
View File
@@ -28,7 +28,7 @@
const key = `favorites.tabLabels.${tab}`;
const translated = $t(key);
if (translated && !translated.startsWith('favorites.tabLabels.')) return translated;
const fallback: Record<string, string> = { tracks: $t('favorites.tabLabels.tracks'), albums: $t('favorites.tabLabels.albums'), artists: $t('favorites.tabLabels.artists'), playlists: $t('favorites.tabLabels.playlists') };
const fallback: Record<string, string> = { tracks: $t('favorites.tabLabels.tracks'), albums: $t('favorites.tabLabels.albums'), artists: $t('favorites.tabLabels.artists'), labels: $t('favorites.tabLabels.labels'), playlists: $t('favorites.tabLabels.playlists') };
return fallback[tab] || tab;
}
+7 -3
View File
@@ -1,6 +1,6 @@
<script lang="ts">
import { tick } from 'svelte';
import { Search, HardDrive, Plus, RefreshCw, ChevronDown, ChevronUp, Heart, ListMusic, Import, Settings, Ellipsis, ArrowUpDown, ChevronRight, ChevronLeft, Folder, FolderPlus, X, User, Disc, Music, ShoppingBag, Eye, EyeOff, Pencil } from 'lucide-svelte';
import { Search, HardDrive, Plus, RefreshCw, ChevronDown, ChevronUp, Heart, ListMusic, Import, Settings, Ellipsis, ArrowUpDown, ChevronRight, ChevronLeft, Folder, FolderPlus, X, User, Disc, Disc3, Music, ShoppingBag, Eye, EyeOff, Pencil } from 'lucide-svelte';
import type { FavoritesPreferences } from '$lib/types';
import { invoke } from '@tauri-apps/api/core';
import { onMount } from 'svelte';
@@ -135,7 +135,7 @@
// Favorites section state
let favoritesExpanded = $state(false);
let favoritesTabOrder = $state<string[]>(['tracks', 'albums', 'artists', 'playlists']);
let favoritesTabOrder = $state<string[]>(['tracks', 'albums', 'artists', 'labels', 'playlists']);
let showFavoritesMenu = $state(false);
let favoritesMenuPos = $state({ x: 0, y: 0 });
@@ -934,7 +934,7 @@
async function loadFavoritesPreferences() {
try {
const prefs = await invoke<FavoritesPreferences>('v2_get_favorites_preferences');
favoritesTabOrder = prefs.tab_order || ['tracks', 'albums', 'artists', 'playlists'];
favoritesTabOrder = prefs.tab_order || ['tracks', 'albums', 'artists', 'labels', 'playlists'];
} catch (err) {
console.debug('[Sidebar] Failed to load favorites preferences:', err);
}
@@ -1548,6 +1548,8 @@
<Disc size={14} />
{:else if tab === 'tracks'}
<Music size={14} />
{:else if tab === 'labels'}
<Disc3 size={14} />
{:else if tab === 'playlists'}
<ListMusic size={14} />
{/if}
@@ -1933,6 +1935,8 @@
<Disc size={14} />
{:else if tab === 'tracks'}
<Music size={14} />
{:else if tab === 'labels'}
<Disc3 size={14} />
{:else if tab === 'playlists'}
<ListMusic size={14} />
{/if}
+4 -2
View File
@@ -1,5 +1,5 @@
<script lang="ts">
import { Heart, HardDrive, ChevronDown, User, Disc, Music, ListMusic, ShoppingBag } from 'lucide-svelte';
import { Heart, HardDrive, ChevronDown, User, Disc, Disc3, Music, ListMusic, ShoppingBag } from 'lucide-svelte';
import { t } from '$lib/i18n';
interface Props {
@@ -18,7 +18,7 @@
activeView,
activeItemId,
onNavigate,
favoritesTabOrder = ['tracks', 'albums', 'artists', 'playlists'],
favoritesTabOrder = ['tracks', 'albums', 'artists', 'labels', 'playlists'],
position = 'left',
showDiscover = false,
showFavorites = false,
@@ -209,6 +209,8 @@
<Disc size={12} />
{:else if tab === 'artists'}
<User size={12} />
{:else if tab === 'labels'}
<Disc3 size={12} />
{:else if tab === 'playlists'}
<ListMusic size={12} />
{/if}
+160 -2
View File
@@ -23,6 +23,7 @@
import { syncCache as syncTrackCache, subscribe as subscribeFavorites, isTrackFavorite } from '$lib/stores/favoritesStore';
import { syncCache as syncAlbumCache } from '$lib/stores/albumFavoritesStore';
import { syncCache as syncArtistCache } from '$lib/stores/artistFavoritesStore';
import { syncCache as syncLabelCache } from '$lib/stores/labelFavoritesStore';
import { categorizeAlbum, getQobuzImage, formatQuality } from '$lib/adapters/qobuzAdapters';
import { replacePlaybackQueue } from '$lib/services/queuePlaybackService';
import { getUserItem, setUserItem } from '$lib/utils/userStorage';
@@ -70,6 +71,13 @@
albums_count?: number;
}
interface FavoriteLabel {
id: number;
name: string;
image?: string | Record<string, string>;
albums_count?: number;
}
interface FavoritePlaylist {
id: number;
name: string;
@@ -119,6 +127,7 @@
selectedTab?: TabType;
onTabNavigate?: (tab: TabType) => void;
onRandomArtist?: (artistId: number) => void;
onLabelClick?: (labelId: number, labelName?: string) => void;
activeTrackId?: number | null;
isPlaybackActive?: boolean;
}
@@ -180,11 +189,12 @@
selectedTab,
onTabNavigate,
onRandomArtist,
onLabelClick,
activeTrackId = null,
isPlaybackActive = false
}: Props = $props();
type TabType = 'tracks' | 'albums' | 'artists' | 'playlists';
type TabType = 'tracks' | 'albums' | 'artists' | 'labels' | 'playlists';
let activeTab = $state<TabType>('tracks');
let preferencesLoaded = $state(false);
@@ -195,6 +205,7 @@
let favoriteAlbums = $state<FavoriteAlbum[]>([]);
let favoriteTracks = $state<FavoriteTrack[]>([]);
let favoriteArtists = $state<FavoriteArtist[]>([]);
let favoriteLabels = $state<FavoriteLabel[]>([]);
let favoritePlaylists = $state<FavoritePlaylist[]>([]);
let followingPlaylists = $state<FavoritePlaylist[]>([]);
type PlaylistSubTab = 'favorites' | 'following';
@@ -214,7 +225,7 @@
custom_icon_path: null,
custom_icon_preset: 'heart',
icon_background: null,
tab_order: ['tracks', 'albums', 'artists', 'playlists'],
tab_order: ['tracks', 'albums', 'artists', 'labels', 'playlists'],
});
// Download status tracking
@@ -251,6 +262,7 @@
let trackSearch = $state('');
let albumSearch = $state('');
let artistSearch = $state('');
let labelSearch = $state('');
let playlistSearch = $state('');
let searchExpanded = $state(false);
@@ -557,6 +569,21 @@
);
});
let filteredLabels = $derived.by(() => {
if (!labelSearch.trim()) return favoriteLabels;
const query = labelSearch.toLowerCase();
return favoriteLabels.filter(l =>
l.name.toLowerCase().includes(query)
);
});
function getLabelImageUrl(label: FavoriteLabel): string {
if (!label.image) return '';
if (typeof label.image === 'string') return label.image;
const img = label.image as Record<string, string>;
return img.large || img.thumbnail || img.small || '';
}
let filteredPlaylists = $derived.by(() => {
const source = playlistSubTab === 'following' ? followingPlaylists : favoritePlaylists;
if (!playlistSearch.trim()) return source;
@@ -594,6 +621,7 @@
case 'tracks': return trackSearch;
case 'albums': return albumSearch;
case 'artists': return artistSearch;
case 'labels': return labelSearch;
case 'playlists': return playlistSearch;
default: return '';
}
@@ -604,6 +632,7 @@
case 'tracks': trackSearch = value; break;
case 'albums': albumSearch = value; break;
case 'artists': artistSearch = value; break;
case 'labels': labelSearch = value; break;
case 'playlists': playlistSearch = value; break;
}
}
@@ -618,6 +647,7 @@
case 'tracks': return Music;
case 'albums': return Disc3;
case 'artists': return MicVocal;
case 'labels': return Disc3;
case 'playlists': return ListMusic;
}
}
@@ -805,6 +835,10 @@
// Sync to local cache for other views
const artistIds = favoriteArtists.map(a => a.id);
void syncArtistCache(artistIds);
} else if (type === 'labels') {
favoriteLabels = items as FavoriteLabel[];
const labelIds = favoriteLabels.map(l => l.id);
void syncLabelCache(labelIds);
}
} catch (err) {
console.error(`Failed to load ${type} favorites:`, err);
@@ -907,6 +941,8 @@
loadFavorites(tab);
} else if (tab === 'artists' && favoriteArtists.length === 0) {
loadFavorites(tab);
} else if (tab === 'labels' && favoriteLabels.length === 0) {
loadFavorites(tab);
} else if (tab === 'playlists') {
if (favoritePlaylists.length === 0 && followingPlaylists.length === 0) {
loadFavoritePlaylists();
@@ -1426,6 +1462,8 @@
{filteredAlbums.length}{albumSearch ? ` / ${favoriteAlbums.length}` : ''} {$t('favorites.albums').toLowerCase()}
{:else if activeTab === 'artists'}
{filteredArtists.length}{artistSearch ? ` / ${favoriteArtists.length}` : ''} {$t('favorites.artists').toLowerCase()}
{:else if activeTab === 'labels'}
{filteredLabels.length}{labelSearch ? ` / ${favoriteLabels.length}` : ''} {$t('favorites.labels').toLowerCase()}
{:else}
{filteredPlaylists.length}{playlistSearch ? ` / ${favoritePlaylists.length}` : ''} {$t('favorites.playlists').toLowerCase()}
{/if}
@@ -2082,6 +2120,55 @@
</div>
{/if}
</ViewTransition>
{:else if activeTab === 'labels'}
<ViewTransition duration={200} distance={12} direction="up">
{#if favoriteLabels.length === 0}
<div class="empty">
<Disc3 size={48} />
<p>{$t('favorites.noFavoriteLabels')}</p>
<p class="empty-hint">{$t('favorites.likeLabelsHint')}</p>
</div>
{:else if filteredLabels.length === 0}
<div class="empty">
<Search size={48} />
<p>{$t('favorites.noLabelsMatch', { values: { query: labelSearch } })}</p>
</div>
{:else}
<div class="label-grid">
{#each filteredLabels as label (label.id)}
{@const imageUrl = getLabelImageUrl(label)}
<!-- svelte-ignore a11y_click_events_have_key_events -->
<!-- svelte-ignore a11y_no_static_element_interactions -->
<div
class="label-grid-card"
role="button"
tabindex="0"
onclick={() => onLabelClick?.(label.id, label.name)}
onkeydown={(e) => { if (e.key === 'Enter' || e.key === ' ') { e.preventDefault(); onLabelClick?.(label.id, label.name); } }}
>
<div class="label-grid-image-wrapper">
<div class="label-grid-image-placeholder">
<Disc3 size={48} />
</div>
{#if imageUrl}
<img
src={imageUrl}
alt={label.name}
class="label-grid-image"
loading="lazy"
decoding="async"
/>
{/if}
</div>
<div class="label-grid-name">{label.name}</div>
{#if label.albums_count !== undefined && label.albums_count !== null}
<div class="label-grid-count">{$t('library.albumCount', { values: { count: label.albums_count } })}</div>
{/if}
</div>
{/each}
</div>
{/if}
</ViewTransition>
{:else if activeTab === 'playlists'}
<!-- Sub-tab selector: Favorites vs Following -->
<div class="playlist-sub-tabs">
@@ -2982,4 +3069,75 @@
.artist-albums-footer .link-btn:hover {
text-decoration-color: var(--accent-primary);
}
.label-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
gap: 20px 16px;
padding: 8px 0 24px 0;
}
.label-grid-card {
display: flex;
flex-direction: column;
align-items: center;
gap: 10px;
padding: 10px;
border-radius: 10px;
background: none;
border: none;
cursor: pointer;
transition: background-color 150ms ease;
}
.label-grid-card:hover,
.label-grid-card:focus-visible {
background-color: var(--bg-tertiary);
outline: none;
}
.label-grid-image-wrapper {
width: 140px;
height: 140px;
border-radius: 50%;
overflow: hidden;
position: relative;
background: var(--bg-tertiary);
}
.label-grid-image-placeholder {
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
color: white;
}
.label-grid-image {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
object-fit: cover;
z-index: 1;
}
.label-grid-name {
font-size: 14px;
font-weight: 500;
color: var(--text-primary);
text-align: center;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
width: 100%;
}
.label-grid-count {
font-size: 12px;
color: var(--text-secondary);
text-align: center;
}
</style>
+5
View File
@@ -494,20 +494,24 @@
"albums": "Alben",
"tracks": "Titel",
"artists": "Künstler",
"labels": "Labels",
"playlists": "Playlists",
"noFavorites": "Noch keine Favoriten",
"noFavoriteTracks": "Noch keine Lieblingstitel",
"noFavoriteAlbums": "Noch keine Lieblingsalben",
"noFavoriteArtists": "Noch keine Lieblingskünstler",
"noFavoriteLabels": "Du folgst noch keinen Labels",
"noFavoritePlaylists": "Noch keine Lieblingsplaylists",
"noTracksMatch": "Keine Titel entsprechen \"{query}\"",
"noAlbumsMatch": "Keine Alben entsprechen \"{query}\"",
"noArtistsMatch": "Keine Künstler entsprechen \"{query}\"",
"noLabelsMatch": "Keine Labels entsprechen \"{query}\"",
"noPlaylistsMatch": "Keine Playlists entsprechen \"{query}\"",
"noAlbumsFound": "Keine Alben gefunden",
"likeTracksHint": "Markiere Titel mit „Gefällt mir“, um sie hier zu sehen",
"likeAlbumsHint": "Markiere Alben mit „Gefällt mir“, um sie hier zu sehen",
"likeArtistsHint": "Markiere Künstler mit „Gefällt mir“, um sie hier zu sehen",
"likeLabelsHint": "Folge Labels, um sie hier zu sehen",
"likePlaylistsHint": "Klicke auf das Herzsymbol bei Playlists, um sie hier hinzuzufügen",
"noFollowingPlaylists": "Du folgst keinen Playlists",
"followPlaylistsHint": "Folge Playlists auf Qobuz, um sie hier zu sehen",
@@ -536,6 +540,7 @@
"tracks": "Titel",
"albums": "Alben",
"artists": "Künstler",
"labels": "Labels",
"playlists": "Playlists"
},
"moveUp": "Nach oben verschieben",
+5
View File
@@ -494,20 +494,24 @@
"albums": "Albums",
"tracks": "Tracks",
"artists": "Artists",
"labels": "Labels",
"playlists": "Playlists",
"noFavorites": "No favorites yet",
"noFavoriteTracks": "No favorite tracks yet",
"noFavoriteAlbums": "No favorite albums yet",
"noFavoriteArtists": "No favorite artists yet",
"noFavoriteLabels": "No followed labels yet",
"noFavoritePlaylists": "No favorite playlists yet",
"noTracksMatch": "No tracks match \"{query}\"",
"noAlbumsMatch": "No albums match \"{query}\"",
"noArtistsMatch": "No artists match \"{query}\"",
"noLabelsMatch": "No labels match \"{query}\"",
"noPlaylistsMatch": "No playlists match \"{query}\"",
"noAlbumsFound": "No albums found",
"likeTracksHint": "Like tracks to see them here",
"likeAlbumsHint": "Like albums to see them here",
"likeArtistsHint": "Like artists to see them here",
"likeLabelsHint": "Follow labels to see them here",
"likePlaylistsHint": "Click the heart icon on playlists to add them here",
"noFollowingPlaylists": "Not following any playlists",
"followPlaylistsHint": "Follow playlists on Qobuz to see them here",
@@ -536,6 +540,7 @@
"tracks": "Tracks",
"albums": "Albums",
"artists": "Artists",
"labels": "Labels",
"playlists": "Playlists"
},
"moveUp": "Move up",
+5
View File
@@ -494,20 +494,24 @@
"albums": "Álbumes",
"tracks": "Pistas",
"artists": "Artistas",
"labels": "Sellos",
"playlists": "Listas",
"noFavorites": "Aún no hay favoritos",
"noFavoriteTracks": "Aún no hay pistas favoritas",
"noFavoriteAlbums": "Aún no hay álbumes favoritos",
"noFavoriteArtists": "Aún no hay artistas favoritos",
"noFavoriteLabels": "Aún no sigues ningún sello",
"noFavoritePlaylists": "Aún no hay listas favoritas",
"noTracksMatch": "Ninguna pista coincide con \"{query}\"",
"noAlbumsMatch": "Ningún álbum coincide con \"{query}\"",
"noArtistsMatch": "Ningún artista coincide con \"{query}\"",
"noLabelsMatch": "Ningún sello coincide con \"{query}\"",
"noPlaylistsMatch": "Ninguna lista coincide con \"{query}\"",
"noAlbumsFound": "No se encontraron álbumes",
"likeTracksHint": "Da me gusta a pistas para verlas aquí",
"likeAlbumsHint": "Da me gusta a álbumes para verlos aquí",
"likeArtistsHint": "Da me gusta a artistas para verlos aquí",
"likeLabelsHint": "Sigue sellos para verlos aquí",
"likePlaylistsHint": "Haz clic en el corazón de las listas para agregarlas aquí",
"noFollowingPlaylists": "No sigues ninguna playlist",
"followPlaylistsHint": "Sigue playlists en Qobuz para verlas aquí",
@@ -536,6 +540,7 @@
"tracks": "Pistas",
"albums": "Álbumes",
"artists": "Artistas",
"labels": "Sellos",
"playlists": "Listas"
},
"moveUp": "Subir",
+5
View File
@@ -494,20 +494,24 @@
"albums": "Albums",
"tracks": "Titres",
"artists": "Artistes",
"labels": "Labels",
"playlists": "Playlists",
"noFavorites": "Aucun favori pour l'instant",
"noFavoriteTracks": "Pas encore de titre favori",
"noFavoriteAlbums": "Pas encore d'album favori",
"noFavoriteArtists": "Pas encore d'artiste favori",
"noFavoriteLabels": "Vous ne suivez aucun label",
"noFavoritePlaylists": "Pas encore de playlists favorites",
"noTracksMatch": "Aucun titre ne correspond à « {query} »",
"noAlbumsMatch": "Aucun album ne correspond à « {query} »",
"noArtistsMatch": "Aucun artiste ne correspond à « {query} »",
"noLabelsMatch": "Aucun label ne correspond à « {query} »",
"noPlaylistsMatch": "Aucune playlist ne correspond à « {query} »",
"noAlbumsFound": "Aucun album trouvé",
"likeTracksHint": "Aimez des titres pour les voir ici",
"likeAlbumsHint": "Aimez des albums pour les voir ici",
"likeArtistsHint": "Aimez des artistes pour les voir ici",
"likeLabelsHint": "Suivez des labels pour les voir ici",
"likePlaylistsHint": "Cliquez sur l'icône en forme de cœur sur les playlists pour les ajouter ici",
"noFollowingPlaylists": "Vous ne suivez aucune playlist",
"followPlaylistsHint": "Suivez des playlists sur Qobuz pour les voir ici",
@@ -536,6 +540,7 @@
"tracks": "Titres",
"albums": "Albums",
"artists": "Artistes",
"labels": "Labels",
"playlists": "Playlists"
},
"moveUp": "Déplacer vers le haut",
+5
View File
@@ -494,20 +494,24 @@
"albums": "Álbuns",
"tracks": "Faixas",
"artists": "Artistas",
"labels": "Selos",
"playlists": "Playlists",
"noFavorites": "Nenhum favorito ainda",
"noFavoriteTracks": "Nenhuma faixa favorita ainda",
"noFavoriteAlbums": "Nenhum álbum favorito ainda",
"noFavoriteArtists": "Nenhum artista favorito ainda",
"noFavoriteLabels": "Você ainda não segue nenhum selo",
"noFavoritePlaylists": "Nenhuma playlist favorita ainda",
"noTracksMatch": "Nenhuma faixa corresponde a \"{query}\"",
"noAlbumsMatch": "Nenhum álbum corresponde a \"{query}\"",
"noArtistsMatch": "Nenhum artista corresponde a \"{query}\"",
"noLabelsMatch": "Nenhum selo corresponde a \"{query}\"",
"noPlaylistsMatch": "Nenhuma playlist corresponde a \"{query}\"",
"noAlbumsFound": "Nenhum álbum encontrado",
"likeTracksHint": "Curta faixas para vê-las aqui",
"likeAlbumsHint": "Curta álbuns para vê-los aqui",
"likeArtistsHint": "Curta artistas para vê-los aqui",
"likeLabelsHint": "Siga selos para vê-los aqui",
"likePlaylistsHint": "Clique no ícone de coração nas playlists para adicioná-las aqui",
"noFollowingPlaylists": "Você não segue nenhuma playlist",
"followPlaylistsHint": "Siga playlists no Qobuz para vê-las aqui",
@@ -536,6 +540,7 @@
"tracks": "Faixas",
"albums": "Álbuns",
"artists": "Artistas",
"labels": "Selos",
"playlists": "Playlists"
},
"moveUp": "Mover para cima",
+5 -1
View File
@@ -23,6 +23,7 @@ export type ViewType =
| 'favorites-tracks'
| 'favorites-albums'
| 'favorites-artists'
| 'favorites-labels'
| 'favorites-playlists'
| 'discover-new-releases'
| 'discover-ideal-discography'
@@ -38,7 +39,7 @@ export type ViewType =
| 'favq'
| 'topq'
| 'artists-by-location';
export type FavoritesTab = 'tracks' | 'albums' | 'artists' | 'playlists';
export type FavoritesTab = 'tracks' | 'albums' | 'artists' | 'labels' | 'playlists';
// History entry: view + optional item identifier for granular back/forward
export interface HistoryEntry {
@@ -77,6 +78,7 @@ const favoritesViewMap: Record<FavoritesTab, ViewType> = {
tracks: 'favorites-tracks',
albums: 'favorites-albums',
artists: 'favorites-artists',
labels: 'favorites-labels',
playlists: 'favorites-playlists'
};
@@ -96,6 +98,8 @@ export function getFavoritesTabFromView(view: ViewType): FavoritesTab | null {
return 'albums';
case 'favorites-artists':
return 'artists';
case 'favorites-labels':
return 'labels';
case 'favorites-playlists':
return 'playlists';
default:
+1 -1
View File
@@ -1,6 +1,6 @@
import type { FavoritesTab } from '$lib/stores/navigationStore';
const FALLBACK_ORDER: FavoritesTab[] = ['tracks', 'albums', 'artists', 'playlists'];
const FALLBACK_ORDER: FavoritesTab[] = ['tracks', 'albums', 'artists', 'labels', 'playlists'];
export function normalizeFavoritesTabOrder(order?: string[] | null): FavoritesTab[] {
const result: FavoritesTab[] = [];
+2
View File
@@ -623,6 +623,7 @@
case 'favorites-tracks':
case 'favorites-albums':
case 'favorites-artists':
case 'favorites-labels':
case 'favorites-playlists':
case 'discover-new-releases':
case 'discover-ideal-discography':
@@ -5372,6 +5373,7 @@
onPlaylistRemoveFavorite={removePlaylistFavoriteById}
onPlaylistShareQobuz={sharePlaylistQobuzLinkById}
onRandomArtist={(artistId) => handleArtistClick(artistId)}
onLabelClick={handleLabelClick}
selectedTab={getFavoritesTabFromView(activeView) ?? favoritesDefaultTab}
onTabNavigate={(tab) => navigateToFavorites(tab)}
activeTrackId={currentTrack?.id ?? null}