diff --git a/FRESHMusicPlayer/FRESHMusicPlayer-WPF-UI-Test/Handlers/UpdateHandler.cs b/FRESHMusicPlayer/FRESHMusicPlayer-WPF-UI-Test/Handlers/UpdateHandler.cs index 0853497..1bb5cc8 100644 --- a/FRESHMusicPlayer/FRESHMusicPlayer-WPF-UI-Test/Handlers/UpdateHandler.cs +++ b/FRESHMusicPlayer/FRESHMusicPlayer-WPF-UI-Test/Handlers/UpdateHandler.cs @@ -15,9 +15,9 @@ namespace FRESHMusicPlayer.Handlers { public class UpdateHandler { - public static async Task UpdateApp(bool useDeltaPatching = true) + public static async Task UpdateApp(bool useDeltaPatching = true, bool forceUpdate = false) { - if (App.Config.UpdateMode == UpdateMode.Manual) return; + if (App.Config.UpdateMode == UpdateMode.Manual && forceUpdate) return; // Updater not present, probably standalone if (!File.Exists(Path.Combine(Path.GetFullPath(Path.Combine(Path.GetDirectoryName(Assembly.GetEntryAssembly().Location), @"../")), "Update.exe"))) return; App.Config.UpdatesLastChecked = DateTime.Now; diff --git a/FRESHMusicPlayer/FRESHMusicPlayer-WPF-UI-Test/Pages/Library/LibraryPage.xaml.cs b/FRESHMusicPlayer/FRESHMusicPlayer-WPF-UI-Test/Pages/Library/LibraryPage.xaml.cs index eae2f4c..81e0310 100644 --- a/FRESHMusicPlayer/FRESHMusicPlayer-WPF-UI-Test/Pages/Library/LibraryPage.xaml.cs +++ b/FRESHMusicPlayer/FRESHMusicPlayer-WPF-UI-Test/Pages/Library/LibraryPage.xaml.cs @@ -60,7 +60,7 @@ namespace FRESHMusicPlayer.Pages.Library }); var lengthTimeSpan = new TimeSpan(0, 0, 0, length); InfoLabel.Visibility = Visibility.Visible; - InfoLabel.Text = $@"{Properties.Resources.MAINWINDOW_TRACKS}: {TracksPanel.Items.Count} ・ {Math.Round(lengthTimeSpan.TotalHours)}:{lengthTimeSpan:mm}:{lengthTimeSpan:ss}"; + InfoLabel.Text = $@"{Properties.Resources.MAINWINDOW_TRACKS}: {TracksPanel.Items.Count} ・ {Math.Floor(lengthTimeSpan.TotalHours)}:{lengthTimeSpan:mm}:{lengthTimeSpan:ss}"; } public async void ShowArtists() { diff --git a/FRESHMusicPlayer/FRESHMusicPlayer-WPF-UI-Test/Pages/Settings/SettingsPage.xaml.cs b/FRESHMusicPlayer/FRESHMusicPlayer-WPF-UI-Test/Pages/Settings/SettingsPage.xaml.cs index 6d2e246..68af43b 100644 --- a/FRESHMusicPlayer/FRESHMusicPlayer-WPF-UI-Test/Pages/Settings/SettingsPage.xaml.cs +++ b/FRESHMusicPlayer/FRESHMusicPlayer-WPF-UI-Test/Pages/Settings/SettingsPage.xaml.cs @@ -193,7 +193,11 @@ namespace FRESHMusicPlayer.Pages WinForms.Application.Restart(); } - private async void Updates_CheckUpdatesButton_Click(object sender, RoutedEventArgs e) => await UpdateHandler.UpdateApp(); + private async void Updates_CheckUpdatesButton_Click(object sender, RoutedEventArgs e) + { + await UpdateHandler.UpdateApp(forceUpdate:true); + InitFields(); + } } public enum LanguageCombo {