def get_active_history(queue=None, items=None):
 if (items is None):
  items = []
 if (queue is None):
  queue = PostProcessor.do.get_queue()
 for nzo in queue:
  history = build_history_info(nzo)
  item = {}
  (item['completed'], item['name'], item['nzb_name'], item['category'], item['pp'], item['script'], item['report'], item['url'], item['status'], item['nzo_id'], item['storage'], item['path'], item['script_log'], item['script_line'], item['download_time'], item['postproc_time'], item['stage_log'], item['downloaded'], item['completeness'], item['fail_message'], item['url_info'], item['bytes'], dummy, dummy) = history
  item['action_line'] = nzo.action_line
  item = unpack_history_info(item)
  item['loaded'] = nzo.pp_active
  if item['bytes']:
   item['size'] = format_bytes(item['bytes'])
  else:
   item['size'] = ''
  for kw in item:
   if isinstance(item[kw], str):
    item[kw] = item[kw].decode('utf-8')
  items.append(item)
 return items

def get_active_history ( queue = None , items = None ) : if ( items is None ) : items = [ ] if ( queue is None ) : queue = PostProcessor . do . get_queue ( ) for nzo in queue : history = build_history_info ( nzo ) item = { } ( item [ 'completed' ] , item [ 'name' ] , item [ 'nzb_name' ] , item [ 'category' ] , item [ 'pp' ] , item [ 'script' ] , item [ 'report' ] , item [ 'url' ] , item [ 'status' ] , item [ 'nzo_id' ] , item [ 'storage' ] , item [ 'path' ] , item [ 'script_log' ] , item [ 'script_line' ] , item [ 'download_time' ] , item [ 'postproc_time' ] , item [ 'stage_log' ] , item [ 'downloaded' ] , item [ 'completeness' ] , item [ 'fail_message' ] , item [ 'url_info' ] , item [ 'bytes' ] , dummy , dummy ) = history item [ 'action_line' ] = nzo . action_line item = unpack_history_info ( item ) item [ 'loaded' ] = nzo . pp_active if item [ 'bytes' ] : item [ 'size' ] = format_bytes ( item [ 'bytes' ] ) else : item [ 'size' ] = '' for kw in item : if isinstance ( item [ kw ] , str ) : item [ kw ] = item [ kw ] . decode ( 'utf-8' ) items . append ( item ) return items
get the currently in progress and active history queue .