aboutsummaryrefslogtreecommitdiff
path: root/import
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2026-02-26 03:02:24 +0100
committermetamuffin <metamuffin@disroot.org>2026-02-26 03:02:24 +0100
commiteb6648770e7de66ccafe44d114ecbb2c1eaf444d (patch)
tree2bce9f579b3ea7313f84df94b27fad813c66e9e1 /import
parent7f7deec27e69ed110c52caddaa3a0c04430e71d9 (diff)
downloadjellything-eb6648770e7de66ccafe44d114ecbb2c1eaf444d.tar
jellything-eb6648770e7de66ccafe44d114ecbb2c1eaf444d.tar.bz2
jellything-eb6648770e7de66ccafe44d114ecbb2c1eaf444d.tar.zst
implement application-side continuation tokens
Diffstat (limited to 'import')
-rw-r--r--import/src/helpers.rs4
-rw-r--r--import/src/lib.rs8
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 [(