-
This commit is contained in:
@@ -239,5 +239,25 @@ namespace mpvnet
|
||||
mp.commandv("show-text", audTracks[aid - 1].Text.Substring(3), "5000");
|
||||
}
|
||||
}
|
||||
|
||||
public static void manage_file_associations(string[] args)
|
||||
{
|
||||
using (var td = new TaskDialog<string>())
|
||||
{
|
||||
td.MainInstruction = "Choose an option.";
|
||||
|
||||
td.AddCommandLink("Register video file extensions", "video");
|
||||
td.AddCommandLink("Register audio file extensions", "audio");
|
||||
td.AddCommandLink("Unregister file extensions", "unreg");
|
||||
|
||||
using (var p = new Process())
|
||||
{
|
||||
p.StartInfo.FileName = Application.ExecutablePath;
|
||||
p.StartInfo.Arguments = "--reg-file-assoc " + td.Show();
|
||||
p.StartInfo.Verb = "runas";
|
||||
p.Start();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -18,7 +18,7 @@ namespace mpvnet
|
||||
{
|
||||
if (args[2] == "audio") FileAssociation.Register(FileAssociation.AudioTypes);
|
||||
if (args[2] == "video") FileAssociation.Register(FileAssociation.VideoTypes);
|
||||
if (args[2] == "unregister") FileAssociation.Unregister();
|
||||
if (args[2] == "unreg") FileAssociation.Unregister();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -146,6 +146,7 @@
|
||||
L cycle-values loop-file "inf" "no" #menu: Tools > Toggle infinite file looping
|
||||
Ctrl+h cycle-values hwdec "auto" "no" #menu: Tools > Cycle Hardware Decoding
|
||||
_ script-message mpv.net execute-mpv-command #menu: Tools > Execute mpv command...
|
||||
_ script-message mpv.net manage-file-associations #menu: Tools > Manage File Associations...
|
||||
|
||||
_ script-message mpv.net shell-execute https://mpv.io/manual/stable/ #menu: Help > Show mpv manual
|
||||
_ script-message mpv.net shell-execute https://github.com/mpv-player/mpv/blob/master/etc/input.conf #menu: Help > Show mpv default keys
|
||||
|
||||
Reference in New Issue
Block a user