remove duplicate method
This commit is contained in:
parent
32a3b5a020
commit
4c8ceeb809
@ -207,12 +207,6 @@ delete from media where fname=?"
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
pub(super) fn clear(&mut self) -> Result<()> {
|
|
||||||
self.db
|
|
||||||
.execute_batch("delete from media; update meta set lastUsn = 0, dirMod = 0")
|
|
||||||
.map_err(Into::into)
|
|
||||||
}
|
|
||||||
|
|
||||||
pub(super) fn count(&mut self) -> Result<u32> {
|
pub(super) fn count(&mut self) -> Result<u32> {
|
||||||
self.db
|
self.db
|
||||||
.query_row(
|
.query_row(
|
||||||
@ -247,7 +241,7 @@ delete from media where fname=?"
|
|||||||
|
|
||||||
pub(super) fn force_resync(&mut self) -> Result<()> {
|
pub(super) fn force_resync(&mut self) -> Result<()> {
|
||||||
self.db
|
self.db
|
||||||
.execute_batch("delete from media; update meta set lastUsn=0, dirMod=0")
|
.execute_batch("delete from media; update meta set lastUsn = 0, dirMod = 0")
|
||||||
.map_err(Into::into)
|
.map_err(Into::into)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -94,11 +94,6 @@ impl MediaManager {
|
|||||||
Ok(chosen_fname)
|
Ok(chosen_fname)
|
||||||
}
|
}
|
||||||
|
|
||||||
// forceResync
|
|
||||||
pub fn clear(&mut self) -> Result<()> {
|
|
||||||
self.dbctx().transact(|ctx| ctx.clear())
|
|
||||||
}
|
|
||||||
|
|
||||||
fn dbctx(&self) -> MediaDatabaseContext {
|
fn dbctx(&self) -> MediaDatabaseContext {
|
||||||
MediaDatabaseContext::new(&self.db)
|
MediaDatabaseContext::new(&self.db)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user