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