Update engine.py
This commit is contained in:
11
engine.py
11
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'])
|
||||
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()
|
||||
Reference in New Issue
Block a user