fix: use '-' placeholder for unknown quality instead of 'CD Quality'
- PlaylistDetailView: Show '-' when quality data is unavailable - handleDisplayTrackPlay: Use '-' fallback, added TODO for streaming update - handleDisplayTrackDownload: Consistent quality fallback logic - TrackRow: Always render quality column (previous commit) This prevents showing potentially incorrect 'CD Quality' labels. Quality should be updated when actual streaming info is available.
This commit is contained in:
1 parent
60fcc7253d
commit
1ae0073dff
2 files changed
+8
-5
No files matched your search
@@ -650,7 +650,7 @@
|
|||||||
? `${track.bitDepth}bit/${track.samplingRate}kHz`
|
? `${track.bitDepth}bit/${track.samplingRate}kHz`
|
||||||
: track.hires
|
: track.hires
|
||||||
? 'Hi-Res'
|
? 'Hi-Res'
|
||||||
: 'CD Quality'}
|
: '-'}
|
||||||
hideFavorite={track.isLocal}
|
hideFavorite={track.isLocal}
|
||||||
hideDownload={track.isLocal}
|
hideDownload={track.isLocal}
|
||||||
downloadStatus={downloadInfo.status}
|
downloadStatus={downloadInfo.status}
|
||||||
|
|||||||
@@ -736,9 +736,11 @@
|
|||||||
|
|
||||||
async function handleDisplayTrackDownload(track: PlaylistTrack) {
|
async function handleDisplayTrackDownload(track: PlaylistTrack) {
|
||||||
try {
|
try {
|
||||||
const quality = track.hires && track.bitDepth && track.samplingRate
|
const quality = track.bitDepth && track.samplingRate
|
||||||
? `${track.bitDepth}bit/${track.samplingRate}kHz`
|
? `${track.bitDepth}bit/${track.samplingRate}kHz`
|
||||||
: 'CD Quality';
|
: track.hires
|
||||||
|
? 'Hi-Res'
|
||||||
|
: '-';
|
||||||
await downloadTrack({
|
await downloadTrack({
|
||||||
id: track.id,
|
id: track.id,
|
||||||
title: track.title,
|
title: track.title,
|
||||||
@@ -767,12 +769,13 @@
|
|||||||
// Determine quality string:
|
// Determine quality string:
|
||||||
// - If we have exact bitDepth/samplingRate, show them
|
// - If we have exact bitDepth/samplingRate, show them
|
||||||
// - If hires flag is true but no exact values, show "Hi-Res"
|
// - If hires flag is true but no exact values, show "Hi-Res"
|
||||||
// - Otherwise "CD Quality"
|
// - Otherwise show "-" (unknown - will be updated when streaming returns quality info)
|
||||||
|
// TODO: Update quality when backend returns actual streaming quality
|
||||||
const quality = track.bitDepth && track.samplingRate
|
const quality = track.bitDepth && track.samplingRate
|
||||||
? `${track.bitDepth}bit/${track.samplingRate}kHz`
|
? `${track.bitDepth}bit/${track.samplingRate}kHz`
|
||||||
: track.hires
|
: track.hires
|
||||||
? 'Hi-Res'
|
? 'Hi-Res'
|
||||||
: 'CD Quality';
|
: '-';
|
||||||
|
|
||||||
// Fire-and-forget async call
|
// Fire-and-forget async call
|
||||||
playTrack({
|
playTrack({
|
||||||
|
|||||||
Reference in new issue
Block a user