mirror of
https://github.com/captbaritone/webamp.git
synced 2026-01-23 02:15:01 +00:00
1000+ kbps
When bitrate exceeds 1000 kbps, Winamp shows "10H", and will increment "11H" etc. as needed. Usually happens with FLAC files. For bitrates less than 100, there is leading space.
This commit is contained in:
parent
880787f569
commit
dd193802be
1 changed files with 4 additions and 1 deletions
|
|
@ -5,7 +5,10 @@ import * as Selectors from "../../selectors";
|
|||
import { useTypedSelector } from "../../hooks";
|
||||
|
||||
const Kbps = memo(() => {
|
||||
const kbps = useTypedSelector(Selectors.getKbps);
|
||||
let kbps = useTypedSelector(Selectors.getKbps)?.padStart(3);
|
||||
if (kbps !== undefined && kbps?.length > 3) {
|
||||
kbps = kbps.substring(0, 2) + "H";
|
||||
}
|
||||
return (
|
||||
<div id="kbps">
|
||||
<CharacterString>{kbps || ""}</CharacterString>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue