warn about storage

This commit is contained in:
jb-alvarado 2024-08-22 20:29:43 +02:00
parent cacb79e544
commit cb07b49c2a
2 changed files with 7 additions and 3 deletions

View File

@ -414,10 +414,12 @@ pub struct Storage {
pub filler: PathBuf,
pub extensions: Vec<String>,
pub shuffle: bool,
#[serde(skip_deserializing)]
pub shared_storage: bool,
}
impl Storage {
fn new(config: &models::Configuration, path: PathBuf) -> Self {
fn new(config: &models::Configuration, path: PathBuf, shared_storage: bool) -> Self {
Self {
help_text: config.storage_help.clone(),
path,
@ -429,6 +431,7 @@ impl Storage {
.map(|s| s.to_string())
.collect(),
shuffle: config.storage_shuffle,
shared_storage,
}
}
}
@ -583,7 +586,8 @@ impl PlayoutConfig {
});
}
let mut storage = Storage::new(&config, channel.storage_path.clone());
let mut storage =
Storage::new(&config, channel.storage_path.clone(), global.shared_storage);
if !channel.playlist_path.is_dir() {
tokio::fs::create_dir_all(&channel.playlist_path)

@ -1 +1 @@
Subproject commit 90dcd3b23e83230e6db3d8da0cdf1abe4e874ea0
Subproject commit ec5b3be0e99e6394a78f5238ffa53976ba7a9e17