Open > Open DVD/Blu-ray Drive/Folder
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
###
|
||||
|
||||
- added new feature: Open > Open DVD/Blu-ray Drive/Folder...
|
||||
|
||||
### 5.2.1.3
|
||||
|
||||
- in the config dialog the description for keep-open was corrected
|
||||
|
||||
@@ -149,9 +149,11 @@ The Open Files menu entry is one way to open files in mpv.net, it supports multi
|
||||
|
||||
Another way to open files is the command line, it is used by the Windows File Explorer if file associations exist.
|
||||
|
||||
When mpv.net is started from a terminal such as PowerShell, mpv.net attaches to the terminal and outputs status and debug messages.
|
||||
|
||||
A third way is to drag and drop files on the main window.
|
||||
|
||||
Whenever the control key is pressed when files are opened, the playlist is not cleared but the files are appended to the playlist.
|
||||
Whenever the control key is pressed when files or URLs are opened, the playlist is not cleared but the files or URLs are appended to the playlist. This works in all mpv.net features that open files or URLs.
|
||||
|
||||
### Open > Open URL
|
||||
|
||||
@@ -159,7 +161,9 @@ The Open URL menu entry can be used to open URLs for example from YouTube.
|
||||
|
||||
mpv.net monitors the Windows clipboard and ask if URLs should be played in case it finds a URL in the clipboard. This feature uses a keyword whitelist that can be configured in the config editor.
|
||||
|
||||
Whenever the control key is pressed when URLs are opened, the playlist is not cleared but the URLs are appended to the playlist.
|
||||
When mpv.net is started from a terminal such as PowerShell, mpv.net attaches to the terminal and outputs status and debug messages.
|
||||
|
||||
Whenever the control key is pressed when files or URLs are opened, the playlist is not cleared but the files or URLs are appended to the playlist. This works in all mpv.net features that open files or URLs.
|
||||
|
||||
### Open > Show media search
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ namespace RatingExtension // the assembly name must end with 'Extension'
|
||||
{
|
||||
string filepath = i.Key;
|
||||
int rating = i.Value;
|
||||
if (String.IsNullOrEmpty(filepath) || ! File.Exists(filepath))
|
||||
if (String.IsNullOrEmpty(filepath) || !File.Exists(filepath))
|
||||
return;
|
||||
string basename = Path.GetFileNameWithoutExtension(filepath);
|
||||
|
||||
|
||||
@@ -16,11 +16,13 @@ namespace mpvnet
|
||||
{
|
||||
switch (id)
|
||||
{
|
||||
case "open-files": OpenFiles(args); break;
|
||||
case "open-url": OpenURL(); break;
|
||||
case "open-optical-media": Open_DVD_Or_BD_Folder(); break;
|
||||
case "manage-file-associations": ManageFileAssociations(); break; // deprecated 2019
|
||||
case "cycle-audio": CycleAudio(); break;
|
||||
case "load-audio": LoadAudio(); break;
|
||||
case "load-sub": LoadSubtitle(); break;
|
||||
case "open-url": OpenURL(); break;
|
||||
case "execute-mpv-command": ExecuteMpvCommand(); break;
|
||||
case "show-history": ShowHistory(); break;
|
||||
case "show-media-search": ShowDialog(typeof(EverythingWindow)); break;
|
||||
@@ -30,7 +32,6 @@ namespace mpvnet
|
||||
case "show-input-editor": ShowDialog(typeof(InputWindow)); break;
|
||||
case "show-setup-dialog": ShowDialog(typeof(SetupWindow)); break;
|
||||
case "open-conf-folder": Process.Start(mp.ConfigFolder); break;
|
||||
case "open-files": OpenFiles(args); break;
|
||||
case "shell-execute": Process.Start(args[0]); break;
|
||||
case "show-info": ShowInfo(); break;
|
||||
case "add-files-to-playlist": OpenFiles("append"); break; // deprecated 2019
|
||||
@@ -67,6 +68,31 @@ namespace mpvnet
|
||||
}));
|
||||
}
|
||||
|
||||
public static void Open_DVD_Or_BD_Folder(params string[] args)
|
||||
{
|
||||
InvokeOnMainThread(new Action(() => {
|
||||
using (var d = new FolderBrowserDialog())
|
||||
{
|
||||
d.Description = "Select a DVD or Blu-ray folder.";
|
||||
d.ShowNewFolderButton = false;
|
||||
|
||||
if (d.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
if (Directory.Exists(d.SelectedPath + "\\BDMV"))
|
||||
{
|
||||
mp.set_property_string("bluray-device", d.SelectedPath);
|
||||
mp.Load(new[] { @"bd://" }, false, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
mp.set_property_string("dvd-device", d.SelectedPath);
|
||||
mp.Load(new[] { @"dvd://" }, false, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
||||
public static void ShowHistory()
|
||||
{
|
||||
var fp = mp.ConfigFolder + "history.txt";
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
|
||||
o script-message mpv.net open-files #menu: Open > Open Files...
|
||||
u script-message mpv.net open-url #menu: Open > Open URL or file path from clipboard
|
||||
_ script-message mpv.net open-optical-media #menu: Open > Open DVD/Blu-ray Drive/Folder...
|
||||
_ ignore #menu: Open > -
|
||||
Alt+a script-message mpv.net load-audio #menu: Open > Load external audio files...
|
||||
Alt+s script-message mpv.net load-sub #menu: Open > Load external subtitle files...
|
||||
|
||||
@@ -23,10 +23,10 @@ options = [{ name = "no", help = "always use software decoding" },
|
||||
name = "gpu-api"
|
||||
default = "auto"
|
||||
filter = "Video"
|
||||
help = "Controls which type of graphics APIs will be accepted. Auto uses d3d11, it should only be changed in case of problems."
|
||||
help = "Controls which type of graphics APIs will be accepted. Auto uses d3d11, it should only be changed in case of problems, Vulkan is not recommended."
|
||||
options = [{ name = "auto", help = "Use any available API" },
|
||||
{ name = "opengl", help = "Allow only OpenGL (requires OpenGL 2.1+ or GLES 2.0+)" },
|
||||
{ name = "vulkan", help = "Allow only Vulkan (requires a working spirv-compiler). " },
|
||||
{ name = "vulkan", help = "Allow only Vulkan (not recommended). " },
|
||||
{ name = "d3d11", help = "Allow only gpu-context=d3d11" }]
|
||||
|
||||
[[settings]]
|
||||
|
||||
@@ -368,7 +368,9 @@ namespace mpvnet
|
||||
{
|
||||
string path = mp.get_property_string("path");
|
||||
BeginInvoke(new Action(() => {
|
||||
if (File.Exists(path) || path.Contains("://"))
|
||||
if (path.Contains("://"))
|
||||
Text = path + " - mpv.net " + Application.ProductVersion;
|
||||
else if (File.Exists(path))
|
||||
Text = path.FileName() + " - mpv.net " + Application.ProductVersion;
|
||||
else
|
||||
Text = "mpv.net " + Application.ProductVersion;
|
||||
|
||||
Reference in New Issue
Block a user