Skip to content

Commit

Permalink
chg - Followed the breaking changes of Terminaux
Browse files Browse the repository at this point in the history
---

Type: chg
Breaking: False
Doc Required: False
Backport Required: False
Part: 1/1
  • Loading branch information
AptiviCEO committed Oct 17, 2024
1 parent 637d9a1 commit 9e1fe3d
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 25 deletions.
8 changes: 4 additions & 4 deletions BassBoom.Cli/CliBase/Common.cs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ internal static void ShowDeviceDriver()
continue;
}
}
InfoBoxColor.WriteInfoBox(
InfoBoxModalColor.WriteInfoBoxModal(
$$"""
Device and Driver
=================
Expand All @@ -138,7 +138,7 @@ Available devices and drivers

internal static void ShowSpecs()
{
InfoBoxColor.WriteInfoBox(
InfoBoxModalColor.WriteInfoBoxModal(
$$"""
BassBoom specifications
=======================
Expand Down Expand Up @@ -170,7 +170,7 @@ System specifications

internal static void ShowHelp()
{
InfoBoxColor.WriteInfoBox(
InfoBoxModalColor.WriteInfoBoxModal(
"""
Available keystrokes
====================
Expand Down Expand Up @@ -206,7 +206,7 @@ [Z] System info

internal static void ShowHelpRadio()
{
InfoBoxColor.WriteInfoBox(
InfoBoxModalColor.WriteInfoBoxModal(
"""
Available keystrokes
====================
Expand Down
6 changes: 3 additions & 3 deletions BassBoom.Cli/CliBase/Equalizer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,15 @@ internal static void OpenEqualizer(Screen screen)
}
catch (BasoliaException bex)
{
InfoBoxColor.WriteInfoBox("There's an error with Basolia when trying to process the equalizer operation.\n\n" + bex.Message);
InfoBoxModalColor.WriteInfoBoxModal("There's an error with Basolia when trying to process the equalizer operation.\n\n" + bex.Message);
}
catch (BasoliaOutException bex)
{
InfoBoxColor.WriteInfoBox("There's an error with Basolia output when trying to process the equalizer operation.\n\n" + bex.Message);
InfoBoxModalColor.WriteInfoBoxModal("There's an error with Basolia output when trying to process the equalizer operation.\n\n" + bex.Message);
}
catch (Exception ex)
{
InfoBoxColor.WriteInfoBox("There's an unknown error when trying to process the equalizer operation.\n\n" + ex.Message);
InfoBoxModalColor.WriteInfoBoxModal("There's an unknown error when trying to process the equalizer operation.\n\n" + ex.Message);
}
}

Expand Down
8 changes: 4 additions & 4 deletions BassBoom.Cli/CliBase/Player.cs
Original file line number Diff line number Diff line change
Expand Up @@ -116,21 +116,21 @@ public static void PlayerLoop()
{
if (PlaybackTools.Playing)
PlaybackTools.Stop();
InfoBoxColor.WriteInfoBox("There's an error with Basolia when trying to process the music file.\n\n" + bex.Message);
InfoBoxModalColor.WriteInfoBoxModal("There's an error with Basolia when trying to process the music file.\n\n" + bex.Message);
playerScreen.RequireRefresh();
}
catch (BasoliaOutException bex)
{
if (PlaybackTools.Playing)
PlaybackTools.Stop();
InfoBoxColor.WriteInfoBox("There's an error with Basolia output when trying to process the music file.\n\n" + bex.Message);
InfoBoxModalColor.WriteInfoBoxModal("There's an error with Basolia output when trying to process the music file.\n\n" + bex.Message);
playerScreen.RequireRefresh();
}
catch (Exception ex)
{
if (PlaybackTools.Playing)
PlaybackTools.Stop();
InfoBoxColor.WriteInfoBox("There's an unknown error when trying to process the music file.\n\n" + ex.Message);
InfoBoxModalColor.WriteInfoBoxModal("There's an unknown error when trying to process the music file.\n\n" + ex.Message);
playerScreen.RequireRefresh();
}
}
Expand Down Expand Up @@ -305,7 +305,7 @@ private static void HandlePlay()
}
catch (Exception ex)
{
InfoBoxColor.WriteInfoBox($"Playback failure: {ex.Message}");
InfoBoxModalColor.WriteInfoBoxModal($"Playback failure: {ex.Message}");
Common.failedToPlay = true;
}
}
Expand Down
12 changes: 6 additions & 6 deletions BassBoom.Cli/CliBase/PlayerControls.cs
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ internal static void PromptForAddSong()
PlaybackPositioningTools.SeekToFrame(currentPos);
}
else
InfoBoxColor.WriteInfoBox($"File \"{path}\" doesn't exist.");
InfoBoxModalColor.WriteInfoBoxModal($"File \"{path}\" doesn't exist.");
}

internal static void PromptForAddDirectory()
Expand All @@ -260,7 +260,7 @@ internal static void PromptForAddDirectory()
}
}
else
InfoBoxColor.WriteInfoBox("Music library directory is not found.");
InfoBoxModalColor.WriteInfoBoxModal("Music library directory is not found.");
}

