This commit is contained in:
stax76
2022-05-21 10:58:39 +02:00
parent cd84819a03
commit 27f7935127
7 changed files with 10 additions and 6 deletions

View File

@@ -74,6 +74,7 @@ Features that mpv and mpv.net have in common
--------------------------------------------
- Lua and JavaScript Scripting
- Hundreds available user scripts make mpv the most feature rich desktop video player
- Simple config files that are easy to read and edit
- JSON IPC to control the player with a external programs
- On Screen Controler (OSC, play control buttons) with modern flat design

View File

@@ -1,4 +1,5 @@
- Progress command shows time and date.
- New show-santa-logo (green and grumpy) option.
- New quick bookmark feature, see manual.
- Fix crash choosing Matroska edition in the menu.

View File

@@ -348,7 +348,7 @@ and allows to play the selected entry.
Shows available profiles with a message box.
### show-progress
Shows a simple OSD progress message.
Shows a simple OSD progress message with time and date.
### show-properties
Shows available properties in the command palette and

View File

@@ -25,7 +25,7 @@ namespace mpvnet
static void Execute(string file)
{
string code = File.ReadAllText(file);
string filename = Path.GetFileNameWithoutExtension(file) + " " + StringHelp.GetMD5Hash(code) + "-v5.dll";
string filename = Path.GetFileNameWithoutExtension(file) + " " + StringHelp.GetMD5Hash(code) + "-v6.dll";
string outputFile = Path.Combine(Path.GetTempPath(), filename);
if (!File.Exists(outputFile))

View File

@@ -678,6 +678,8 @@ namespace mpvnet
if (App.QuickBookmark == 0)
{
App.QuickBookmark = (float)Core.GetPropertyDouble("time-pos");
if (App.QuickBookmark != 0)
Core.Command("show-text 'Bookmark Saved'");
}
else

View File

@@ -954,7 +954,7 @@ namespace mpvnet
void UpdateProgressBar()
{
if (Core.TaskbarProgress && Taskbar != null)
Taskbar.SetValue(Core.GetPropertyDouble("time-pos"), Core.Duration.TotalSeconds);
Taskbar.SetValue(Core.GetPropertyDouble("time-pos", false), Core.Duration.TotalSeconds);
}
void PropChangeOnTop(bool value) => BeginInvoke(new Action(() => TopMost = value));

View File

@@ -802,11 +802,11 @@ namespace mpvnet
return lpBuffer.ToInt64();
}
public double GetPropertyDouble(string name)
public double GetPropertyDouble(string name, bool handleError = true)
{
mpv_error err = mpv_get_property(Handle, GetUtf8Bytes(name),
mpv_format.MPV_FORMAT_DOUBLE, out double value);
if (err < 0 && (App.DebugMode || App.DebuggerAttached))
if (err < 0 && handleError && (App.DebugMode || App.DebuggerAttached))
HandleError(err, $"error getting property: {name}");
return value;
}