mirror of
https://github.com/euzu/tuliprox.git
synced 2026-10-01 05:22:28 +02:00
Mapper script built-in function template
This commit is contained in:
@@ -129,10 +129,10 @@ fn map_channel(mut channel: PlaylistItem, mapping: &Mapping) -> PlaylistItem {
|
||||
let templates = mapping.templates.as_ref();
|
||||
for m in mapper {
|
||||
if let Some(script) = m.t_script.as_ref() {
|
||||
let provider = ValueProvider { pli: &ref_chan.clone() };
|
||||
let mut accessor = ValueAccessor { pli: ref_chan };
|
||||
if let Some(filter) = &m.t_filter {
|
||||
let provider = ValueProvider { pli: ref_chan };
|
||||
if filter.filter(&provider) {
|
||||
let mut accessor = ValueAccessor { pli: ref_chan };
|
||||
script.eval(&mut accessor, templates);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user