From 7cd47aaa60234d1c7f8e0f1953db37bf8a7a4734 Mon Sep 17 00:00:00 2001 From: Aptivi Date: Thu, 19 Sep 2024 13:25:54 +0300 Subject: [PATCH] imp - Show volume as percentage --- We need to show the volume as percentage in the CLI to make it more human. --- Type: imp Breaking: False Doc Required: False Backport Required: False Part: 1/1 --- BassBoom.Cli/CliBase/Player.cs | 2 +- BassBoom.Cli/CliBase/Radio.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/BassBoom.Cli/CliBase/Player.cs b/BassBoom.Cli/CliBase/Player.cs index 8d01a89..620dc92 100644 --- a/BassBoom.Cli/CliBase/Player.cs +++ b/BassBoom.Cli/CliBase/Player.cs @@ -121,7 +121,7 @@ public static void PlayerLoop() string boostIndicator = Common.volBoost ? new Color(ConsoleColors.Red).VTSequenceForeground : ""; string indicator = $"┤ Seek: {PlayerControls.seekRate:0.00} | " + - $"{boostIndicator}Volume: {Common.volume:0.00}{ColorTools.RenderResetForeground()} ├"; + $"{boostIndicator}Volume: {Common.volume * 100:0}%{ColorTools.RenderResetForeground()} ├"; string lyric = Common.CurrentCachedInfo.LyricInstance is not null ? Common.CurrentCachedInfo.LyricInstance.GetLastLineCurrent(BassBoomCli.basolia) : ""; string finalLyric = string.IsNullOrWhiteSpace(lyric) ? "..." : lyric; buffer.Append( diff --git a/BassBoom.Cli/CliBase/Radio.cs b/BassBoom.Cli/CliBase/Radio.cs index bc97f3c..c4d2010 100644 --- a/BassBoom.Cli/CliBase/Radio.cs +++ b/BassBoom.Cli/CliBase/Radio.cs @@ -91,7 +91,7 @@ public static void RadioLoop() return ""; var buffer = new StringBuilder(); string boostIndicator = Common.volBoost ? new Color(ConsoleColors.Red).VTSequenceForeground : ""; - string indicator = $"┤ {boostIndicator}Volume: {Common.volume:0.00}{ColorTools.RenderResetForeground()} ├"; + string indicator = $"┤ {boostIndicator}Volume: {Common.volume * 100:0}%{ColorTools.RenderResetForeground()} ├"; var disco = PlaybackTools.IsPlaying(BassBoomCli.basolia) && Common.enableDisco ? new Color($"hsl:{hue};50;50") : BassBoomCli.white; if (PlaybackTools.IsPlaying(BassBoomCli.basolia)) {