@protocol.commands.add(u'pause', state=protocol.BOOL)
def pause(context, state=None):
 if (state is None):
  deprecation.warn(u'mpd.protocol.playback.pause:state_arg')
  playback_state = context.core.playback.get_state().get()
  if (playback_state == PlaybackState.PLAYING):
   context.core.playback.pause().get()
  elif (playback_state == PlaybackState.PAUSED):
   context.core.playback.resume().get()
 elif state:
  context.core.playback.pause().get()
 else:
  context.core.playback.resume().get()

@ protocol . commands . add ( u'pause' , state = protocol . BOOL ) def pause ( context , state = None ) : if ( state is None ) : deprecation . warn ( u'mpd.protocol.playback.pause:state_arg' ) playback_state = context . core . playback . get_state ( ) . get ( ) if ( playback_state == PlaybackState . PLAYING ) : context . core . playback . pause ( ) . get ( ) elif ( playback_state == PlaybackState . PAUSED ) : context . core . playback . resume ( ) . get ( ) elif state : context . core . playback . pause ( ) . get ( ) else : context . core . playback . resume ( ) . get ( )
pause stream display .