2 Commits

Author SHA1 Message Date
Aodhan Collins
ee36caccd6 Sort all batch generation queues by JSON filename
All get_missing_* routes and generate_missing routes now order results
by filename (alphabetical) instead of display name or undefined order.
Checkpoint uses checkpoint_path as the equivalent sort key.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-05 23:08:37 +00:00
Aodhan Collins
e226548471 Merge branch 'logging'
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-05 23:02:41 +00:00

20
app.py
View File

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