Fix showing incorrect timestamps in About dialog of Store version

This commit is contained in:
stax76
2022-03-10 18:27:33 +01:00
parent 36d3543852
commit 91fa89b058
2 changed files with 17 additions and 2 deletions

View File

@@ -1,4 +1,6 @@
- Fix showing incorrect timestamps in About dialog of Store version.
5.7.0.0 Stable (2022-03-09)
- Improved title and chapter menu for Blu-Rays.

View File

@@ -130,8 +130,21 @@ namespace mpvnet
}
public static string Version => "Copyright (C) 2000-2022 mpv.net/mpv/mplayer\n" +
$"mpv.net {Application.ProductVersion} ({File.GetLastWriteTime(Application.ExecutablePath).ToShortDateString()})\n" +
$"{Core.GetPropertyString("mpv-version")} ({File.GetLastWriteTime(Folder.Startup + "mpv-2.dll").ToShortDateString()})\nffmpeg {Core.GetPropertyString("ffmpeg-version")}\nMediaInfo {FileVersionInfo.GetVersionInfo(Path.Combine(Application.StartupPath, "MediaInfo.dll")).FileVersion} ({File.GetLastWriteTime(Path.Combine(Application.StartupPath , "MediaInfo.dll")).ToShortDateString()})\nGPL v2 License";
$"mpv.net {Application.ProductVersion}" + GetLastWriteTime(Application.ExecutablePath) + "\n" +
$"{Core.GetPropertyString("mpv-version")}" + GetLastWriteTime(Folder.Startup + "mpv-2.dll") + "\n" +
$"ffmpeg {Core.GetPropertyString("ffmpeg-version")}\n" +
$"MediaInfo {FileVersionInfo.GetVersionInfo(Path.Combine(Application.StartupPath, "MediaInfo.dll")).FileVersion}" +
GetLastWriteTime(Path.Combine(Application.StartupPath , "MediaInfo.dll")) + "\nGPL v2 License";
static string GetLastWriteTime(string path)
{
if (IsStoreVrsion)
return "";
return $" ({File.GetLastWriteTime(path).ToShortDateString()})";
}
static bool IsStoreVrsion => Application.StartupPath.Contains("FrankSkare.mpv.net");
public static void ShowException(object obj)
{