diff --git a/main.py b/main.py index ca3b79f..63f4af5 100644 --- a/main.py +++ b/main.py @@ -45,7 +45,7 @@ def index(): @app.route('/download', methods=['GET']) def download(): updated = [] - + notupdated = [] result = db.session.query(manga, url_metadata).filter_by(active=1).join(url_metadata, manga.url_flag==url_metadata.flag).all() for each in result: @@ -66,11 +66,12 @@ def download(): stdout = exec_command.communicate()[0] # print(stdout) book['command'] = exec_command.args - + if stdout in 'No new chapters found': + notupdated.append(book['title'] + 'not updated') updated.append(book) missing = check(passin=1) - return jsonify(manga=updated, missingFlags=missing[0], missingManga=missing[1], test=stdout) + return jsonify(manga=updated, missingFlags=missing[0], missingManga=missing[1], notupdated=notupdated) @app.route('/upload', methods=['GET']) def upload_jason():