internal static void PopulateMusicFileInfo(string musicPath)
Expand All @@ -273,7 +273,7 @@ internal static void PopulateMusicFileInfo(string musicPath)
if (!Common.cachedInfos.Any((csi) => csi.MusicPath == musicPath))
{
ScreenTools.CurrentScreen?.RequireRefresh();
InfoBoxColor.WriteInfoBox($"Loading BassBoom to open {musicPath}...", false);
InfoBoxNonModalColor.WriteInfoBox($"Loading BassBoom to open {musicPath}...");
var total = AudioInfoTools.GetDuration(true);
var formatInfo = FormatTools.GetFormatInfo();
var frameInfo = AudioInfoTools.GetFrameInfo();
Expand Down Expand Up @@ -344,15 +344,15 @@ internal static (string musicName, string musicArtist, string musicGenre) GetMus
string lyricsPath = Path.GetDirectoryName(musicPath) + "/" + Path.GetFileNameWithoutExtension(musicPath) + ".lrc";
try
{
InfoBoxColor.WriteInfoBox($"Trying to open lyrics file {lyricsPath}...", false);
InfoBoxNonModalColor.WriteInfoBox($"Trying to open lyrics file {lyricsPath}...");
if (File.Exists(lyricsPath))
return LyricReader.GetLyrics(lyricsPath);
else
return null;
}
catch (Exception ex)
{
InfoBoxColor.WriteInfoBox($"Can't open lyrics file {lyricsPath}... {ex.Message}");
InfoBoxModalColor.WriteInfoBoxModal($"Can't open lyrics file {lyricsPath}... {ex.Message}");
}
return null;
}
Expand Down Expand Up @@ -416,7 +416,7 @@ internal static void ShowSongInfo()
textsBuilder.AppendLine($"T - {text.Item1}: {text.Item2}");
foreach (var text in idv2?.Extras ?? [])
textsBuilder.AppendLine($"E - {text.Item1}: {text.Item2}");
InfoBoxColor.WriteInfoBox(
InfoBoxModalColor.WriteInfoBoxModal(
$$"""
Song info
=========
Expand Down
8 changes: 4 additions & 4 deletions BassBoom.Cli/CliBase/Radio.cs
Original file line number Diff line number Diff line change
Expand Up @@ -108,21 +108,21 @@ public static void RadioLoop()
{
if (PlaybackTools.Playing)
PlaybackTools.Stop();
InfoBoxColor.WriteInfoBox("There's an error with Basolia when trying to process the music file.\n\n" + bex.Message);
InfoBoxModalColor.WriteInfoBoxModal("There's an error with Basolia when trying to process the music file.\n\n" + bex.Message);
radioScreen.RequireRefresh();
}
catch (BasoliaOutException bex)
{
if (PlaybackTools.Playing)
PlaybackTools.Stop();
InfoBoxColor.WriteInfoBox("There's an error with Basolia output when trying to process the music file.\n\n" + bex.Message);
InfoBoxModalColor.WriteInfoBoxModal("There's an error with Basolia output when trying to process the music file.\n\n" + bex.Message);
radioScreen.RequireRefresh();
}
catch (Exception ex)
{
if (PlaybackTools.Playing)
PlaybackTools.Stop();
InfoBoxColor.WriteInfoBox("There's an unknown error when trying to process the music file.\n\n" + ex.Message);
InfoBoxModalColor.WriteInfoBoxModal("There's an unknown error when trying to process the music file.\n\n" + ex.Message);
radioScreen.RequireRefresh();
}
}
Expand Down Expand Up @@ -245,7 +245,7 @@ private static void HandlePlay()
}
catch (Exception ex)
{
InfoBoxColor.WriteInfoBox($"Playback failure: {ex.Message}");
InfoBoxModalColor.WriteInfoBoxModal($"Playback failure: {ex.Message}");
Common.failedToPlay = true;
}
}
Expand Down
8 changes: 4 additions & 4 deletions BassBoom.Cli/CliBase/RadioControls.cs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ internal static void PopulateRadioStationInfo(string musicPath)
Common.Switch(musicPath);
if (!Common.cachedInfos.Any((csi) => csi.MusicPath == musicPath))
{
InfoBoxColor.WriteInfoBox($"Loading BassBoom to open {musicPath}...", false);
InfoBoxNonModalColor.WriteInfoBox($"Loading BassBoom to open {musicPath}...");
var formatInfo = FormatTools.GetFormatInfo();
var frameInfo = AudioInfoTools.GetFrameInfo();

Expand Down Expand Up @@ -168,7 +168,7 @@ internal static void ShowStationInfo()
{
if (Common.CurrentCachedInfo is null)
return;
InfoBoxColor.WriteInfoBox(
InfoBoxModalColor.WriteInfoBoxModal(
$$"""
Station info
============
Expand Down Expand Up @@ -226,7 +226,7 @@ internal static void ShowExtendedStationInfo()
streamBuilder.AppendLine($"Media type: {stream.MimeInfo}");
streamBuilder.AppendLine("===============================");
}
InfoBoxColor.WriteInfoBox(
InfoBoxModalColor.WriteInfoBoxModal(
$$"""
Radio server info
=================
Expand All @@ -246,7 +246,7 @@ Stream info
);
}
else
InfoBoxColor.WriteInfoBox($"Unable to get extended radio station info for {Common.CurrentCachedInfo.MusicPath}");
InfoBoxModalColor.WriteInfoBoxModal($"Unable to get extended radio station info for {Common.CurrentCachedInfo.MusicPath}");
}
}
}

0 comments on commit 9e1fe3d

Please sign in to comment.