fix(quality-badge): distinguish lossy formats from CD quality
MP3 and other lossy formats (aac, m4a, ogg, opus, wma) at CD-like sample rates (44.1-48kHz) were incorrectly shown as "CD" quality because bitDepth check came before format check. Changes: - Add format prop to QualityBadge, NowPlayingBar, ExpandedPlayer - Add format field to PlayingTrack interface - Check for lossy formats BEFORE checking bitDepth/samplingRate - New 'mp3-cd' tier for lossy formats at CD sample rates - Uses /mp3-cd.svg icon for this tier
This commit is contained in:
1 parent
5e5f85a86f
commit
fa8af9b1d9
5 files changed
+36
-5
No files matched your search
@@ -1638,6 +1638,7 @@
|
||||
quality,
|
||||
bitDepth: track.bit_depth,
|
||||
samplingRate: track.sample_rate ? track.sample_rate / 1000 : undefined, // Convert Hz to kHz (44100 → 44.1) - NO ROUNDING
|
||||
format: track.format,
|
||||
isLocal: true
|
||||
}, { isLocal: true });
|
||||
}
|
||||
@@ -2695,6 +2696,7 @@
|
||||
quality={currentTrack.quality}
|
||||
bitDepth={currentTrack.bitDepth}
|
||||
samplingRate={currentTrack.samplingRate}
|
||||
format={currentTrack.format}
|
||||
{isPlaying}
|
||||
onTogglePlay={togglePlay}
|
||||
onSkipBack={handleSkipBack}
|
||||
@@ -2779,6 +2781,7 @@
|
||||
qualityLevel={currentTrack.quality.includes('24') ? 5 : 3}
|
||||
bitDepth={currentTrack.bitDepth}
|
||||
samplingRate={currentTrack.samplingRate}
|
||||
format={currentTrack.format}
|
||||
{isPlaying}
|
||||
onTogglePlay={togglePlay}
|
||||
onSkipBack={handleSkipBack}
|
||||
|
||||
Reference in new issue
Block a user