-
This commit is contained in:
@@ -201,6 +201,10 @@ mpv.net bugs and requests: <https://github.com/stax76/mpv.net/issues>
|
||||
|
||||
### Changelog
|
||||
|
||||
### 3.4 (2019-??-??)
|
||||
|
||||
- new feature added to manage file associations, can be found in the menu at: Tools > Manage...
|
||||
|
||||
### 3.3 (2019-05-01)
|
||||
|
||||
- dark mode support was added to the command palette and partly to the input editor
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -29,4 +29,4 @@ Filename: "{app}\{#MyAppExeName}"; Description: "Associate video file extensions
|
||||
Filename: "{app}\{#MyAppExeName}"; Description: "Associate audio file extensions?"; Flags: postinstall unchecked runascurrentuser runhidden nowait; Parameters: "--reg-file-assoc audio"
|
||||
|
||||
[UninstallRun]
|
||||
Filename: "{app}\{#MyAppExeName}"; Flags: runascurrentuser runhidden; Parameters: "--reg-file-assoc unregister"
|
||||
Filename: "{app}\{#MyAppExeName}"; Flags: runascurrentuser runhidden; Parameters: "--reg-file-assoc unreg"
|
||||
Reference in New Issue
Block a user