feat(ui): show sampleRate in song info dialog (#3960)

* feat(ui): show sampleRate in song info dialog

* npm run prettier --write
This commit is contained in:
Guilherme Souza 2025-04-12 21:52:47 -03:00 committed by GitHub
parent a6f1f7b7e3
commit 524d508916
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 10 additions and 1 deletions

View File

@ -75,6 +75,7 @@ export const SongInfo = (props) => {
compilation: <BooleanField source="compilation" />,
bitRate: <BitrateField source="bitRate" />,
bitDepth: <NumberField source="bitDepth" />,
sampleRate: <NumberField source="sampleRate" />,
channels: <NumberField source="channels" />,
size: <SizeField source="size" />,
updatedAt: <DateField source="updatedAt" showTime />,
@ -92,7 +93,14 @@ export const SongInfo = (props) => {
roles.push([name, record.participants[name].length])
}
const optionalFields = ['discSubtitle', 'comment', 'bpm', 'genre', 'bitDepth']
const optionalFields = [
'discSubtitle',
'comment',
'bpm',
'genre',
'bitDepth',
'sampleRate',
]
optionalFields.forEach((field) => {
!record[field] && delete data[field]
})

View File

@ -19,6 +19,7 @@
"updatedAt": "Updated at",
"bitRate": "Bit rate",
"bitDepth": "Bit depth",
"sampleRate": "Sample rate",
"channels": "Channels",
"discSubtitle": "Disc Subtitle",
"starred": "Favourite",