Compare commits

..

3 Commits
4.0 ... 4.1

Author SHA1 Message Date
Frank Skare
c3f2b22ff5 - 2019-06-01 15:15:41 +02:00
Frank Skare
c1a03c3e4b - 2019-05-31 04:19:41 +02:00
Frank Skare
e041908f04 drag & drop support for subtitles added 2019-05-31 04:18:05 +02:00
6 changed files with 36 additions and 7 deletions

View File

@@ -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
- on the start screen the mpv.NET icon is shown instead of the mpv icon,

View File

@@ -203,7 +203,6 @@ namespace mpvnet
{
d.InitialDirectory = Path.GetDirectoryName(mp.get_property_string("path", false));
d.Multiselect = true;
if (d.ShowDialog() == DialogResult.OK)
foreach (string i in d.FileNames)
mp.commandv("sub-add", i);

View File

@@ -17,8 +17,9 @@ namespace mpvnet
{
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[] 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[] 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(' ');
public static string[] SubtitleTypes { get; } = "srt ass idx sup ttxt ssa smi".Split(' ');
public static bool IsDarkMode {
get {

View File

@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("4.0.0.0")]
[assembly: AssemblyFileVersion("4.0.0.0")]
[assembly: AssemblyVersion("4.1.0.0")]
[assembly: AssemblyFileVersion("4.1.0.0")]

View File

@@ -202,7 +202,7 @@ name = "sub-border-color"
default = ""
type = "color"
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]]
name = "sub-back-color"

View File

@@ -537,8 +537,14 @@ namespace mpvnet
List<string> files = new List<string>();
foreach (string i in args)
if (!i.StartsWith("--") && File.Exists(i))
{
if (!i.StartsWith("--") && File.Exists(i) || i == "-" || i.StartsWith("http"))
{
files.Add(i);
if (i.StartsWith("http"))
RegistryHelp.SetObject("HKCU\\Software\\" + Application.ProductName, "LastURL", i);
}
}
mp.LoadFiles(files.ToArray());
@@ -562,6 +568,18 @@ namespace mpvnet
{
if (files is null || files.Length == 0) return;
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");
foreach (string file in files)
@@ -658,6 +676,7 @@ namespace mpvnet
{
if (MainForm.Instance is null) return;
Rectangle cr = MainForm.Instance.ClientRectangle;
if (cr.Width == 0 || cr.Height == 0) return;
using (Bitmap b = new Bitmap(cr.Width, cr.Height))
{