From 8b2605a965085eed3fa79db166446aa0282df5f8 Mon Sep 17 00:00:00 2001 From: Xe Iaso Date: Sat, 19 Nov 2022 13:40:28 -0500 Subject: fix video Signed-off-by: Xe Iaso --- Cargo.lock | 1 + lib/xesite_templates/Cargo.toml | 1 + lib/xesite_templates/src/lib.rs | 6 ++++-- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4e0ea15..9e373d8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3458,6 +3458,7 @@ name = "xesite_templates" version = "0.1.0" dependencies = [ "maud", + "uuid 1.1.1", "xesite_types", ] diff --git a/lib/xesite_templates/Cargo.toml b/lib/xesite_templates/Cargo.toml index 3d66e59..d8a49c0 100644 --- a/lib/xesite_templates/Cargo.toml +++ b/lib/xesite_templates/Cargo.toml @@ -7,5 +7,6 @@ edition = "2021" [dependencies] maud = "0.23.0" +uuid = { version = "1", features = [ "v4" ] } xesite_types = { path = "../xesite_types" } \ No newline at end of file diff --git a/lib/xesite_templates/src/lib.rs b/lib/xesite_templates/src/lib.rs index 8171a3b..2d38052 100644 --- a/lib/xesite_templates/src/lib.rs +++ b/lib/xesite_templates/src/lib.rs @@ -101,11 +101,13 @@ pub fn video(path: String) -> Markup { "https://cdn.xeiaso.net/file/christine-static/{}/index.m3u8", path ); + let uuid = uuid::Uuid::new_v4(); + let uuid = format!("{uuid}").replace("-", ""); let hls_script = PreEscaped(format!( r#"