misc
This commit is contained in:
@@ -74,6 +74,7 @@ Features that mpv and mpv.net have in common
|
|||||||
--------------------------------------------
|
--------------------------------------------
|
||||||
|
|
||||||
- Lua and JavaScript Scripting
|
- 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
|
- Simple config files that are easy to read and edit
|
||||||
- JSON IPC to control the player with a external programs
|
- JSON IPC to control the player with a external programs
|
||||||
- On Screen Controler (OSC, play control buttons) with modern flat design
|
- On Screen Controler (OSC, play control buttons) with modern flat design
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
|
|
||||||
|
- Progress command shows time and date.
|
||||||
- New show-santa-logo (green and grumpy) option.
|
- New show-santa-logo (green and grumpy) option.
|
||||||
- New quick bookmark feature, see manual.
|
- New quick bookmark feature, see manual.
|
||||||
- Fix crash choosing Matroska edition in the menu.
|
- Fix crash choosing Matroska edition in the menu.
|
||||||
|
|||||||
@@ -348,7 +348,7 @@ and allows to play the selected entry.
|
|||||||
Shows available profiles with a message box.
|
Shows available profiles with a message box.
|
||||||
|
|
||||||
### show-progress
|
### show-progress
|
||||||
Shows a simple OSD progress message.
|
Shows a simple OSD progress message with time and date.
|
||||||
|
|
||||||
### show-properties
|
### show-properties
|
||||||
Shows available properties in the command palette and
|
Shows available properties in the command palette and
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ namespace mpvnet
|
|||||||
static void Execute(string file)
|
static void Execute(string file)
|
||||||
{
|
{
|
||||||
string code = File.ReadAllText(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);
|
string outputFile = Path.Combine(Path.GetTempPath(), filename);
|
||||||
|
|
||||||
if (!File.Exists(outputFile))
|
if (!File.Exists(outputFile))
|
||||||
|
|||||||
@@ -678,6 +678,8 @@ namespace mpvnet
|
|||||||
if (App.QuickBookmark == 0)
|
if (App.QuickBookmark == 0)
|
||||||
{
|
{
|
||||||
App.QuickBookmark = (float)Core.GetPropertyDouble("time-pos");
|
App.QuickBookmark = (float)Core.GetPropertyDouble("time-pos");
|
||||||
|
|
||||||
|
if (App.QuickBookmark != 0)
|
||||||
Core.Command("show-text 'Bookmark Saved'");
|
Core.Command("show-text 'Bookmark Saved'");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -954,7 +954,7 @@ namespace mpvnet
|
|||||||
void UpdateProgressBar()
|
void UpdateProgressBar()
|
||||||
{
|
{
|
||||||
if (Core.TaskbarProgress && Taskbar != null)
|
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));
|
void PropChangeOnTop(bool value) => BeginInvoke(new Action(() => TopMost = value));
|
||||||
|
|||||||
@@ -802,11 +802,11 @@ namespace mpvnet
|
|||||||
return lpBuffer.ToInt64();
|
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_error err = mpv_get_property(Handle, GetUtf8Bytes(name),
|
||||||
mpv_format.MPV_FORMAT_DOUBLE, out double value);
|
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}");
|
HandleError(err, $"error getting property: {name}");
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user