From 19214dd5654d3e6d794a07c3e1f26d4aaeebbb93 Mon Sep 17 00:00:00 2001 From: Lachezar Lechev Date: Fri, 15 Nov 2024 10:56:34 +0200 Subject: [PATCH 1/3] fix(stremio-core-protobuf)!: player - VideoParams size field must be u64 Signed-off-by: Lachezar Lechev --- stremio-core-protobuf/proto/stremio/core/models/player.proto | 2 +- stremio-core-protobuf/src/model/fields/player.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/stremio-core-protobuf/proto/stremio/core/models/player.proto b/stremio-core-protobuf/proto/stremio/core/models/player.proto index 2a34a54..4416a14 100644 --- a/stremio-core-protobuf/proto/stremio/core/models/player.proto +++ b/stremio-core-protobuf/proto/stremio/core/models/player.proto @@ -25,7 +25,7 @@ message Player { message VideoParams { optional string hash = 1; - optional int64 size = 2; + optional uint64 size = 2; optional string filename = 3; } message StreamState { diff --git a/stremio-core-protobuf/src/model/fields/player.rs b/stremio-core-protobuf/src/model/fields/player.rs index cde83bc..c6c2bb5 100644 --- a/stremio-core-protobuf/src/model/fields/player.rs +++ b/stremio-core-protobuf/src/model/fields/player.rs @@ -54,7 +54,7 @@ impl FromProtobuf for models::player::VideoParams { fn from_protobuf(&self) -> VideoParams { VideoParams { hash: self.hash.to_owned(), - size: self.size.map(|x| x as u64).to_owned(), + size: self.size.to_owned(), filename: self.filename.to_owned(), } } @@ -67,7 +67,7 @@ impl ToProtobuf for VideoParams { ) -> models::player::VideoParams { models::player::VideoParams { hash: self.hash.to_owned(), - size: self.size.map(|x| x as i64).to_owned(), + size: self.size.to_owned(), filename: self.filename.to_owned(), } } From a22e89d4d7b4d4d11181520e62fa6e1a4b0910a5 Mon Sep 17 00:00:00 2001 From: Lachezar Lechev Date: Fri, 15 Nov 2024 10:57:14 +0200 Subject: [PATCH 2/3] chore(stremio-core-kotlin): Bump version due to breaking change Signed-off-by: Lachezar Lechev --- Cargo.lock | 2 +- stremio-core-kotlin/Cargo.toml | 2 +- stremio-core-kotlin/README.md | 2 +- stremio-core-kotlin/build.gradle.kts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f4ceae0..9d967c4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2439,7 +2439,7 @@ dependencies = [ [[package]] name = "stremio-core-kotlin" -version = "1.3.1" +version = "1.4.0" dependencies = [ "Inflector", "auto_impl", diff --git a/stremio-core-kotlin/Cargo.toml b/stremio-core-kotlin/Cargo.toml index 17edeca..f6059bb 100644 --- a/stremio-core-kotlin/Cargo.toml +++ b/stremio-core-kotlin/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "stremio-core-kotlin" -version = "1.3.1" +version = "1.4.0" authors = ["Smart Code OOD"] edition = "2021" diff --git a/stremio-core-kotlin/README.md b/stremio-core-kotlin/README.md index 74cb384..b01316b 100644 --- a/stremio-core-kotlin/README.md +++ b/stremio-core-kotlin/README.md @@ -32,6 +32,6 @@ allprojects { ```gradle dependencies { - implementation 'com.github.Stremio:stremio-core-kotlin:1.3.1' + implementation 'com.github.Stremio:stremio-core-kotlin:1.4.0' } ``` diff --git a/stremio-core-kotlin/build.gradle.kts b/stremio-core-kotlin/build.gradle.kts index 22f13f8..1d51fb0 100644 --- a/stremio-core-kotlin/build.gradle.kts +++ b/stremio-core-kotlin/build.gradle.kts @@ -1,7 +1,7 @@ import com.google.protobuf.gradle.* group = "com.github.Stremio" -version = "1.3.1" +version = "1.4.0" allprojects { repositories { From e4fe3397b0bdd84a950dcedf49b729d79a86443b Mon Sep 17 00:00:00 2001 From: Lachezar Lechev Date: Fri, 15 Nov 2024 10:57:49 +0200 Subject: [PATCH 3/3] chore(stremio-core-protobuf): bridge - ToProtobuf - default tuple argument for generic Signed-off-by: Lachezar Lechev --- stremio-core-protobuf/src/bridge.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stremio-core-protobuf/src/bridge.rs b/stremio-core-protobuf/src/bridge.rs index 7fb611a..6e33eee 100644 --- a/stremio-core-protobuf/src/bridge.rs +++ b/stremio-core-protobuf/src/bridge.rs @@ -29,7 +29,7 @@ mod stream; mod string; mod subtitle; -pub trait ToProtobuf { +pub trait ToProtobuf { fn to_protobuf(&self, args: &A) -> T; }