diff --git a/arknights_mower/utils/log.py b/arknights_mower/utils/log.py index b31eda70..9e96045a 100644 --- a/arknights_mower/utils/log.py +++ b/arknights_mower/utils/log.py @@ -85,6 +85,8 @@ def screenshot_cleanup(): start_time_ns = time.time_ns() - config.conf.screenshot * 3600 * 10**9 for i in screenshot_folder.iterdir(): if i.is_dir(): + if i.name == "run_order": + continue shutil.rmtree(i) elif not i.stem.isnumeric(): i.unlink() @@ -108,7 +110,11 @@ def screenshot_worker(): Thread(target=screenshot_worker, daemon=True).start() -def save_screenshot(img: bytes) -> None: +def save_screenshot(img: bytes, sub_folder=None) -> None: filename = f"{time.time_ns()}.jpg" logger.debug(filename) + if sub_folder: + sub_folder_path = Path(screenshot_folder) / sub_folder + sub_folder_path.mkdir(parents=True, exist_ok=True) + filename = f"{sub_folder}/{filename}" screenshot_queue.put((img, filename)) diff --git a/ui/src/components/PlanEditor.vue b/ui/src/components/PlanEditor.vue index b16c5d78..8eddba63 100644 --- a/ui/src/components/PlanEditor.vue +++ b/ui/src/components/PlanEditor.vue @@ -193,7 +193,7 @@ function drop_facility(target, event) { const allPlans = ['main', ...backup_plans.value] allPlans.forEach((item, index) => { - if ((sub_plan.value === 'main' && item === 'main') || sub_plan.value === index) { + if ((sub_plan.value === 'main' && item === 'main') || sub_plan.value + 1 === index) { return } // 执行更新操作