diff --git a/engine.py b/engine.py index e209287..ac48afd 100644 --- a/engine.py +++ b/engine.py @@ -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']) \ No newline at end of file + 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() \ No newline at end of file