misc...
This commit is contained in:
@@ -5,6 +5,7 @@
|
|||||||
- Load AviSynth DLL from environment variable AviSynthDLL
|
- Load AviSynth DLL from environment variable AviSynthDLL
|
||||||
in order to support AviSynth portable mode.
|
in order to support AviSynth portable mode.
|
||||||
- New option global-media-keys (next, previous, play/pause, stop)
|
- New option global-media-keys (next, previous, play/pause, stop)
|
||||||
|
- libmpv shinshiro 2020-11-22
|
||||||
|
|
||||||
|
|
||||||
5.4.8.4 Beta
|
5.4.8.4 Beta
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ namespace RatingExtension // the assembly name must end with 'Extension'
|
|||||||
{
|
{
|
||||||
TimeSpan ts = DateTime.Now - DeleteTime;
|
TimeSpan ts = DateTime.Now - DeleteTime;
|
||||||
|
|
||||||
if (FileToDelete == core.get_property_string("path") && ts.TotalSeconds < 5)
|
if (FileToDelete == core.get_property_string("path") && ts.TotalSeconds < 5 && File.Exists(FileToDelete))
|
||||||
{
|
{
|
||||||
core.command("playlist-remove current");
|
core.command("playlist-remove current");
|
||||||
Thread.Sleep(2000);
|
Thread.Sleep(2000);
|
||||||
|
|||||||
@@ -381,7 +381,8 @@ namespace Tommy
|
|||||||
|
|
||||||
public override TomlNode this[string key] {
|
public override TomlNode this[string key] {
|
||||||
get {
|
get {
|
||||||
if (RawTable.TryGetValue(key, out var result)) return result;
|
if (RawTable.TryGetValue(key, out var result))
|
||||||
|
return result;
|
||||||
|
|
||||||
var lazy = new TomlLazy(this);
|
var lazy = new TomlLazy(this);
|
||||||
RawTable[key] = lazy;
|
RawTable[key] = lazy;
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ keep-open = yes
|
|||||||
keep-open-pause = no
|
keep-open-pause = no
|
||||||
osd-duration = 2000
|
osd-duration = 2000
|
||||||
osd-playing-msg = '${filename}'
|
osd-playing-msg = '${filename}'
|
||||||
script-opts = osc-scalewindowed=1.5,osc-hidetimeout=2000,console-scale=1
|
script-opts = osc-scalewindowed=1.5,osc-hidetimeout=2000,osc-greenandgrumpy=yes,console-scale=1
|
||||||
screenshot-directory = '~~desktop/'
|
screenshot-directory = '~~desktop/'
|
||||||
|
|
||||||
[protocol.https]
|
[protocol.https]
|
||||||
|
|||||||
@@ -120,29 +120,28 @@ namespace mpvnet
|
|||||||
|
|
||||||
object LockObject = new object();
|
object LockObject = new object();
|
||||||
|
|
||||||
void Search(string searchtext)
|
void Search(string searchText)
|
||||||
{
|
{
|
||||||
lock (LockObject)
|
lock (LockObject)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
List<string> items = new List<string>();
|
List<string> items = new List<string>();
|
||||||
UInt32 i;
|
StringBuilder sb = new StringBuilder(500);
|
||||||
const int bufsize = 500;
|
Everything_SetSearch(searchText);
|
||||||
StringBuilder buf = new StringBuilder(bufsize);
|
|
||||||
Everything_SetSearch(searchtext);
|
|
||||||
Everything_SetRequestFlags(EVERYTHING_REQUEST_FILE_NAME | EVERYTHING_REQUEST_PATH);
|
Everything_SetRequestFlags(EVERYTHING_REQUEST_FILE_NAME | EVERYTHING_REQUEST_PATH);
|
||||||
Everything_Query(true);
|
Everything_Query(true);
|
||||||
|
uint count = Everything_GetNumResults();
|
||||||
|
|
||||||
for (i = 0; i < Everything_GetNumResults(); i++)
|
for (uint i = 0; i < count; i++)
|
||||||
{
|
{
|
||||||
Everything_GetResultFullPathName(i, buf, bufsize);
|
Everything_GetResultFullPathName(i, sb, (uint)sb.Capacity);
|
||||||
string ext = buf.ToString().Ext();
|
string ext = sb.ToString().Ext();
|
||||||
|
|
||||||
if (App.AudioTypes.Contains(ext) || App.VideoTypes.Contains(ext)
|
if (App.AudioTypes.Contains(ext) || App.VideoTypes.Contains(ext)
|
||||||
|| App.ImageTypes.Contains(ext))
|
|| App.ImageTypes.Contains(ext))
|
||||||
|
|
||||||
items.Add(buf.ToString());
|
items.Add(sb.ToString());
|
||||||
|
|
||||||
if (items.Count > 100)
|
if (items.Count > 100)
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -800,6 +800,29 @@ namespace mpvnet
|
|||||||
HandleError(err, throwException, $"error setting property: {name} = " + value);
|
HandleError(err, throwException, $"error setting property: {name} = " + value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public string get_opt(string name, string defaultValue = "")
|
||||||
|
{
|
||||||
|
string value = get_property_string("script-opts");
|
||||||
|
|
||||||
|
if (string.IsNullOrEmpty(value))
|
||||||
|
return defaultValue;
|
||||||
|
|
||||||
|
string[] values = value.Split(',');
|
||||||
|
|
||||||
|
foreach (string item in values)
|
||||||
|
{
|
||||||
|
if (item.Contains("="))
|
||||||
|
{
|
||||||
|
string optionName = item.Substring(0, item.IndexOf("="));
|
||||||
|
|
||||||
|
if (optionName == name)
|
||||||
|
return item.Substring(item.IndexOf("=") + 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return defaultValue;
|
||||||
|
}
|
||||||
|
|
||||||
public void observe_property_int(string name, Action<int> action)
|
public void observe_property_int(string name, Action<int> action)
|
||||||
{
|
{
|
||||||
lock (IntPropChangeActions)
|
lock (IntPropChangeActions)
|
||||||
|
|||||||
Reference in New Issue
Block a user