Support of --version command
This commit is contained in:
@@ -2,10 +2,11 @@
|
|||||||
5.4.8.7 Beta (202?-??-??)
|
5.4.8.7 Beta (202?-??-??)
|
||||||
=========================
|
=========================
|
||||||
|
|
||||||
- history feature can be configured to ingore defined strings:
|
- History feature can be configured to ingore defined strings:
|
||||||
script-opt = history-discard=value1;value2
|
script-opt = history-discard=value1;value2
|
||||||
- Web stream audio and subtitle track selection.
|
- Web stream audio and subtitle track selection.
|
||||||
- On Windows 10 the default code page was changed to UTF8.
|
- On Windows 10 1903 and later the default code page was changed to UTF8.
|
||||||
|
- Support of --version command.
|
||||||
|
|
||||||
|
|
||||||
5.4.8.6 Beta (2020-12-24)
|
5.4.8.6 Beta (2020-12-24)
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ namespace mpvnet
|
|||||||
{
|
{
|
||||||
public static class App
|
public static class App
|
||||||
{
|
{
|
||||||
public static string[] VideoTypes { get; } = "264 265 asf avc avi avs dav flv h264 h265 hevc m2ts m2v m4v mkv mov mp4 mpeg mpg mpv mts ts vob vpy webm wmv y4m".Split(' ');
|
public static string[] VideoTypes { get; } = "264 265 asf avc avi avs dav flv h264 h265 hevc m2t m2ts m2v m4v mkv mov mp4 mpeg mpg mpv mts ts vob vpy webm wmv y4m".Split(' ');
|
||||||
public static string[] AudioTypes { get; } = "mp3 mp2 ac3 ogg opus flac wav w64 m4a dts dtsma dtshr dtshd eac3 thd thd+ac3 mka aac mpa".Split(' ');
|
public static string[] AudioTypes { get; } = "mp3 mp2 ac3 ogg opus flac wav w64 m4a dts dtsma dtshr dtshd eac3 thd thd+ac3 mka aac mpa".Split(' ');
|
||||||
public static string[] ImageTypes { get; } = { "jpg", "bmp", "gif", "png" };
|
public static string[] ImageTypes { get; } = { "jpg", "bmp", "gif", "png" };
|
||||||
public static string[] SubtitleTypes { get; } = { "srt", "ass", "idx", "sup", "ttxt", "ssa", "smi" };
|
public static string[] SubtitleTypes { get; } = { "srt", "ass", "idx", "sup", "ttxt", "ssa", "smi" };
|
||||||
@@ -99,6 +99,14 @@ namespace mpvnet
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static string Version {
|
||||||
|
get {
|
||||||
|
return "Copyright (C) 2000-2020 mpv.net/mpv/mplayer\n" +
|
||||||
|
$"mpv.net {Application.ProductVersion} ({File.GetLastWriteTime(Application.ExecutablePath).ToShortDateString()})\n" +
|
||||||
|
$"{core.get_property_string("mpv-version")} ({File.GetLastWriteTime(Folder.Startup + "mpv-1.dll").ToShortDateString()})\nffmpeg {core.get_property_string("ffmpeg-version")}\nMIT License";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static void ShowException(object obj)
|
public static void ShowException(object obj)
|
||||||
{
|
{
|
||||||
if (obj is Exception e)
|
if (obj is Exception e)
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Diagnostics;
|
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ using System.Linq;
|
|||||||
using System.Management.Automation;
|
using System.Management.Automation;
|
||||||
using System.Management.Automation.Runspaces;
|
using System.Management.Automation.Runspaces;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
using static mpvnet.Core;
|
using static mpvnet.Core;
|
||||||
using static NewLine;
|
using static NewLine;
|
||||||
|
|||||||
@@ -1,10 +1,7 @@
|
|||||||
|
|
||||||
using System.IO;
|
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Input;
|
using System.Windows.Input;
|
||||||
|
|
||||||
using static mpvnet.Core;
|
|
||||||
|
|
||||||
namespace mpvnet
|
namespace mpvnet
|
||||||
{
|
{
|
||||||
public partial class AboutWindow : Window
|
public partial class AboutWindow : Window
|
||||||
@@ -12,9 +9,7 @@ namespace mpvnet
|
|||||||
public AboutWindow()
|
public AboutWindow()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
ContentBlock.Text= "Copyright (C) 2017-2020 Frank Skare (stax76)\n" +
|
ContentBlock.Text = App.Version;
|
||||||
$"mpv.net {System.Windows.Forms.Application.ProductVersion} ({File.GetLastWriteTime(System.Windows.Forms.Application.ExecutablePath).ToShortDateString()})\n" +
|
|
||||||
$"{core.get_property_string("mpv-version")} ({File.GetLastWriteTime(Folder.Startup + "mpv-1.dll").ToShortDateString()})\nffmpeg {core.get_property_string("ffmpeg-version")}\nMIT License";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnPreviewKeyDown(KeyEventArgs e) => Close();
|
protected override void OnPreviewKeyDown(KeyEventArgs e) => Close();
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Diagnostics;
|
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.Drawing.Drawing2D;
|
using System.Drawing.Drawing2D;
|
||||||
using System.Drawing.Imaging;
|
using System.Drawing.Imaging;
|
||||||
@@ -9,7 +8,6 @@ using System.IO;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
|
||||||
using static libmpv;
|
using static libmpv;
|
||||||
@@ -956,25 +954,33 @@ namespace mpvnet
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (arg == "--profile=help")
|
if (!preInit)
|
||||||
{
|
{
|
||||||
ConsoleHelp.Write(mpvHelp.GetProfiles(), null);
|
if (arg == "--profile=help")
|
||||||
continue;
|
{
|
||||||
}
|
Console.WriteLine(mpvHelp.GetProfiles());
|
||||||
else if (arg == "--vd=help" || arg == "--ad=help")
|
continue;
|
||||||
{
|
}
|
||||||
ConsoleHelp.Write(mpvHelp.GetDecoders(), null);
|
else if (arg == "--vd=help" || arg == "--ad=help")
|
||||||
continue;
|
{
|
||||||
}
|
Console.WriteLine(mpvHelp.GetDecoders());
|
||||||
else if (arg == "--audio-device=help")
|
continue;
|
||||||
{
|
}
|
||||||
ConsoleHelp.Write(core.get_property_osd_string("audio-device-list"), null);
|
else if (arg == "--audio-device=help")
|
||||||
continue;
|
{
|
||||||
}
|
Console.WriteLine(core.get_property_osd_string("audio-device-list"));
|
||||||
else if (arg == "--input-keylist")
|
continue;
|
||||||
{
|
}
|
||||||
ConsoleHelp.Write(core.get_property_string("input-key-list").Replace(",", BR), null);
|
else if (arg == "--version")
|
||||||
continue;
|
{
|
||||||
|
Console.WriteLine(App.Version);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
else if (arg == "--input-keylist")
|
||||||
|
{
|
||||||
|
Console.WriteLine(core.get_property_string("input-key-list").Replace(",", BR));
|
||||||
|
continue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!arg.StartsWith("--"))
|
if (!arg.StartsWith("--"))
|
||||||
|
|||||||
Reference in New Issue
Block a user