'Get the backlogged episodes'

def run(self):

    shows = []
    for s in sickrage.srCore.SHOWLIST:
        showEps = []
        for e in sorted([e[u'doc'] for e in sickrage.srCore.mainDB.db.get_many(u'tv_episodes', s.indexerid, with_doc=True) if (s.paused == 0)], key=(lambda x: (x[u'season'], x[u'episode'])), reverse=True):
            curEpCat = s.getOverview(int((e[u'status'] or (-1))))
            if (curEpCat and (curEpCat in (Overview.WANTED, Overview.QUAL))):
                showEps += [e]
        if showEps:
            shows.append({u'indexerid': s.indexerid, u'show_name': s.name, u'status': s.status, u'episodes': showEps})
    return _responds(RESULT_SUCCESS, shows)
