Skip to content

Commit 18893d7

Browse files
committed
Merge branch 'master' into feat/player-seek-action
2 parents 01087e7 + 4045df3 commit 18893d7

File tree

8 files changed

+36
-6
lines changed

8 files changed

+36
-6
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ hex = "0.4"
4646
# Futures
4747
futures = "0.3"
4848

49+
tracing = { version = "0.1" }
50+
tracing-subscriber = { version = "0.3" }
51+
4952
[profile.release]
5053
lto = true
5154
opt-level = 3

stremio-core-kotlin/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "stremio-core-kotlin"
3-
version = "1.4.1"
3+
version = "1.4.2"
44
authors = ["Smart Code OOD"]
55
edition = "2021"
66

stremio-core-kotlin/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,6 @@ allprojects {
3232

3333
```gradle
3434
dependencies {
35-
implementation 'com.github.Stremio:stremio-core-kotlin:1.4.1'
35+
implementation 'com.github.Stremio:stremio-core-kotlin:1.4.2'
3636
}
3737
```

stremio-core-kotlin/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import com.google.protobuf.gradle.*
22

33
group = "com.github.Stremio"
4-
version = "1.4.1"
4+
version = "1.4.2"
55

66
allprojects {
77
repositories {

stremio-core-protobuf/proto/stremio/core/types/profile.proto

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,18 @@ message User{
6363
required google.protobuf.Timestamp date_registered = 6;
6464
required google.protobuf.Timestamp last_modified = 7;
6565
optional google.protobuf.Timestamp premium_expire = 8;
66+
optional TraktInfo trakt = 9;
6667
}
6768

6869
message GDPRConsent {
6970
required bool tos = 1;
7071
required bool privacy = 2;
7172
required bool marketing = 3;
7273
optional string from = 4;
74+
}
75+
76+
message TraktInfo {
77+
required google.protobuf.Timestamp created_at = 1;
78+
required google.protobuf.Timestamp expires_in = 2;
79+
required string access_token = 3;
7380
}

stremio-core-protobuf/src/bridge/date.rs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use chrono::{DateTime, TimeZone, Utc};
1+
use chrono::{DateTime, TimeDelta, TimeZone, Utc};
22

33
use crate::bridge::{FromProtobuf, ToProtobuf};
44
use crate::protobuf::google::protobuf::Timestamp;
@@ -17,3 +17,12 @@ impl ToProtobuf<Timestamp, ()> for DateTime<Utc> {
1717
}
1818
}
1919
}
20+
21+
impl ToProtobuf<Timestamp, ()> for TimeDelta {
22+
fn to_protobuf<E: stremio_core::runtime::Env + 'static>(&self, _args: &()) -> Timestamp {
23+
Timestamp {
24+
seconds: self.num_seconds(),
25+
nanos: self.num_nanoseconds().map_or(0, |nanos| nanos as i32),
26+
}
27+
}
28+
}

stremio-core-protobuf/src/bridge/profile.rs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use std::convert::TryFrom;
33

44
use stremio_core::types::api::{LinkAuthKey, LinkCodeResponse};
55
use stremio_core::types::profile::{
6-
Auth, FrameRateMatchingStrategy, GDPRConsent, Profile, Settings, User,
6+
Auth, FrameRateMatchingStrategy, GDPRConsent, Profile, Settings, TraktInfo, User,
77
};
88

99
use crate::bridge::{FromProtobuf, ToProtobuf};
@@ -140,6 +140,16 @@ impl ToProtobuf<types::GdprConsent, ()> for GDPRConsent {
140140
}
141141
}
142142

143+
impl ToProtobuf<types::TraktInfo, ()> for TraktInfo {
144+
fn to_protobuf<E: stremio_core::runtime::Env + 'static>(&self, _args: &()) -> types::TraktInfo {
145+
types::TraktInfo {
146+
created_at: self.created_at.to_protobuf::<E>(&()),
147+
expires_in: self.expires_in.to_protobuf::<E>(&()),
148+
access_token: self.access_token.clone(),
149+
}
150+
}
151+
}
152+
143153
impl ToProtobuf<types::User, ()> for User {
144154
fn to_protobuf<E: stremio_core::runtime::Env + 'static>(&self, _args: &()) -> types::User {
145155
types::User {
@@ -151,6 +161,7 @@ impl ToProtobuf<types::User, ()> for User {
151161
date_registered: self.date_registered.to_protobuf::<E>(&()),
152162
last_modified: self.last_modified.to_protobuf::<E>(&()),
153163
premium_expire: self.premium_expire.to_protobuf::<E>(&()),
164+
trakt: self.trakt.to_protobuf::<E>(&()),
154165
}
155166
}
156167
}

0 commit comments

Comments
 (0)