@@ -33,6 +33,7 @@ public class GuiCommand
3333 {
3434 [ "add-to-path" ] = args => AddToPath ( ) ,
3535 [ "edit-conf-file" ] = EditCongFile ,
36+ [ "install-command-palette" ] = args => InstallCommandPalette ( ) ,
3637 [ "load-audio" ] = LoadAudio ,
3738 [ "load-sub" ] = LoadSubtitle ,
3839 [ "move-window" ] = args => MoveWindow ? . Invoke ( args [ 0 ] ) ,
@@ -56,9 +57,9 @@ public class GuiCommand
5657 [ "show-profiles" ] = args => Msg . ShowInfo ( Player . GetProfiles ( ) ) ,
5758 [ "show-properties" ] = args => Player . Command ( "script-binding select/show-properties" ) ,
5859 [ "show-protocols" ] = args => ShowProtocols ( ) ,
59- [ "window-scale" ] = args => WindowScaleNet ? . Invoke ( float . Parse ( args [ 0 ] , CultureInfo . InvariantCulture ) ) ,
60- [ "install-command-palette" ] = args => InstallCommandPalette ( ) ,
6160 [ "show-recent-in-command-palette" ] = args => ShowRecentFilesInCommandPalette ( ) ,
61+ [ "stream-quality" ] = args => StreamQuality ( ) ,
62+ [ "window-scale" ] = args => WindowScaleNet ? . Invoke ( float . Parse ( args [ 0 ] , CultureInfo . InvariantCulture ) ) ,
6263
6364
6465 // deprecated
@@ -288,6 +289,22 @@ void InstallCommandPalette()
288289 }
289290 }
290291
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+
291308 void ShowRecentFilesInCommandPalette ( )
292309 {
293310 Obj o = new ( ) ;
0 commit comments