Update engine.py

This commit is contained in:
2026-01-18 21:21:00 +01:00
parent 7db73f8855
commit 34e7b46172

View File

@@ -285,4 +285,13 @@ class SorterEngine:
if action['type'] in ['unused', 'cat_move', 'move']:
if os.path.exists(action['t_dst']): shutil.move(action['t_dst'], action['t_src'])
if 'c_dst' in action and os.path.exists(action['c_dst']):
shutil.move(action['c_dst'], action['c_src'])
shutil.move(action['c_dst'], action['c_src'])
@staticmethod
def clear_staged_item(original_path):
"""Removes a specific image from the staging area."""
conn = sqlite3.connect(SorterEngine.DB_PATH)
cursor = conn.cursor()
cursor.execute("DELETE FROM staging_area WHERE original_path = ?", (original_path,))
conn.commit()
conn.close()