From be0ff9ac4b215aed5fd559de8e5789476514d256 Mon Sep 17 00:00:00 2001 From: TheBeastLT Date: Mon, 1 Aug 2022 22:59:48 +0200 Subject: [PATCH 1/2] make uid optional in events --- src/main/proto/stremio/core/runtime/event.proto | 8 ++++---- src/main/rust/bridge/event.rs | 10 ++++------ 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/src/main/proto/stremio/core/runtime/event.proto b/src/main/proto/stremio/core/runtime/event.proto index dd7cd98..ab16994 100644 --- a/src/main/proto/stremio/core/runtime/event.proto +++ b/src/main/proto/stremio/core/runtime/event.proto @@ -32,16 +32,16 @@ message Event { } message ProfilePushedToStorage { - required string uid = 1; + optional string uid = 1; } message LibraryItemsPushedToStorage { repeated string ids = 1; } message UserPulledFromAPI { - required string uid = 1; + optional string uid = 1; } message UserPushedToAPI { - required string uid = 1; + optional string uid = 1; } message AddonsPulledFromAPI { repeated string transport_urls = 1; @@ -62,7 +62,7 @@ message Event { required stremio.core.types.AuthRequest auth_request = 1; } message UserLoggedOut { - required string uid = 1; + optional string uid = 1; } message SessionDeleted { required string auth_key = 1; diff --git a/src/main/rust/bridge/event.rs b/src/main/rust/bridge/event.rs index 7faeedc..81633d9 100644 --- a/src/main/rust/bridge/event.rs +++ b/src/main/rust/bridge/event.rs @@ -11,9 +11,7 @@ impl ToProtobuf for Event { fn to_protobuf(&self, _args: &()) -> runtime::Event { let event = match self { Event::ProfilePushedToStorage { uid } => runtime::event::Type::ProfilePushedToStorage( - runtime::event::ProfilePushedToStorage { - uid: uid.clone().unwrap(), - }, + runtime::event::ProfilePushedToStorage { uid: uid.clone() }, ), Event::LibraryItemsPushedToStorage { ids } => { runtime::event::Type::LibraryItemsPushedToStorage( @@ -22,12 +20,12 @@ impl ToProtobuf for Event { } Event::UserPulledFromAPI { uid } => { runtime::event::Type::UserPulledFromApi(runtime::event::UserPulledFromApi { - uid: uid.clone().unwrap(), + uid: uid.clone(), }) } Event::UserPushedToAPI { uid } => { runtime::event::Type::UserPushedToApi(runtime::event::UserPushedToApi { - uid: uid.clone().unwrap(), + uid: uid.clone(), }) } Event::AddonsPulledFromAPI { transport_urls } => { @@ -47,7 +45,7 @@ impl ToProtobuf for Event { } Event::UserLoggedOut { uid } => { runtime::event::Type::UserLoggedOut(runtime::event::UserLoggedOut { - uid: uid.clone().unwrap(), + uid: uid.clone(), }) } Event::SessionDeleted { auth_key } => { From 8c17ac069799a5c3cef6fdeb3137f9c94ff2a482 Mon Sep 17 00:00:00 2001 From: TheBeastLT Date: Mon, 1 Aug 2022 23:01:27 +0200 Subject: [PATCH 2/2] 1.0.11 --- Cargo.lock | 2 +- Cargo.toml | 2 +- README.md | 4 ++-- build.gradle | 4 ++-- jitpack.yml | 2 +- pom.xml | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 53c3ed3..613a441 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1944,7 +1944,7 @@ dependencies = [ [[package]] name = "stremio-core-android" -version = "1.0.10" +version = "1.0.11" dependencies = [ "auto_impl", "base64 0.13.0", diff --git a/Cargo.toml b/Cargo.toml index fc562c7..74cff44 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "stremio-core-android" -version = "1.0.10" +version = "1.0.11" authors = ["Smart Code OOD"] edition = "2018" diff --git a/README.md b/README.md index b9ad50b..8650a1a 100644 --- a/README.md +++ b/README.md @@ -21,11 +21,11 @@ allprojects { ```gradle dependencies { - implementation 'com.github.Stremio:stremio-core-kotlin:1.0.10' + implementation 'com.github.Stremio:stremio-core-kotlin:1.0.11' } ``` ## Manual -[Download](https://jitpack.io/com/github/stremio/stremio-core-kotlin/1.0.10/stremio-core-kotlin-1.0.10.aar) aar and link +[Download](https://jitpack.io/com/github/stremio/stremio-core-kotlin/1.0.11/stremio-core-kotlin-1.0.11.aar) aar and link it manually diff --git a/build.gradle b/build.gradle index 0e3eb2f..a624727 100644 --- a/build.gradle +++ b/build.gradle @@ -39,8 +39,8 @@ android { defaultConfig { minSdkVersion 23 targetSdkVersion 31 - versionCode 11 - versionName "1.0.10" + versionCode 12 + versionName "1.0.11" } kotlinOptions { diff --git a/jitpack.yml b/jitpack.yml index a49cff1..69e86a8 100644 --- a/jitpack.yml +++ b/jitpack.yml @@ -1,4 +1,4 @@ install: - wget https://github.com/Stremio/stremio-core-kotlin/releases/download/$VERSION/stremio-core-kotlin.aar - FILE="-Dfile=stremio-core-kotlin.aar" - - mvn install:install-file $FILE -DgroupId=com.stremio.core -DartifactId=stremio-core-kotlin -Dversion=1.0.10 -Dpackaging=aar -DgeneratePom=true + - mvn install:install-file $FILE -DgroupId=com.stremio.core -DartifactId=stremio-core-kotlin -Dversion=1.0.11 -Dpackaging=aar -DgeneratePom=true diff --git a/pom.xml b/pom.xml index 18b39c2..415bf2f 100644 --- a/pom.xml +++ b/pom.xml @@ -3,5 +3,5 @@ 4.0.0 com.stremio.core stremio-core-kotlin - 1.0.10 + 1.0.11