@@ -33,6 +33,7 @@ public class GuiCommand
33
33
{
34
34
[ "add-to-path" ] = args => AddToPath ( ) ,
35
35
[ "edit-conf-file" ] = EditCongFile ,
36
+ [ "install-command-palette" ] = args => InstallCommandPalette ( ) ,
36
37
[ "load-audio" ] = LoadAudio ,
37
38
[ "load-sub" ] = LoadSubtitle ,
38
39
[ "move-window" ] = args => MoveWindow ? . Invoke ( args [ 0 ] ) ,
@@ -56,9 +57,9 @@ public class GuiCommand
56
57
[ "show-profiles" ] = args => Msg . ShowInfo ( Player . GetProfiles ( ) ) ,
57
58
[ "show-properties" ] = args => Player . Command ( "script-binding select/show-properties" ) ,
58
59
[ "show-protocols" ] = args => ShowProtocols ( ) ,
59
- [ "window-scale" ] = args => WindowScaleNet ? . Invoke ( float . Parse ( args [ 0 ] , CultureInfo . InvariantCulture ) ) ,
60
- [ "install-command-palette" ] = args => InstallCommandPalette ( ) ,
61
60
[ "show-recent-in-command-palette" ] = args => ShowRecentFilesInCommandPalette ( ) ,
61
+ [ "stream-quality" ] = args => StreamQuality ( ) ,
62
+ [ "window-scale" ] = args => WindowScaleNet ? . Invoke ( float . Parse ( args [ 0 ] , CultureInfo . InvariantCulture ) ) ,
62
63
63
64
64
65
// deprecated
@@ -288,6 +289,22 @@ void InstallCommandPalette()
288
289
}
289
290
}
290
291
292
+ void StreamQuality ( )
293
+ {
294
+ int version = Player . GetPropertyInt ( "user-data/command-palette/version" ) ;
295
+
296
+ if ( version >= 1 )
297
+ Player . Command ( "script-message-to command_palette show-command-palette \" Stream Quality\" " ) ;
298
+ else
299
+ {
300
+ var r = Msg . ShowQuestion ( "The Stream Quality feature requires the command palette to be installed." + BR2 +
301
+ "Would you like to install the command palette now?" ) ;
302
+
303
+ if ( r == MessageBoxResult . OK )
304
+ Player . Command ( "script-message-to mpvnet install-command-palette" ) ;
305
+ }
306
+ }
307
+
291
308
void ShowRecentFilesInCommandPalette ( )
292
309
{
293
310
Obj o = new ( ) ;
0 commit comments