mirror of
https://github.com/Royce551/FRESHMusicPlayer.git
synced 2025-01-22 19:02:19 -05:00
Updater fixes
This commit is contained in:
parent
3bfadf6a14
commit
2f91946ff7
3 changed files with 8 additions and 4 deletions
|
@ -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;
|
||||
|
|
|
@ -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()
|
||||
{
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue