parent
bcb0d8738a
commit
198994a99c
5 changed files with 24 additions and 16 deletions
22
Cargo.lock
generated
22
Cargo.lock
generated
|
@ -158,7 +158,7 @@ checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b"
|
|||
[[package]]
|
||||
name = "based"
|
||||
version = "0.1.0"
|
||||
source = "git+https://git.hydrar.de/jmarya/based#4e3107ce08aaf6f149880a00707f86f1e94683eb"
|
||||
source = "git+https://git.hydrar.de/jmarya/based#d6555edc29de66ff5190b716a1f8ebac8dbb2110"
|
||||
dependencies = [
|
||||
"bcrypt",
|
||||
"chrono",
|
||||
|
@ -263,9 +263,9 @@ checksum = "325918d6fe32f23b19878fe4b34794ae41fc19ddbe53b10571a4874d44ffd39b"
|
|||
|
||||
[[package]]
|
||||
name = "cc"
|
||||
version = "1.2.5"
|
||||
version = "1.2.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c31a0499c1dc64f458ad13872de75c0eb7e3fdb0e67964610c914b034fc5956e"
|
||||
checksum = "8d6dbb628b8f8555f86d0323c2eb39e3ec81901f4b83e091db8a6a76d316a333"
|
||||
dependencies = [
|
||||
"shlex",
|
||||
]
|
||||
|
@ -785,9 +785,9 @@ checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f"
|
|||
|
||||
[[package]]
|
||||
name = "glob"
|
||||
version = "0.3.1"
|
||||
version = "0.3.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b"
|
||||
checksum = "a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2"
|
||||
|
||||
[[package]]
|
||||
name = "h2"
|
||||
|
@ -2104,18 +2104,18 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "serde"
|
||||
version = "1.0.216"
|
||||
version = "1.0.217"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0b9781016e935a97e8beecf0c933758c97a5520d32930e460142b4cd80c6338e"
|
||||
checksum = "02fc4265df13d6fa1d00ecff087228cc0a2b5f3c0e87e258d8b94a156e984c70"
|
||||
dependencies = [
|
||||
"serde_derive",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "serde_derive"
|
||||
version = "1.0.216"
|
||||
version = "1.0.217"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "46f859dbbf73865c6627ed570e78961cd3ac92407a2d117204c49232485da55e"
|
||||
checksum = "5a9bf7cf98d04a2b28aead066b7496853d4779c9cc183c440dbac457641e19a0"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
|
@ -2520,9 +2520,9 @@ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292"
|
|||
|
||||
[[package]]
|
||||
name = "syn"
|
||||
version = "2.0.92"
|
||||
version = "2.0.93"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "70ae51629bf965c5c098cc9e87908a3df5301051a9e087d6f9bef5c9771ed126"
|
||||
checksum = "9c786062daee0d6db1132800e623df74274a0a87322d8e183338e01b3d98d058"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
|
|
|
@ -27,7 +27,7 @@ async fn launch() -> _ {
|
|||
|
||||
let lib = library::Library::new().await;
|
||||
|
||||
User::create("admin", "admin", based::auth::UserRole::Admin).await;
|
||||
User::create("admin".to_string(), "admin", based::auth::UserRole::Admin).await;
|
||||
|
||||
let library = lib.clone();
|
||||
|
||||
|
|
|
@ -22,7 +22,11 @@ pub async fn video_file(v: &str, library: &State<Library>) -> Option<DataRespons
|
|||
"video/webm"
|
||||
};
|
||||
|
||||
return Some(DataResponse::new(buf, content_type, Some(60 * 60 * 24 * 3)));
|
||||
return Some(DataResponse::new(
|
||||
buf,
|
||||
content_type.to_string(),
|
||||
Some(60 * 60 * 24 * 3),
|
||||
));
|
||||
}
|
||||
|
||||
None
|
||||
|
@ -37,7 +41,11 @@ pub async fn video_thumbnail(v: &str, library: &State<Library>) -> Option<DataRe
|
|||
};
|
||||
|
||||
if let Some(data) = library.get_thumbnail(&video).await {
|
||||
return Some(DataResponse::new(data, "image/png", Some(60 * 60 * 24 * 3)));
|
||||
return Some(DataResponse::new(
|
||||
data,
|
||||
"image/png".to_string(),
|
||||
Some(60 * 60 * 24 * 3),
|
||||
));
|
||||
}
|
||||
|
||||
None
|
||||
|
@ -47,7 +55,7 @@ pub async fn video_thumbnail(v: &str, library: &State<Library>) -> Option<DataRe
|
|||
pub async fn fav_icon() -> DataResponse {
|
||||
DataResponse::new(
|
||||
include_bytes!("../../src/icon.png").to_vec(),
|
||||
"image/png",
|
||||
"image/png".to_string(),
|
||||
Some(60 * 60 * 24 * 30),
|
||||
)
|
||||
}
|
||||
|
|
|
@ -60,7 +60,7 @@ pub async fn watch_page(
|
|||
|
||||
};
|
||||
};
|
||||
div id="recommendations" class="mt-8" {
|
||||
div id="recommendations" class="mt-8 w-1/3" {
|
||||
h3 class="text-center text-4xl font-extrabold leading-tight mb-2" { "In " a class="text-blue-500" href=(format!("/d/{}", video.directory)) { (video.directory) }; }
|
||||
@for video in library.get_directory_videos(&video.directory).await {
|
||||
(video_element_wide(&video).await);
|
||||
|
|
Loading…
Add table
Reference in a new issue