def onAction( self, action ): if action in [ 5, 6, 7, 9, 10, 92, 117 ] or action.getButtonCode() in [ 275, 257, 261 ]: xbmc.Player().stop() self._close_dialog()