fix(player): show actual track format instead of hardcoded FLAC/320kbps
This commit is contained in:
@@ -44,6 +44,7 @@ export function PersistentPlayer() {
|
||||
: undefined);
|
||||
const seedLabel = current?.albumTitle ?? current?.title ?? '';
|
||||
const onStream = !cached;
|
||||
const formatLabel = current?.format?.toUpperCase();
|
||||
|
||||
return (
|
||||
<div className="player">
|
||||
@@ -65,6 +66,7 @@ export function PersistentPlayer() {
|
||||
>
|
||||
<Icon name={onStream ? 'cloud' : 'check-circle'} fill={!onStream} />
|
||||
{onStream ? t('player.streaming') : t('player.local')}
|
||||
{formatLabel && ` · ${formatLabel}`}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -10,6 +10,7 @@ export interface ResolvedQueueEntry {
|
||||
durationMs: number;
|
||||
hasCover: boolean;
|
||||
albumArtUrl?: string;
|
||||
format?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -35,5 +36,6 @@ export function useResolvedQueueEntry(
|
||||
durationMs: data?.durationMs ?? entry.durationMs,
|
||||
hasCover: data?.hasCover ?? false,
|
||||
albumArtUrl: data?.albumArtUrl ?? entry.albumArtUrl,
|
||||
format: data?.format,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -126,8 +126,8 @@ const en = {
|
||||
pause: 'Pause',
|
||||
play: 'Play',
|
||||
repeat: 'Repeat: {{mode}}',
|
||||
streaming: 'Streaming · 320 kbps',
|
||||
local: 'Local · FLAC',
|
||||
streaming: 'Streaming',
|
||||
local: 'Local',
|
||||
queue: 'Play queue',
|
||||
mute: 'Mute',
|
||||
unmute: 'Unmute',
|
||||
|
||||
@@ -128,8 +128,8 @@ const ru: Translations = {
|
||||
pause: 'Пауза',
|
||||
play: 'Воспроизвести',
|
||||
repeat: 'Повтор: {{mode}}',
|
||||
streaming: 'Стриминг · 320 kbps',
|
||||
local: 'Локально · FLAC',
|
||||
streaming: 'Стриминг',
|
||||
local: 'Локально',
|
||||
queue: 'Очередь',
|
||||
mute: 'Выключить звук',
|
||||
unmute: 'Включить звук',
|
||||
|
||||
Reference in New Issue
Block a user