backport: rename filler_clip -> filler

This commit is contained in:
jb-alvarado 2023-10-08 20:47:24 +02:00
parent 05ab9aac71
commit b96e765f0b
4 changed files with 9 additions and 8 deletions

View File

@ -509,17 +509,17 @@ pub fn gen_source(
warn!("Generate filler with <yellow>{duration:.2}</> seconds length!");
let probe = MediaProbe::new(&config.storage.filler_clip);
let probe = MediaProbe::new(&config.storage.filler);
if config
.storage
.filler_clip
.filler
.rsplit_once('.')
.map(|(_, e)| e.to_lowercase())
.filter(|c| IMAGE_FORMAT.contains(&c.as_str()))
.is_some()
{
node.source = config.storage.filler_clip.clone();
node.source = config.storage.filler.clone();
node.cmd = Some(loop_image(&node));
node.probe = Some(probe);
} else if let Some(length) = probe
@ -529,7 +529,7 @@ pub fn gen_source(
.and_then(|d| d.parse::<f64>().ok())
{
// create placeholder from config filler.
node.source = config.storage.filler_clip.clone();
node.source = config.storage.filler.clone();
node.duration = length;
node.out = duration;
node.cmd = Some(loop_filler(&node));

View File

@ -267,7 +267,8 @@ pub struct Storage {
pub path: String,
#[serde(skip_serializing, skip_deserializing)]
pub paths: Vec<String>,
pub filler_clip: String,
#[serde(alias = "filler_clip")]
pub filler: String,
pub extensions: Vec<String>,
pub shuffle: bool,
}

View File

@ -90,7 +90,7 @@ pub fn generate_playlist(
playlist_file.display()
);
let mut filler = Media::new(0, &config.storage.filler_clip, true);
let mut filler = Media::new(0, &config.storage.filler, true);
let filler_length = filler.duration;
let mut length = 0.0;
let mut round = 0;

View File

@ -31,7 +31,7 @@ fn playlist_change_at_midnight() {
config.playlist.length = "24:00:00".into();
config.playlist.length_sec = Some(86400.0);
config.playlist.path = "assets/playlists".into();
config.storage.filler_clip = "assets/with_audio.mp4".into();
config.storage.filler = "assets/with_audio.mp4".into();
config.logging.log_to_file = false;
config.logging.timestamp = false;
config.out.mode = Null;
@ -72,7 +72,7 @@ fn playlist_change_at_six() {
config.playlist.length = "24:00:00".into();
config.playlist.length_sec = Some(86400.0);
config.playlist.path = "assets/playlists".into();
config.storage.filler_clip = "assets/with_audio.mp4".into();
config.storage.filler = "assets/with_audio.mp4".into();
config.logging.log_to_file = false;
config.logging.timestamp = false;
config.out.mode = Null;