From 15e9257531915f41532375615020d69cbb66c386 Mon Sep 17 00:00:00 2001 From: Tim Date: Tue, 27 Feb 2024 10:22:15 +0100 Subject: [PATCH 1/3] refactor!(serialize_library): update pagination logic --- src/model/serialize_library.rs | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/src/model/serialize_library.rs b/src/model/serialize_library.rs index 349526e..44e7e88 100644 --- a/src/model/serialize_library.rs +++ b/src/model/serialize_library.rs @@ -49,8 +49,7 @@ mod model { pub struct Selectable<'a> { pub types: Vec>, pub sorts: Vec>, - pub prev_page: Option, - pub next_page: Option, + pub next_page: bool, } #[derive(Serialize)] pub struct LibraryWithFilters<'a> { @@ -91,18 +90,7 @@ pub fn serialize_library( .into_web_deep_links(), }) .collect(), - prev_page: library.selectable.prev_page.as_ref().map(|prev_page| { - model::SelectablePage { - deep_links: LibraryDeepLinks::from((&root, &prev_page.request)) - .into_web_deep_links(), - } - }), - next_page: library.selectable.next_page.as_ref().map(|next_page| { - model::SelectablePage { - deep_links: LibraryDeepLinks::from((&root, &next_page.request)) - .into_web_deep_links(), - } - }), + next_page: library.selectable.next_page.is_some(), }, catalog: library .catalog From ef1e45959bce86568149d5677edcd8ad5457b742 Mon Sep 17 00:00:00 2001 From: Tim Date: Tue, 27 Feb 2024 10:23:46 +0100 Subject: [PATCH 2/3] chore: use stremio-core refactor/library-with-filters-load-next-page branch --- Cargo.lock | 6 +++--- Cargo.toml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 96a718f..15733b7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1003,7 +1003,7 @@ dependencies = [ [[package]] name = "stremio-core" version = "0.1.0" -source = "git+https://github.com/Stremio/stremio-core?branch=development#fde8815ac1fba4fad3ae9b77feba1dac96401211" +source = "git+https://github.com/Stremio/stremio-core?branch=refactor/library-with-filters-load-next-page#8ade441890aeb88f83976c8269274f252d6c7ce6" dependencies = [ "anyhow", "base64 0.21.2", @@ -1080,7 +1080,7 @@ dependencies = [ [[package]] name = "stremio-derive" version = "0.1.0" -source = "git+https://github.com/Stremio/stremio-core?branch=development#fde8815ac1fba4fad3ae9b77feba1dac96401211" +source = "git+https://github.com/Stremio/stremio-core?branch=refactor/library-with-filters-load-next-page#8ade441890aeb88f83976c8269274f252d6c7ce6" dependencies = [ "case", "proc-macro-crate", @@ -1114,7 +1114,7 @@ dependencies = [ [[package]] name = "stremio-watched-bitfield" version = "0.1.0" -source = "git+https://github.com/Stremio/stremio-core?branch=development#fde8815ac1fba4fad3ae9b77feba1dac96401211" +source = "git+https://github.com/Stremio/stremio-core?branch=refactor/library-with-filters-load-next-page#8ade441890aeb88f83976c8269274f252d6c7ce6" dependencies = [ "base64 0.13.1", "flate2", diff --git a/Cargo.toml b/Cargo.toml index 2e9c0c7..84c7a05 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,7 +12,7 @@ lto = true opt-level = 's' [dependencies] -stremio-core = { git = "https://github.com/Stremio/stremio-core", features = ["derive", "analytics"], branch = "development" } +stremio-core = { git = "https://github.com/Stremio/stremio-core", features = ["derive", "analytics"], branch = "refactor/library-with-filters-load-next-page" } serde = { version = "1.0.*", features = ["derive"] } serde_json = "1.0.*" futures = "0.3.*" From 07ccc14758f4ba915f6c3166bc5680a1e593dc04 Mon Sep 17 00:00:00 2001 From: Lachezar Lechev Date: Thu, 29 Feb 2024 09:32:00 +0200 Subject: [PATCH 3/3] chore: revert core to development and update revision Signed-off-by: Lachezar Lechev --- Cargo.lock | 6 +++--- Cargo.toml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 15733b7..31df4c1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1003,7 +1003,7 @@ dependencies = [ [[package]] name = "stremio-core" version = "0.1.0" -source = "git+https://github.com/Stremio/stremio-core?branch=refactor/library-with-filters-load-next-page#8ade441890aeb88f83976c8269274f252d6c7ce6" +source = "git+https://github.com/Stremio/stremio-core?branch=development#895d418552d315807d08f0d668d313f76126c4b9" dependencies = [ "anyhow", "base64 0.21.2", @@ -1080,7 +1080,7 @@ dependencies = [ [[package]] name = "stremio-derive" version = "0.1.0" -source = "git+https://github.com/Stremio/stremio-core?branch=refactor/library-with-filters-load-next-page#8ade441890aeb88f83976c8269274f252d6c7ce6" +source = "git+https://github.com/Stremio/stremio-core?branch=development#895d418552d315807d08f0d668d313f76126c4b9" dependencies = [ "case", "proc-macro-crate", @@ -1114,7 +1114,7 @@ dependencies = [ [[package]] name = "stremio-watched-bitfield" version = "0.1.0" -source = "git+https://github.com/Stremio/stremio-core?branch=refactor/library-with-filters-load-next-page#8ade441890aeb88f83976c8269274f252d6c7ce6" +source = "git+https://github.com/Stremio/stremio-core?branch=development#895d418552d315807d08f0d668d313f76126c4b9" dependencies = [ "base64 0.13.1", "flate2", diff --git a/Cargo.toml b/Cargo.toml index 84c7a05..2e9c0c7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,7 +12,7 @@ lto = true opt-level = 's' [dependencies] -stremio-core = { git = "https://github.com/Stremio/stremio-core", features = ["derive", "analytics"], branch = "refactor/library-with-filters-load-next-page" } +stremio-core = { git = "https://github.com/Stremio/stremio-core", features = ["derive", "analytics"], branch = "development" } serde = { version = "1.0.*", features = ["derive"] } serde_json = "1.0.*" futures = "0.3.*"