From a7a1f83c1f3ae1a5df1928d978eac1a46548da0b Mon Sep 17 00:00:00 2001 From: Imad <59332263+imadofficial@users.noreply.github.com> Date: Sat, 1 Jun 2024 21:11:10 +0200 Subject: [PATCH] Add files via upload --- SoundOS6/Views/MainView.axaml | 2 +- SoundOS6/Views/MainView.axaml.cs | 6 +- SoundOS6/Views/MainWindow.axaml | 2 +- SoundOS6/Views/Music/MusicLocal.axaml.cs | 10 +- SoundOS6/Views/Music/MusicRadio.axaml.cs | 2 +- SoundOS6/Views/Music/TVMode.axaml | 22 +++- SoundOS6/Views/Music/TVMode.axaml.cs | 140 +++++++++++++++-------- SoundOS6/Views/MusicHandler.cs | 25 ++-- 8 files changed, 125 insertions(+), 84 deletions(-) diff --git a/SoundOS6/Views/MainView.axaml b/SoundOS6/Views/MainView.axaml index 1aaed45..6121532 100644 --- a/SoundOS6/Views/MainView.axaml +++ b/SoundOS6/Views/MainView.axaml @@ -7,7 +7,7 @@ x:Class="SoundOS6.Views.MainView" x:DataType="vm:MainViewModel"> - + diff --git a/SoundOS6/Views/MainView.axaml.cs b/SoundOS6/Views/MainView.axaml.cs index 257af8c..a16528a 100644 --- a/SoundOS6/Views/MainView.axaml.cs +++ b/SoundOS6/Views/MainView.axaml.cs @@ -54,8 +54,6 @@ await Dispatcher.UIThread.InvokeAsync(() => EndTime.Opacity = 1; BackgroundBar.Opacity = 1; LiveLbl.Opacity = 0; - - EndTime.Text = SongSpan.ToString(); } Instructions.Opacity = 0; @@ -79,7 +77,7 @@ private void Button_Click(object? sender, Avalonia.Interactivity.RoutedEventArgs { MusicHandler.ResumeMusic(); - using (var stream = AssetLoader.Open(new Uri("avares://PiSound/Assets/Icons/Light/Pause.png"))) + using (var stream = AssetLoader.Open(new Uri("avares://SoundOS6/Assets/Icons/Light/Pause.png"))) { Play.Source = new Avalonia.Media.Imaging.Bitmap(stream); } @@ -91,7 +89,7 @@ private void Button_Click(object? sender, Avalonia.Interactivity.RoutedEventArgs else { MusicHandler.PauseMusic(); - using (var stream = AssetLoader.Open(new Uri("avares://PiSound/Assets/Icons/Light/Play.png"))) + using (var stream = AssetLoader.Open(new Uri("avares://SoundOS6/Assets/Icons/Light/Play.png"))) { Play.Source = new Avalonia.Media.Imaging.Bitmap(stream); } diff --git a/SoundOS6/Views/MainWindow.axaml b/SoundOS6/Views/MainWindow.axaml index ad9af0e..661973c 100644 --- a/SoundOS6/Views/MainWindow.axaml +++ b/SoundOS6/Views/MainWindow.axaml @@ -7,6 +7,6 @@ mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450" x:Class="SoundOS6.Views.MainWindow" Icon="/Assets/avalonia-logo.ico" - Title="SoundOS (1.2 - Preview 2)"> + Title="SoundOS (1.2 - Preview 3)"> diff --git a/SoundOS6/Views/Music/MusicLocal.axaml.cs b/SoundOS6/Views/Music/MusicLocal.axaml.cs index ba68d24..153c179 100644 --- a/SoundOS6/Views/Music/MusicLocal.axaml.cs +++ b/SoundOS6/Views/Music/MusicLocal.axaml.cs @@ -182,9 +182,6 @@ private async void Button_Click(object sender, RoutedEventArgs e) MusicHome.Instance.PausePic.Opacity = 1; MainView.Instance.PlayCommandBtn.IsEnabled = true; - TimeSpan duration = tagFile.Properties.Duration; - MainView.Instance.EndTime.Text = duration.ToString(@"m\:ss"); - MainView.Instance.UnhideMusicWidget(); using (var stream = AssetLoader.Open(new Uri("avares://SoundOS6/Assets/Icons/Light/Pause.png"))) @@ -219,11 +216,8 @@ public async static void ElapsedProcess(object sender, EventArgs e) try { - if (TVMode.Instance.NotDragged) - { - TVMode.Instance.TimerElapsed.Text = currentPositionFormatted; - TVMode.Instance.Slider.Value = currentPositionInSeconds; - } + TVMode.Instance.TimerElapsed.Text = currentPositionFormatted; + TVMode.Instance.Slider.Value = currentPositionInSeconds; } catch (Exception) { diff --git a/SoundOS6/Views/Music/MusicRadio.axaml.cs b/SoundOS6/Views/Music/MusicRadio.axaml.cs index 6b177b3..5afb5e8 100644 --- a/SoundOS6/Views/Music/MusicRadio.axaml.cs +++ b/SoundOS6/Views/Music/MusicRadio.axaml.cs @@ -20,7 +20,7 @@ private async void Button_Click(object? sender, Avalonia.Interactivity.RoutedEve MusicHome.Instance.MusicArtist.Text = MusicHandler.MusicMetadata.Artist; var client = new HttpClient(); - var response = await client.GetAsync("https://plus.imadsnetwork.net/icon/Radio/STUBRU.png"); + var response = await client.GetAsync("https://plus.imadsnetwork.net/icon/Radio/MPB_Radio_1.png"); var bytes = await response.Content.ReadAsByteArrayAsync(); using var ms = new MemoryStream(bytes); var bitmap = new Bitmap(ms); diff --git a/SoundOS6/Views/Music/TVMode.axaml b/SoundOS6/Views/Music/TVMode.axaml index 498c910..2d37170 100644 --- a/SoundOS6/Views/Music/TVMode.axaml +++ b/SoundOS6/Views/Music/TVMode.axaml @@ -8,7 +8,7 @@