-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: use LibraryItemDeepLinks for LibraryItem
- Loading branch information
Showing
10 changed files
with
63 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
use stremio_core::deep_links::{LibraryItemDeepLinks, ExternalPlayerLink}; | ||
use crate::bridge::ToProtobuf; | ||
use crate::protobuf::stremio::core::types; | ||
|
||
impl ToProtobuf<types::LibraryItemDeepLinks, ()> for LibraryItemDeepLinks { | ||
fn to_protobuf(&self, _args: &()) -> types::LibraryItemDeepLinks { | ||
types::LibraryItemDeepLinks { | ||
meta_details_videos: self.meta_details_videos.to_owned(), | ||
meta_details_streams: self.meta_details_streams.to_owned(), | ||
player: self.player.to_owned(), | ||
external_player: self.external_player.to_protobuf(&()), | ||
} | ||
} | ||
} | ||
|
||
impl ToProtobuf<types::ExternalPlayerLink, ()> for ExternalPlayerLink { | ||
fn to_protobuf(&self, _args: &()) -> types::ExternalPlayerLink { | ||
types::ExternalPlayerLink { | ||
download: self.download.to_owned(), | ||
streaming: self.streaming.to_owned(), | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
syntax = "proto2"; | ||
|
||
package stremio.core.types; | ||
|
||
option java_package = "com.stremio.core.types.resource"; | ||
|
||
message MetaItemDeepLinks { | ||
optional string meta_details_videos = 1; | ||
optional string meta_details_streams = 2; | ||
optional string player = 3; | ||
} | ||
|
||
message LibraryItemDeepLinks { | ||
optional string meta_details_videos = 1; | ||
optional string meta_details_streams = 2; | ||
optional string player = 3; | ||
optional ExternalPlayerLink external_player = 4; | ||
} | ||
|
||
message StreamDeepLinks { | ||
required string player = 1; | ||
required ExternalPlayerLink external_player = 2; | ||
} | ||
|
||
message ExternalPlayerLink { | ||
optional string download = 1; | ||
optional string streaming = 2; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters