Exemple #1
0
def api_notification_count():
    series = (
        Serie.select(Serie, Fansub)
        .join(Fansub)
        .where(
            Serie.onGoing == 1,
            Serie.active == 1))

    #return json.dumps(make_response(series))
    return jsonify(make_response(series))
Exemple #2
0
def checkNewChapters():
    logger.debug('checkNewChapters() running')
    fansubs = Fansub.select()
    for fs in fansubs:
        scr = Scraper(fs)
        series = Serie.select().where(
            Serie.onGoing == 1,
            Serie.active == 1,
            Serie.fansub == fs)
        for s in series:
            try:
                logger.debug('Scraping %s - %s' % (fs, s))
                scr.next(s)
            except ConnectionError as err:
                logger.error('%s/%s Connection Error: \n%s' % (fs, s, err))
            except ReadTimeout as err:
                logger.error('%s/%s Read Timeout: \n%s' % (fs, s, err))
Exemple #3
0
def listAll():
    return _list(
        Serie.select().where(
            Serie.active == 1).order_by(Serie.id.desc()))