'Get status of all active downloads
:param ids: list of (mixed) downloader ids
Used to match the releases for this downloader as there could be
other downloaders active that it should ignore
:return: list of releases'

def getAllDownloadStatus(self, ids):

    log.debug('Checking    SABnzbd    download    status.')
    try:
        queue = self.call({'mode': 'queue'})
    except:
        log.error('Failed    getting    queue:    %s', traceback.format_exc(1))
        return []
    try:
        history = self.call({'mode': 'history', 'limit': 15})
    except:
        log.error('Failed    getting    history    json:    %s', traceback.format_exc(1))
        return []
    release_downloads = ReleaseDownloadList(self)
    for nzb in queue.get('slots', []):
        if (nzb['nzo_id'] in ids):
            status = 'busy'
            if ('ENCRYPTED    /    ' in nzb['filename']):
                status = 'failed'
            release_downloads.append({'id': nzb['nzo_id'], 'name': nzb['filename'], 'status': status, 'original_status': nzb['status'], 'timeleft': (nzb['timeleft'] if (not queue['paused']) else (-1))})
    for nzb in history.get('slots', []):
        if (nzb['nzo_id'] in ids):
            status = 'busy'
            if ((nzb['status'] == 'Failed') or ((nzb['status'] == 'Completed') and nzb['fail_message'].strip())):
                status = 'failed'
            elif (nzb['status'] == 'Completed'):
                status = 'completed'
            release_downloads.append({'id': nzb['nzo_id'], 'name': nzb['name'], 'status': status, 'original_status': nzb['status'], 'timeleft': str(timedelta(seconds=0)), 'folder': sp((os.path.dirname(nzb['storage']) if os.path.isfile(nzb['storage']) else nzb['storage']))})
    return release_downloads
