diff --git a/stremio-core-protobuf/src/model/fields/addon_detail.rs b/stremio-core-protobuf/src/model/fields/addon_detail.rs index ca2012f..2298c17 100644 --- a/stremio-core-protobuf/src/model/fields/addon_detail.rs +++ b/stremio-core-protobuf/src/model/fields/addon_detail.rs @@ -5,12 +5,18 @@ use stremio_core::models::ctx::Ctx; impl FromProtobuf for models::addon_details::Selected { fn from_protobuf(&self) -> Selected { + let mut url = self.transport_url.from_protobuf(); + if url.scheme() == "stremio" { + let replaced_url = url.as_str().replacen("stremio://", "https://", 1); + url = replaced_url.parse().expect("Should be able to parse URL"); + Selected { transport_url: self.transport_url.from_protobuf(), } } } + impl ToProtobuf for Selected { fn to_protobuf( &self,