#NEWLINE# def _change_state( self , new_state ) : #NEWLINE# #INDENT# if ( not self . _uri ) : #NEWLINE# #INDENT# return False #NEWLINE# #UNINDENT# if ( ( new_state == audio . PlaybackState . STOPPED ) and self . _uri ) : #NEWLINE# #INDENT# self . _stream_changed = True #NEWLINE# self . _uri = None #NEWLINE# #UNINDENT# if ( self . _uri is not None ) : #NEWLINE# #INDENT# audio . AudioListener . send ( 'position_changed' , position = 0 ) #NEWLINE# #UNINDENT# if self . _stream_changed : #NEWLINE# #INDENT# self . _stream_changed = False #NEWLINE# audio . AudioListener . send ( 'stream_changed' , uri = self . _uri ) #NEWLINE# #UNINDENT# ( old_state , self . state ) = ( self . state , self ) #NEWLINE# audio . AudioListener . send ( 'state_changed' , old_state = old_state , new_state = new_state , target_state = None ) #NEWLINE# if ( new_state == audio . PlaybackState . PLAYING ) : #NEWLINE# #INDENT# self . _tags [ 'audio-codec' ] = [ 'fake info...' ] #NEWLINE# audio . AudioListener . send ( 'tags_changed' , tags = [ 'audio-codec' ] ) #NEWLINE# #UNINDENT# return ( self . _uri not in self . _bad_uris )