Skip to content

feat: open player deeplinks for ios/macos/visionos #86

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions stremio-core-protobuf/proto/stremio/core/types/stream.proto
Original file line number Diff line number Diff line change
Expand Up @@ -82,5 +82,12 @@ message StreamDeepLinks {
message ExternalPlayerLink {
optional string download = 1;
optional string streaming = 2;
optional OpenPlayerLink open_player = 3;
}

message OpenPlayerLink {
optional string ios = 1;
optional string macos = 2;
optional string visionos = 3;
}
}
7 changes: 7 additions & 0 deletions stremio-core-protobuf/proto/stremio/core/types/video.proto
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,12 @@ message VideoDeepLinks {
message ExternalPlayerLink {
optional string download = 1;
optional string streaming = 2;
optional OpenPlayerLink open_player = 3;
}

message OpenPlayerLink {
optional string ios = 1;
optional string macos = 2;
optional string visionos = 3;
}
}
9 changes: 9 additions & 0 deletions stremio-core-protobuf/src/bridge/stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,15 @@ impl
external_player: types::stream_deep_links::ExternalPlayerLink {
download: deep_links.external_player.download,
streaming: deep_links.external_player.streaming,
open_player: deep_links
.external_player
.open_player
.as_ref()
.map(|core_op| types::stream_deep_links::OpenPlayerLink {
ios: core_op.ios.clone(),
macos: core_op.macos.clone(),
visionos: core_op.visionos.clone(),
}),
},
},
source: Some(self.source.to_protobuf::<E>(&())),
Expand Down
9 changes: 9 additions & 0 deletions stremio-core-protobuf/src/model/fields/meta_details.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,15 @@ impl ToProtobuf<types::VideoDeepLinks, ()> for VideoDeepLinks {
.external_player
.as_ref()
.and_then(|ep| ep.streaming.clone()),
open_player: self.external_player.as_ref().and_then(|ep| {
ep.open_player
.as_ref()
.map(|core_op| types::video_deep_links::OpenPlayerLink {
ios: core_op.ios.clone(),
macos: core_op.macos.clone(),
visionos: core_op.visionos.clone(),
})
}),
},
}
}
Expand Down