From 85dd8dadeec1db78d189bf95efee0e797888e217 Mon Sep 17 00:00:00 2001 From: Tim Date: Tue, 12 Nov 2024 12:53:44 +0100 Subject: [PATCH 1/5] feat(streams): add subtitles size and offset for StreamItemState --- src/types/streams/streams_item.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/types/streams/streams_item.rs b/src/types/streams/streams_item.rs index 97877e40b..b54526f6d 100644 --- a/src/types/streams/streams_item.rs +++ b/src/types/streams/streams_item.rs @@ -33,6 +33,10 @@ pub struct StreamItemState { #[serde(skip_serializing_if = "Option::is_none")] pub subtitle_delay: Option, #[serde(skip_serializing_if = "Option::is_none")] + pub subtitle_size: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub subtitle_offset: Option, + #[serde(skip_serializing_if = "Option::is_none")] pub audio_track: Option, /// In milliseconds #[serde(skip_serializing_if = "Option::is_none")] From 247ee232eef28626649004ba8a7c72b96ce116b3 Mon Sep 17 00:00:00 2001 From: Tim Date: Thu, 14 Nov 2024 10:45:05 +0100 Subject: [PATCH 2/5] Update src/types/streams/streams_item.rs Co-authored-by: Lachezar Lechev <8925621+elpiel@users.noreply.github.com> --- src/types/streams/streams_item.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/types/streams/streams_item.rs b/src/types/streams/streams_item.rs index b54526f6d..8853987f6 100644 --- a/src/types/streams/streams_item.rs +++ b/src/types/streams/streams_item.rs @@ -32,7 +32,7 @@ pub struct StreamItemState { /// In milliseconds #[serde(skip_serializing_if = "Option::is_none")] pub subtitle_delay: Option, - #[serde(skip_serializing_if = "Option::is_none")] + #[serde(default, skip_serializing_if = "Option::is_none")] pub subtitle_size: Option, #[serde(skip_serializing_if = "Option::is_none")] pub subtitle_offset: Option, From fb55b60f1914379c1d3b3103cc9b4e7004476dd3 Mon Sep 17 00:00:00 2001 From: Tim Date: Thu, 14 Nov 2024 10:45:10 +0100 Subject: [PATCH 3/5] Update src/types/streams/streams_item.rs Co-authored-by: Lachezar Lechev <8925621+elpiel@users.noreply.github.com> --- src/types/streams/streams_item.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/types/streams/streams_item.rs b/src/types/streams/streams_item.rs index 8853987f6..aa5377c19 100644 --- a/src/types/streams/streams_item.rs +++ b/src/types/streams/streams_item.rs @@ -34,7 +34,7 @@ pub struct StreamItemState { pub subtitle_delay: Option, #[serde(default, skip_serializing_if = "Option::is_none")] pub subtitle_size: Option, - #[serde(skip_serializing_if = "Option::is_none")] + #[serde(default, skip_serializing_if = "Option::is_none")] pub subtitle_offset: Option, #[serde(skip_serializing_if = "Option::is_none")] pub audio_track: Option, From e1394e07bb769a32430a1b88206f21cd8b4cbdb4 Mon Sep 17 00:00:00 2001 From: Lachezar Lechev <8925621+elpiel@users.noreply.github.com> Date: Thu, 14 Nov 2024 11:49:36 +0200 Subject: [PATCH 4/5] Update src/types/streams/streams_item.rs --- src/types/streams/streams_item.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/types/streams/streams_item.rs b/src/types/streams/streams_item.rs index aa5377c19..90a80f6cc 100644 --- a/src/types/streams/streams_item.rs +++ b/src/types/streams/streams_item.rs @@ -33,6 +33,7 @@ pub struct StreamItemState { #[serde(skip_serializing_if = "Option::is_none")] pub subtitle_delay: Option, #[serde(default, skip_serializing_if = "Option::is_none")] + /// Subtitles size, platform dependent units pub subtitle_size: Option, #[serde(default, skip_serializing_if = "Option::is_none")] pub subtitle_offset: Option, From 9f746a5b3e0659c85fe813fed952ccd63bd77fbe Mon Sep 17 00:00:00 2001 From: Lachezar Lechev <8925621+elpiel@users.noreply.github.com> Date: Thu, 14 Nov 2024 11:49:45 +0200 Subject: [PATCH 5/5] Update src/types/streams/streams_item.rs --- src/types/streams/streams_item.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/types/streams/streams_item.rs b/src/types/streams/streams_item.rs index 90a80f6cc..643a21610 100644 --- a/src/types/streams/streams_item.rs +++ b/src/types/streams/streams_item.rs @@ -36,6 +36,7 @@ pub struct StreamItemState { /// Subtitles size, platform dependent units pub subtitle_size: Option, #[serde(default, skip_serializing_if = "Option::is_none")] + /// Vertical offset of the subtitles, platform dependent units pub subtitle_offset: Option, #[serde(skip_serializing_if = "Option::is_none")] pub audio_track: Option,