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:
+11
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user