diff options
Diffstat (limited to 'import')
| -rw-r--r-- | import/src/helpers.rs | 4 | ||||
| -rw-r--r-- | import/src/lib.rs | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/import/src/helpers.rs b/import/src/helpers.rs index 5245a50..e42ea8e 100644 --- a/import/src/helpers.rs +++ b/import/src/helpers.rs @@ -9,12 +9,12 @@ use jellycommon::{ NO_SLUG, jellyobject::{ObjectBuffer, Path}, }; -use jellydb::{Filter, Query, RowNum, Sort, Transaction}; +use jellydb::{Filter, Query, RowNum, Transaction}; pub fn get_or_insert_slug(txn: &mut dyn Transaction, slug: &str) -> Result<RowNum> { match txn.query_single(Query { filter: Filter::Match(Path(vec![NO_SLUG.0]), slug.into()), - sort: Sort::None, + ..Default::default() })? { Some(r) => Ok(r), None => txn.insert(ObjectBuffer::new(&mut [(NO_SLUG.0, &slug)])), diff --git a/import/src/lib.rs b/import/src/lib.rs index 232d9e0..684ef07 100644 --- a/import/src/lib.rs +++ b/import/src/lib.rs @@ -21,7 +21,7 @@ use jellycommon::{ jellyobject::{self, ObjectBuffer, Path as TagPath, Tag}, *, }; -use jellydb::{Database, Filter, Query, RowNum, Sort}; +use jellydb::{Database, Filter, Query, RowNum}; use jellyremuxer::{ demuxers::create_demuxer_autodetect, matroska::{self, AttachedFile, Segment}, @@ -84,7 +84,7 @@ pub struct ImportConfig { fn node_slug_query<'a>(slug: &'a str) -> Query<'a> { Query { filter: Filter::Match(jellyobject::Path(vec![NO_SLUG.0]), slug.into()), - sort: Sort::None, + ..Default::default() } } @@ -455,7 +455,7 @@ fn compare_mtime(dba: &ImportConfig, path: &Path) -> Result<bool> { TagPath(vec![IM_PATH.0]), path.to_string_lossy().to_string().into(), ), - sort: Sort::None, + ..Default::default() })? { None => was_changed = true, Some(row) => { @@ -478,7 +478,7 @@ fn update_mtime(dba: &ImportConfig, path: &Path) -> Result<()> { TagPath(vec![IM_PATH.0]), path.to_string_lossy().to_string().into(), ), - sort: Sort::None, + ..Default::default() })? { Some(row) => row, None => txn.insert(ObjectBuffer::new(&mut [( |