Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c3f2b22ff5 | ||
|
|
c1a03c3e4b | ||
|
|
e041908f04 |
10
Changelog.md
10
Changelog.md
@@ -1,3 +1,13 @@
|
|||||||
|
###
|
||||||
|
|
||||||
|
### 4.1
|
||||||
|
|
||||||
|
- drag & drop support for subtitles was added
|
||||||
|
- libmpv was updated
|
||||||
|
- command line support for stdin and URLs was added
|
||||||
|
- there was a crash happening when the player is
|
||||||
|
minimized in the taskbar
|
||||||
|
|
||||||
### 4.0
|
### 4.0
|
||||||
|
|
||||||
- on the start screen the mpv.NET icon is shown instead of the mpv icon,
|
- on the start screen the mpv.NET icon is shown instead of the mpv icon,
|
||||||
|
|||||||
@@ -203,7 +203,6 @@ namespace mpvnet
|
|||||||
{
|
{
|
||||||
d.InitialDirectory = Path.GetDirectoryName(mp.get_property_string("path", false));
|
d.InitialDirectory = Path.GetDirectoryName(mp.get_property_string("path", false));
|
||||||
d.Multiselect = true;
|
d.Multiselect = true;
|
||||||
|
|
||||||
if (d.ShowDialog() == DialogResult.OK)
|
if (d.ShowDialog() == DialogResult.OK)
|
||||||
foreach (string i in d.FileNames)
|
foreach (string i in d.FileNames)
|
||||||
mp.commandv("sub-add", i);
|
mp.commandv("sub-add", i);
|
||||||
|
|||||||
@@ -17,8 +17,9 @@ namespace mpvnet
|
|||||||
{
|
{
|
||||||
public class App
|
public class App
|
||||||
{
|
{
|
||||||
public static string[] VideoTypes { get; } = "mkv mp4 mpg avi mov webm vob wmv flv avs 264 h264 asf webm mpeg mpv y4m avc hevc 265 h265 m2v m2ts vpy mts m4v".Split(" ".ToCharArray());
|
public static string[] VideoTypes { get; } = "mkv mp4 mpg avi mov webm vob wmv flv avs 264 h264 asf webm mpeg mpv y4m avc hevc 265 h265 m2v m2ts vpy mts m4v".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(" ".ToCharArray());
|
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[] SubtitleTypes { get; } = "srt ass idx sup ttxt ssa smi".Split(' ');
|
||||||
|
|
||||||
public static bool IsDarkMode {
|
public static bool IsDarkMode {
|
||||||
get {
|
get {
|
||||||
|
|||||||
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
|||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("4.0.0.0")]
|
[assembly: AssemblyVersion("4.1.0.0")]
|
||||||
[assembly: AssemblyFileVersion("4.0.0.0")]
|
[assembly: AssemblyFileVersion("4.1.0.0")]
|
||||||
|
|||||||
@@ -202,7 +202,7 @@ name = "sub-border-color"
|
|||||||
default = ""
|
default = ""
|
||||||
type = "color"
|
type = "color"
|
||||||
filter = "Subtitle"
|
filter = "Subtitle"
|
||||||
help = "See --sub-color. Color used for the sub font border. Ignored when sub-back-color is specified (or more exactly: when that option is not set to completely transparent)."
|
help = "See sub-color. Color used for the sub font border. Ignored when sub-back-color is specified (or more exactly: when that option is not set to completely transparent)."
|
||||||
|
|
||||||
[[settings]]
|
[[settings]]
|
||||||
name = "sub-back-color"
|
name = "sub-back-color"
|
||||||
|
|||||||
@@ -537,8 +537,14 @@ namespace mpvnet
|
|||||||
List<string> files = new List<string>();
|
List<string> files = new List<string>();
|
||||||
|
|
||||||
foreach (string i in args)
|
foreach (string i in args)
|
||||||
if (!i.StartsWith("--") && File.Exists(i))
|
{
|
||||||
|
if (!i.StartsWith("--") && File.Exists(i) || i == "-" || i.StartsWith("http"))
|
||||||
|
{
|
||||||
files.Add(i);
|
files.Add(i);
|
||||||
|
if (i.StartsWith("http"))
|
||||||
|
RegistryHelp.SetObject("HKCU\\Software\\" + Application.ProductName, "LastURL", i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
mp.LoadFiles(files.ToArray());
|
mp.LoadFiles(files.ToArray());
|
||||||
|
|
||||||
@@ -562,6 +568,18 @@ namespace mpvnet
|
|||||||
{
|
{
|
||||||
if (files is null || files.Length == 0) return;
|
if (files is null || files.Length == 0) return;
|
||||||
HideLogo();
|
HideLogo();
|
||||||
|
List<string> fileList = files.ToList();
|
||||||
|
|
||||||
|
foreach (string file in files) {
|
||||||
|
string ext = Path.GetExtension(file).TrimStart('.').ToLower();
|
||||||
|
if (App.SubtitleTypes.Contains(ext)) {
|
||||||
|
mp.commandv("sub-add", file);
|
||||||
|
fileList.Remove(file);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (fileList.Count == 0) return;
|
||||||
|
files = fileList.ToArray();
|
||||||
int count = mp.get_property_int("playlist-count");
|
int count = mp.get_property_int("playlist-count");
|
||||||
|
|
||||||
foreach (string file in files)
|
foreach (string file in files)
|
||||||
@@ -658,6 +676,7 @@ namespace mpvnet
|
|||||||
{
|
{
|
||||||
if (MainForm.Instance is null) return;
|
if (MainForm.Instance is null) return;
|
||||||
Rectangle cr = MainForm.Instance.ClientRectangle;
|
Rectangle cr = MainForm.Instance.ClientRectangle;
|
||||||
|
if (cr.Width == 0 || cr.Height == 0) return;
|
||||||
|
|
||||||
using (Bitmap b = new Bitmap(cr.Width, cr.Height))
|
using (Bitmap b = new Bitmap(cr.Width, cr.Height))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user