From 44053f0715e383d1f66a8a10cbc2878cef5ad81a Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Mon, 17 Feb 2020 17:21:58 +1000 Subject: [PATCH] fix deletion notices being sent unnecessarily --- rslib/src/media/database.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rslib/src/media/database.rs b/rslib/src/media/database.rs index 5d639f902..480bb790b 100644 --- a/rslib/src/media/database.rs +++ b/rslib/src/media/database.rs @@ -213,7 +213,9 @@ delete from media where fname=?" } pub(super) fn all_mtimes(&mut self) -> Result> { - let mut stmt = self.db.prepare("select fname, mtime from media")?; + let mut stmt = self + .db + .prepare("select fname, mtime from media where csum is not null")?; let map: std::result::Result, rusqlite::Error> = stmt .query_map(NO_PARAMS, |row| Ok((row.get(0)?, row.get(1)?)))? .collect();