Media server support

Still only works for clients and is not federated. Need to figure out
caching when I get to the federated version
This commit is contained in:
2026-05-30 22:22:16 -07:00
parent 8ba58234e0
commit 0e3600c31f
4 changed files with 61 additions and 11 deletions
+11
View File
@@ -79,6 +79,17 @@ async fn main() -> ExitCode {
tracing_subscriber::fmt().with_max_level(level).finish()
).expect("Failed to setup logger");
// Check to make sure media directory exists
match std::fs::exists(&config.media_directory) {
Ok(true) => {},
// NOTE: maybe shouldnt shadow this error
_ => {
error!("Media directory {} does not exist. Check to make sure it is a directory and is writable.",config.media_directory);
return ExitCode::FAILURE;
}
}
// Set up database connection
let db_string = format!("postgres://{}:{}@{}/{}",config.database.user,config.database.password,config.database.url,config.database.db_name);