Skip to content
This repository has been archived by the owner on Dec 24, 2024. It is now read-only.

Commit

Permalink
Merge branch 'development' into fix/bubble-up-serde-errors
Browse files Browse the repository at this point in the history
  • Loading branch information
elpiel committed Feb 29, 2024
2 parents 545bfed + ee2dafc commit 5b94f8c
Show file tree
Hide file tree
Showing 8 changed files with 120 additions and 53 deletions.
117 changes: 97 additions & 20 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "stremio-core-web"
version = "0.46.1"
version = "0.46.3"
authors = ["Smart Code OOD"]
edition = "2021"

Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@stremio/stremio-core-web",
"version": "0.46.1",
"version": "0.46.3",
"description": "Bridge between stremio-core and stremio-web",
"author": "Smart Code OOD",
"main": "stremio_core_web.js",
Expand Down
6 changes: 2 additions & 4 deletions src/model/model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,16 +140,14 @@ impl WebModel {
}
WebModelField::Library => serialize_library(
&self.library,
&self.ctx.streams,
&self.ctx,
self.streaming_server.base_url.as_ref(),
&self.ctx.profile.settings,
"library".to_owned(),
),
WebModelField::ContinueWatching => serialize_library(
&self.continue_watching,
&self.ctx.streams,
&self.ctx,
self.streaming_server.base_url.as_ref(),
&self.ctx.profile.settings,
"continuewatching".to_owned(),
),
WebModelField::Search => serialize_catalogs_with_extra(&self.search, &self.ctx),
Expand Down
6 changes: 1 addition & 5 deletions src/model/serialize_continue_watching_preview.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,11 +169,7 @@ mod model {
// else use the provided shape
_ => &library_item.poster_shape,
},
progress: if library_item.state.time_offset > 0 && library_item.state.duration > 0 {
library_item.state.time_offset as f64 / library_item.state.duration as f64
} else {
0.0
},
progress: library_item.progress(),
deep_links: LibraryItemDeepLinks::from((
library_item,
streams_item,
Expand Down
Loading

0 comments on commit 5b94f8c

Please sign in to comment.