misc
This commit is contained in:
@@ -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))
|
||||
|
||||
@@ -678,7 +678,9 @@ namespace mpvnet
|
||||
if (App.QuickBookmark == 0)
|
||||
{
|
||||
App.QuickBookmark = (float)Core.GetPropertyDouble("time-pos");
|
||||
Core.Command("show-text 'Bookmark Saved'");
|
||||
|
||||
if (App.QuickBookmark != 0)
|
||||
Core.Command("show-text 'Bookmark Saved'");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user