-
This commit is contained in:
@@ -190,6 +190,10 @@ mpv.net bugs and requests: <https://github.com/stax76/mpv.net/issues>
|
|||||||
|
|
||||||
### Changelog
|
### Changelog
|
||||||
|
|
||||||
|
### 3.6 (2019-??-??)
|
||||||
|
|
||||||
|
- playing files from rar archives caused an exception
|
||||||
|
|
||||||
### 3.5 (2019-05-09)
|
### 3.5 (2019-05-09)
|
||||||
|
|
||||||
- when the main windows gets activated and the clipboard content starts with http
|
- when the main windows gets activated and the clipboard content starts with http
|
||||||
|
|||||||
@@ -341,7 +341,12 @@ namespace mpvnet
|
|||||||
private void Mp_FileLoaded()
|
private void Mp_FileLoaded()
|
||||||
{
|
{
|
||||||
string path = mp.get_property_string("path");
|
string path = mp.get_property_string("path");
|
||||||
BeginInvoke(new Action(() => { Text = Path.GetFileName(path) + " - mpv.net " + Application.ProductVersion; }));
|
BeginInvoke(new Action(() => {
|
||||||
|
if (File.Exists(path) || path.StartsWith("http"))
|
||||||
|
Text = Path.GetFileName(path) + " - mpv.net " + Application.ProductVersion;
|
||||||
|
else
|
||||||
|
Text = "mpv.net " + Application.ProductVersion;
|
||||||
|
}));
|
||||||
if (RecentFiles.Contains(path)) RecentFiles.Remove(path);
|
if (RecentFiles.Contains(path)) RecentFiles.Remove(path);
|
||||||
RecentFiles.Insert(0, path);
|
RecentFiles.Insert(0, path);
|
||||||
if (RecentFiles.Count > 15) RecentFiles.RemoveAt(15);
|
if (RecentFiles.Count > 15) RecentFiles.RemoveAt(15);
|
||||||
|
|||||||
@@ -565,17 +565,15 @@ namespace mpvnet
|
|||||||
if (get_property_int("playlist-count") == 1)
|
if (get_property_int("playlist-count") == 1)
|
||||||
{
|
{
|
||||||
string path = get_property_string("path");
|
string path = get_property_string("path");
|
||||||
if (!Directory.Exists(Path.GetDirectoryName(path))) return;
|
if (!File.Exists(path)) return;
|
||||||
List<string> files = Directory.GetFiles(Path.GetDirectoryName(path)).ToList();
|
List<string> files = Directory.GetFiles(Path.GetDirectoryName(path)).ToList();
|
||||||
files = files.Where((file) => App.VideoTypes.Contains(Path.GetExtension(file).TrimStart('.').ToLower()) ||
|
files = files.Where((file) => App.VideoTypes.Contains(Path.GetExtension(file).TrimStart('.').ToLower()) ||
|
||||||
App.AudioTypes.Contains(Path.GetExtension(file).TrimStart('.').ToLower())).ToList();
|
App.AudioTypes.Contains(Path.GetExtension(file).TrimStart('.').ToLower())).ToList();
|
||||||
files.Sort(new StringLogicalComparer());
|
files.Sort(new StringLogicalComparer());
|
||||||
int index = files.IndexOf(path);
|
int index = files.IndexOf(path);
|
||||||
files.Remove(path);
|
files.Remove(path);
|
||||||
|
|
||||||
foreach (string i in files)
|
foreach (string i in files)
|
||||||
commandv("loadfile", i, "append");
|
commandv("loadfile", i, "append");
|
||||||
|
|
||||||
if (index > 0)
|
if (index > 0)
|
||||||
commandv("playlist-move", "0", (index + 1).ToString());
|
commandv("playlist-move", "0", (index + 1).ToString());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user