From bb059f2e63c07d67fc672e9b0319012a58687fa9 Mon Sep 17 00:00:00 2001 From: jb-alvarado Date: Tue, 24 Sep 2024 15:33:56 +0200 Subject: [PATCH] reorder --- README.md | 4 ++-- engine/src/db/models.rs | 46 ++++++++++++++++++++--------------------- 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/README.md b/README.md index 586bed20..98e83604 100644 --- a/README.md +++ b/README.md @@ -13,13 +13,13 @@ Check the [releases](https://github.com/ffplayout/ffplayout/releases/latest) for ### Features -- start program with [web based frontend](https://github.com/ffplayout/ffplayout-frontend), or run playout in foreground mode without frontend +- start program with [web based frontend](/frontend/), or run playout in foreground mode without frontend - dynamic playlist - replace missing playlist or clip with single filler or multiple fillers from folder, if no filler exists, create dummy clip - playing clips in [watched](/docs/folder_mode.md) folder mode - send emails with error message - overlay a logo -- overlay text, controllable through [web frontend](https://github.com/ffplayout/ffplayout-frontend) (needs ffmpeg with libzmq and enabled JSON RPC server) +- overlay text, controllable through [web frontend](/frontend/) (needs ffmpeg with libzmq and enabled JSON RPC server) - loop playlist infinitely - [remote source](/docs/remote_source.md) - trim and fade the last clip, to get full 24 hours diff --git a/engine/src/db/models.rs b/engine/src/db/models.rs index 08fe36e8..88ba5eb0 100644 --- a/engine/src/db/models.rs +++ b/engine/src/db/models.rs @@ -53,6 +53,29 @@ pub async fn init_globales(conn: &Pool) { INSTANCE.set(config).unwrap(); } +#[derive(Clone, Debug, Default, Deserialize, Serialize, sqlx::FromRow)] +pub struct Channel { + #[serde(default = "default_id", skip_deserializing)] + pub id: i32, + pub name: String, + pub preview_url: String, + pub extra_extensions: String, + pub active: bool, + pub hls_path: String, + pub playlist_path: String, + pub storage_path: String, + pub last_date: Option, + pub time_shift: f64, + + #[sqlx(default)] + #[serde(default)] + pub utc_offset: i32, +} + +fn default_id() -> i32 { + 1 +} + // #[serde_as] #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct User { @@ -232,29 +255,6 @@ where deserializer.deserialize_any(StringOrNumberVisitor) } -#[derive(Clone, Debug, Default, Deserialize, Serialize, sqlx::FromRow)] -pub struct Channel { - #[serde(default = "default_id", skip_deserializing)] - pub id: i32, - pub name: String, - pub preview_url: String, - pub extra_extensions: String, - pub active: bool, - pub hls_path: String, - pub playlist_path: String, - pub storage_path: String, - pub last_date: Option, - pub time_shift: f64, - - #[sqlx(default)] - #[serde(default)] - pub utc_offset: i32, -} - -fn default_id() -> i32 { - 1 -} - #[derive(Clone, Debug, Deserialize, Serialize, sqlx::FromRow)] pub struct Configuration { pub id: i32,