소스 제외(인덱스에서 제거) 기능 추가
- 사이드바 소스 행 hover 시 ✕ 버튼 → 확인 후 인덱스/폴더/태그/썸네일 캐시 제거. 디스크의 실제 파일은 삭제하지 않음. - 로컬: 파일 워처 해제. 원격: 연결 해제 + 자격증명(키체인/볼트) 삭제. - maintenance::remove_source (defer_foreign_keys로 자기참조 FK 처리), 스캔 중 제외 방지, 제외한 소스를 보던 중이면 전체 뷰로 전환. Rust 테스트: 실제 파일 보존 + 인덱스/썸네일 제거 검증 통과. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -80,6 +80,13 @@ impl WatcherManager {
|
||||
manager
|
||||
}
|
||||
|
||||
/// 소스 워치를 해제한다 (소스 제외 시). Debouncer drop으로 감시가 멈춘다.
|
||||
pub fn remove(&self, source_id: i64) {
|
||||
if self.watchers.lock().unwrap().remove(&source_id).is_some() {
|
||||
tracing::info!(source_id, "파일 워처 해제");
|
||||
}
|
||||
}
|
||||
|
||||
/// DB의 로컬 소스 전체를 워치 대상으로 동기화한다 (시작 시 + 소스 추가 후 호출).
|
||||
pub fn refresh(&self, db: &archive_db::Db) {
|
||||
let sources: Vec<(i64, String)> = db
|
||||
|
||||
Reference in New Issue
Block a user