def handle_empty_queue():
 if (sabnzbd.nzbqueue.NzbQueue.do.actives() == 0):
  sabnzbd.save_state()
  logging.info('Queue has finished, launching: %s (%s)', sabnzbd.QUEUECOMPLETEACTION, sabnzbd.QUEUECOMPLETEARG)
  if sabnzbd.QUEUECOMPLETEARG:
   sabnzbd.QUEUECOMPLETEACTION(sabnzbd.QUEUECOMPLETEARG)
  else:
   Thread(target=sabnzbd.QUEUECOMPLETEACTION).start()
  sabnzbd.change_queue_complete_action(cfg.queue_complete(), new=False)

def handle_empty_queue ( ) : if ( sabnzbd . nzbqueue . NzbQueue . do . actives ( ) == 0 ) : sabnzbd . save_state ( ) logging . info ( 'Queue has finished, launching: %s (%s)' , sabnzbd . QUEUECOMPLETEACTION , sabnzbd . QUEUECOMPLETEARG ) if sabnzbd . QUEUECOMPLETEARG : sabnzbd . QUEUECOMPLETEACTION ( sabnzbd . QUEUECOMPLETEARG ) else : Thread ( target = sabnzbd . QUEUECOMPLETEACTION ) . start ( ) sabnzbd . change_queue_complete_action ( cfg . queue_complete ( ) , new = False )
check if empty queue calls for action .