Serve video gifs when requested

This commit is contained in:
Cameron
2025-07-02 15:48:49 -04:00
parent 3fbdba2b9c
commit e5afdd909b
7 changed files with 187 additions and 41 deletions

View File

@@ -8,6 +8,7 @@ pub struct AppState {
pub base_path: String,
pub thumbnail_path: String,
pub video_path: String,
pub gif_path: String,
}
impl AppState {
@@ -16,6 +17,7 @@ impl AppState {
base_path: String,
thumbnail_path: String,
video_path: String,
gif_path: String,
) -> Self {
let playlist_generator = PlaylistGenerator::new();
let video_playlist_manager =
@@ -27,6 +29,7 @@ impl AppState {
base_path,
thumbnail_path,
video_path,
gif_path,
}
}
}
@@ -38,6 +41,7 @@ impl Default for AppState {
env::var("BASE_PATH").expect("BASE_PATH was not set in the env"),
env::var("THUMBNAILS").expect("THUMBNAILS was not set in the env"),
env::var("VIDEO_PATH").expect("VIDEO_PATH was not set in the env"),
env::var("GIFS_DIRECTORY").expect("GIFS_DIRECTORY was not set in the env"),
)
}
}