Use defaultDownsamplingFormat in share options

This commit is contained in:
Deluan
2023-01-21 21:44:26 -05:00
parent 63b4a12a93
commit 364fdfbd8d
6 changed files with 54 additions and 37 deletions
+3 -2
View File
@@ -9,11 +9,12 @@ import React from 'react'
import { DateField, QualityInfo } from '../common'
import { shareUrl } from '../utils'
import { Link } from '@material-ui/core'
import config from '../config'
export const FormatInfo = ({ record, size }) => {
const r = { suffix: record.format, bitRate: record.maxBitRate }
// TODO Get DefaultDownsamplingFormat
r.suffix = r.suffix || (r.bitRate ? 'opus' : 'Original')
r.suffix =
r.suffix || (r.bitRate ? config.defaultDownsamplingFormat : 'Original')
return <QualityInfo record={r} size={size} />
}