From 7f9ff9bb65b4ece9d2a12a6fc5f7e4764863365c Mon Sep 17 00:00:00 2001 From: shockrah Date: Sun, 17 Oct 2021 21:26:04 -0700 Subject: [PATCH] - No more grabbing no directory entries in categories + Better video sizing --- api/src/category.rs | 4 +++- api/static/css/style.css | 2 ++ api/templates/video.html.tera | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/api/src/category.rs b/api/src/category.rs index 556d85c..b3c277c 100644 --- a/api/src/category.rs +++ b/api/src/category.rs @@ -26,7 +26,9 @@ pub fn get_category_dirs(path: &str) -> std::io::Result> { let mut ret: Vec = Vec::new(); for entry in std::fs::read_dir(path)? { if let Ok(entry) = entry { - ret.push(entry) + if entry.path().is_dir() { + ret.push(entry) + } } } return Ok(ret); diff --git a/api/static/css/style.css b/api/static/css/style.css index cbafdcd..fe8e01e 100644 --- a/api/static/css/style.css +++ b/api/static/css/style.css @@ -22,6 +22,7 @@ a { padding: 0 2em; line-height: 1.6em; color: whitesmoke; + max-width: 1000px; } .video-gallery { display: flex; @@ -40,6 +41,7 @@ a { } video { max-width: 100%; + max-height: 80vh; } .pure-form { diff --git a/api/templates/video.html.tera b/api/templates/video.html.tera index a20739c..9ff104e 100644 --- a/api/templates/video.html.tera +++ b/api/templates/video.html.tera @@ -22,7 +22,7 @@

{{title}}

-