diff --git a/app.py b/app.py index 67bf808..f860573 100644 --- a/app.py +++ b/app.py @@ -2285,7 +2285,7 @@ def _get_default_checkpoint(): @app.route('/get_missing_characters') def get_missing_characters(): - missing = Character.query.filter((Character.image_path == None) | (Character.image_path == '')).all() + missing = Character.query.filter((Character.image_path == None) | (Character.image_path == '')).order_by(Character.filename).all() return {'missing': [{'slug': c.slug, 'name': c.name} for c in missing]} @app.route('/clear_all_covers', methods=['POST']) @@ -2300,7 +2300,7 @@ def clear_all_covers(): def generate_missing(): missing = Character.query.filter( (Character.image_path == None) | (Character.image_path == '') - ).order_by(Character.name).all() + ).order_by(Character.filename).all() if not missing: flash("No characters missing cover images.") @@ -2370,7 +2370,7 @@ def save_defaults(slug): @app.route('/get_missing_outfits') def get_missing_outfits(): - missing = Outfit.query.filter((Outfit.image_path == None) | (Outfit.image_path == '')).all() + missing = Outfit.query.filter((Outfit.image_path == None) | (Outfit.image_path == '')).order_by(Outfit.filename).all() return {'missing': [{'slug': o.slug, 'name': o.name} for o in missing]} @app.route('/clear_all_outfit_covers', methods=['POST']) @@ -2383,7 +2383,7 @@ def clear_all_outfit_covers(): @app.route('/get_missing_actions') def get_missing_actions(): - missing = Action.query.filter((Action.image_path == None) | (Action.image_path == '')).all() + missing = Action.query.filter((Action.image_path == None) | (Action.image_path == '')).order_by(Action.filename).all() return {'missing': [{'slug': a.slug, 'name': a.name} for a in missing]} @app.route('/clear_all_action_covers', methods=['POST']) @@ -2396,7 +2396,7 @@ def clear_all_action_covers(): @app.route('/get_missing_scenes') def get_missing_scenes(): - missing = Scene.query.filter((Scene.image_path == None) | (Scene.image_path == '')).all() + missing = Scene.query.filter((Scene.image_path == None) | (Scene.image_path == '')).order_by(Scene.filename).all() return {'missing': [{'slug': s.slug, 'name': s.name} for s in missing]} @app.route('/clear_all_scene_covers', methods=['POST']) @@ -3758,12 +3758,12 @@ def replace_style_cover_from_preview(slug): @app.route('/get_missing_styles') def get_missing_styles(): - missing = Style.query.filter((Style.image_path == None) | (Style.image_path == '')).all() + missing = Style.query.filter((Style.image_path == None) | (Style.image_path == '')).order_by(Style.filename).all() return {'missing': [{'slug': s.slug, 'name': s.name} for s in missing]} @app.route('/get_missing_detailers') def get_missing_detailers(): - missing = Detailer.query.filter((Detailer.image_path == None) | (Detailer.image_path == '')).all() + missing = Detailer.query.filter((Detailer.image_path == None) | (Detailer.image_path == '')).order_by(Detailer.filename).all() return {'missing': [{'slug': d.slug, 'name': d.name} for d in missing]} @app.route('/clear_all_detailer_covers', methods=['POST']) @@ -3786,7 +3786,7 @@ def clear_all_style_covers(): def generate_missing_styles(): missing = Style.query.filter( (Style.image_path == None) | (Style.image_path == '') - ).order_by(Style.name).all() + ).order_by(Style.filename).all() if not missing: flash("No styles missing cover images.") @@ -5138,7 +5138,7 @@ def save_checkpoint_json(slug): @app.route('/get_missing_checkpoints') def get_missing_checkpoints(): - missing = Checkpoint.query.filter((Checkpoint.image_path == None) | (Checkpoint.image_path == '')).all() + missing = Checkpoint.query.filter((Checkpoint.image_path == None) | (Checkpoint.image_path == '')).order_by(Checkpoint.checkpoint_path).all() return {'missing': [{'slug': c.slug, 'name': c.name} for c in missing]} @app.route('/clear_all_checkpoint_covers', methods=['POST']) @@ -5501,7 +5501,7 @@ def create_look(): @app.route('/get_missing_looks') def get_missing_looks(): - missing = Look.query.filter((Look.image_path == None) | (Look.image_path == '')).all() + missing = Look.query.filter((Look.image_path == None) | (Look.image_path == '')).order_by(Look.filename).all() return {'missing': [{'slug': l.slug, 'name': l.name} for l in missing]} @app.route('/clear_all_look_covers', methods=['POST'])