diff --git a/Cargo.lock b/Cargo.lock index 742ac1d..2c84f75 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -137,7 +137,7 @@ dependencies = [ "js-sys", "num-traits", "serde", - "time", + "time 0.1.45", "wasm-bindgen", "winapi", ] @@ -194,9 +194,9 @@ dependencies = [ [[package]] name = "darling" -version = "0.13.4" +version = "0.20.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a01d95850c592940db9b8194bc39f4bc0e89dee5c4265e4b1807c34a9aba453c" +checksum = "fc5d6b04b3fd0ba9926f945895de7d806260a2d7431ba82e7edaecb043c4c6b8" dependencies = [ "darling_core", "darling_macro", @@ -204,27 +204,37 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.13.4" +version = "0.20.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "859d65a907b6852c9361e3185c862aae7fafd2887876799fa55f5f99dc40d610" +checksum = "04e48a959bcd5c761246f5d090ebc2fbf7b9cd527a492b07a67510c108f1e7e3" dependencies = [ "fnv", "ident_case", "proc-macro2", "quote", "strsim", - "syn 1.0.109", + "syn 2.0.48", ] [[package]] name = "darling_macro" -version = "0.13.4" +version = "0.20.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c972679f83bdf9c42bd905396b6c3588a843a17f0f16dfcfa3e2c5d57441835" +checksum = "1d1545d67a2149e1d93b7e5c7752dce5a7426eb5d1357ddcfd89336b94444f77" dependencies = [ "darling_core", "quote", - "syn 1.0.109", + "syn 2.0.48", +] + +[[package]] +name = "deranged" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" +dependencies = [ + "powerfmt", + "serde", ] [[package]] @@ -444,6 +454,12 @@ dependencies = [ "web-sys", ] +[[package]] +name = "hashbrown" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" + [[package]] name = "hashbrown" version = "0.14.0" @@ -512,6 +528,17 @@ dependencies = [ "unicode-normalization", ] +[[package]] +name = "indexmap" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" +dependencies = [ + "autocfg", + "hashbrown 0.12.3", + "serde", +] + [[package]] name = "indexmap" version = "2.0.0" @@ -519,7 +546,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" dependencies = [ "equivalent", - "hashbrown", + "hashbrown 0.14.0", + "serde", ] [[package]] @@ -649,6 +677,12 @@ dependencies = [ "num-traits", ] +[[package]] +name = "num-conv" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" + [[package]] name = "num-integer" version = "0.1.45" @@ -714,6 +748,12 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + [[package]] name = "proc-macro-crate" version = "1.3.1" @@ -884,25 +924,31 @@ dependencies = [ [[package]] name = "serde_with" -version = "1.14.0" +version = "3.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "678b5a069e50bf00ecd22d0cd8ddf7c236f68581b03db652061ed5eb13a312ff" +checksum = "1b0ed1662c5a68664f45b76d18deb0e234aff37207086803165c961eb695e981" dependencies = [ + "base64 0.21.2", "chrono", + "hex", + "indexmap 1.9.3", + "indexmap 2.0.0", "serde", + "serde_json", "serde_with_macros", + "time 0.3.32", ] [[package]] name = "serde_with_macros" -version = "1.5.2" +version = "3.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e182d6ec6f05393cc0e5ed1bf81ad6db3a8feedf8ee515ecdd369809bcce8082" +checksum = "568577ff0ef47b879f736cd66740e022f3672788cdf002a05a4e609ea5a6fb15" dependencies = [ "darling", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.48", ] [[package]] @@ -957,7 +1003,7 @@ dependencies = [ [[package]] name = "stremio-core" version = "0.1.0" -source = "git+https://github.com/Stremio/stremio-core?branch=development#78c11a606341d477ce8eb4bc5d99c42e54f4b2b9" +source = "git+https://github.com/Stremio/stremio-core?branch=development#19ff6d61936debc6cc91581783044599933dbd5c" dependencies = [ "anyhow", "base64 0.21.2", @@ -1034,7 +1080,7 @@ dependencies = [ [[package]] name = "stremio-derive" version = "0.1.0" -source = "git+https://github.com/Stremio/stremio-core?branch=development#78c11a606341d477ce8eb4bc5d99c42e54f4b2b9" +source = "git+https://github.com/Stremio/stremio-core?branch=development#19ff6d61936debc6cc91581783044599933dbd5c" dependencies = [ "case", "proc-macro-crate", @@ -1068,7 +1114,7 @@ dependencies = [ [[package]] name = "stremio-watched-bitfield" version = "0.1.0" -source = "git+https://github.com/Stremio/stremio-core?branch=development#78c11a606341d477ce8eb4bc5d99c42e54f4b2b9" +source = "git+https://github.com/Stremio/stremio-core?branch=development#19ff6d61936debc6cc91581783044599933dbd5c" dependencies = [ "base64 0.13.1", "flate2", @@ -1166,6 +1212,37 @@ dependencies = [ "winapi", ] +[[package]] +name = "time" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe80ced77cbfb4cb91a94bf72b378b4b6791a0d9b7f09d0be747d1bdff4e68bd" +dependencies = [ + "deranged", + "itoa", + "num-conv", + "powerfmt", + "serde", + "time-core", + "time-macros", +] + +[[package]] +name = "time-core" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" + +[[package]] +name = "time-macros" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ba3a3ef41e6672a2f0f001392bb5dcd3ff0a9992d618ca761a11c3121547774" +dependencies = [ + "num-conv", + "time-core", +] + [[package]] name = "tinyvec" version = "1.6.0" @@ -1193,7 +1270,7 @@ version = "0.19.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8123f27e969974a3dfba720fdb560be359f57b44302d280ba72e76a74480e8a" dependencies = [ - "indexmap", + "indexmap 2.0.0", "toml_datetime", "winnow", ] diff --git a/src/model/serialize_player.rs b/src/model/serialize_player.rs index 0e0507d..1bfcd5f 100644 --- a/src/model/serialize_player.rs +++ b/src/model/serialize_player.rs @@ -100,6 +100,8 @@ mod model { pub series_info: Option<&'a stremio_core::types::resource::SeriesInfo>, pub library_item: Option>, pub stream_state: Option<&'a StreamItemState>, + #[serde(skip_serializing_if = "Option::is_none")] + pub into_outro: Option<&'a stremio_core::types::player::IntroOutro>, pub title: Option, pub addon: Option>, } @@ -243,6 +245,7 @@ pub fn serialize_player(player: &Player, ctx: &Ctx, streaming_server: &Streaming }, }), stream_state: player.stream_state.as_ref(), + into_outro: player.intro_outro.as_ref(), title: player.selected.as_ref().and_then(|selected| { player .meta_item