fixes counter not incrementing

This commit is contained in:
Dennis Webb
2025-02-01 21:50:13 -06:00
committed by GitHub
parent 338234e154
commit f91bc4c915
+2 -2
View File
@@ -261,11 +261,11 @@ fn map_playlist_counter(target: &ConfigTarget, playlist: &[PlaylistGroup]) {
for mapping in mappings {
if let Some(counter_list) = &mapping.t_counter {
for counter in counter_list {
let cntval = counter.value.load(core::sync::atomic::Ordering::Relaxed);
for plg in playlist {
for channel in &plg.channels {
let provider = ValueProvider { pli: RefCell::new(channel) };
if counter.filter.filter(&provider, &mut mock_processor) {
let cntval = counter.value.load(core::sync::atomic::Ordering::Relaxed);
let new_value = if counter.modifier == CounterModifier::Assign {
cntval.to_string()
} else {
@@ -593,4 +593,4 @@ pub async fn exec_processing(client: Arc<reqwest::Client>, cfg: Arc<Config>, tar
}
let elapsed = start_time.elapsed().as_secs();
info!("Update process finished! Took {elapsed} secs.");
}
}