support avisynth portable
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
============
|
============
|
||||||
|
|
||||||
- log error fix
|
- log error fix
|
||||||
|
- workaround to support AviSynth portable (ffmpeg blocks loading AviSynth from path env var)
|
||||||
|
|
||||||
|
|
||||||
5.4.6.0
|
5.4.6.0
|
||||||
|
|||||||
@@ -386,4 +386,4 @@ namespace mpvnet
|
|||||||
KeyChar = e.Text;
|
KeyChar = e.Text;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -974,6 +974,7 @@ namespace mpvnet
|
|||||||
for (int i = 0; i < files.Length; i++)
|
for (int i = 0; i < files.Length; i++)
|
||||||
{
|
{
|
||||||
string file = files[i];
|
string file = files[i];
|
||||||
|
LoadLibrary(file.ShortExt());
|
||||||
|
|
||||||
if (App.SubtitleTypes.Contains(file.ShortExt()))
|
if (App.SubtitleTypes.Contains(file.ShortExt()))
|
||||||
commandv("sub-add", file);
|
commandv("sub-add", file);
|
||||||
@@ -1020,6 +1021,17 @@ namespace mpvnet
|
|||||||
commandv("playlist-move", "0", (index + 1).ToString());
|
commandv("playlist-move", "0", (index + 1).ToString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool wasAviSynthLoaded;
|
||||||
|
|
||||||
|
void LoadLibrary(string ext)
|
||||||
|
{
|
||||||
|
if (!wasAviSynthLoaded && ext == "avs")
|
||||||
|
{
|
||||||
|
WinAPI.LoadLibrary("AviSynth.dll");
|
||||||
|
wasAviSynthLoaded = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
string LastHistoryPath;
|
string LastHistoryPath;
|
||||||
DateTime LastHistoryStartDateTime;
|
DateTime LastHistoryStartDateTime;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user