config_sources_targets - euzu/tuliprox GitHub Wiki
targets
Has the following top level entries:
enabledoptional default istrue, if you disable the processing is skippednameoptional default isdefault, if not default it has to be unique, for running selective targetssortoptionaloutputmandatory list of output formatsprocessing_orderoptional default isfrmoptionsoptionalfiltermandatory,renameoptionalmappingoptionalwatchoptional
sort
Has three top level attributes
match_as_asciioptional default isfalsegroupschannels
groups
has one top level attribute order which can be set to ascor desc.
channels
is a list of sort configurations for groups. Each configuration has 3 top level entries.
fieldcan begroup,title,nameorurl.group_patternis a regular expression like'^TR.:\s?(.*)'which is matched against group title.ordercan beascordescsequenceoptional is a list of field values (based onfield) which are used to sort based on index. Theorderis ignored for this entries.
The pattern should be selected taking into account the processing sequence.
sort:
groups:
order: asc
channels:
- { field: name, group_pattern: '^DE.*', order: asc }
output
Is a list of output format: Each format has 2 properties
typefilename
type is mandatory for m3u, strm and xtream.
filename is mandatory if type is strm. if type is m3u the plain m3u file is written but it is not used by m3u-filter.
output:
- type: m3u
filename: {}.m3u
processing_order
The processing order (Filter, Rename and Map) can be configured for each target with:
processing_order: frm (valid values are: frm, fmr, rfm, rmf, mfr, mrf. default is frm)
options
Target options are:
ingore_logologo attributes are ignored to avoid caching logo files on devices.share_live_streamsto share live stream connections in reverse proxy mode.remove_duplicatesto remove duplicate entries based on stream url compare.xtream_resolve_serieswhen you have xtream source and want to resolve seriesxtream_resolve_series_delaydelay between each url call in secondsxtream_resolve_vodwhen you have xtream source and want to resolve vodxtream_resolve_vod_delaydelay between each url call in seconds
Because xtream api delivers only the metadata to series, we need to fetch the series and resolve them. But be aware, each series info entry needs to be fetched one by one.
xtream_resolve_seriesif is set totrueand you have xtream input and m3u output, the series are fetched and resolved. This can cause a lot of requests to the provider. Be cautious when using this option.xtream_resolve_series_delayto avoid a provider ban you can set the seconds between series_info_request's. Default is 2 seconds. But be aware that the more series entries there are, the longer the process takes.
For xtream_resolve_(vod|series) the files are only fetched one for each input and cached. Only new and modified ones are updated.
strm output has additional options
underscore_whitespacereplaces all whitespaces with_in the path.cleanupdeletes the directory given atfilename.kodi_styletries to renamefilenamewith kodi style.strm_propsyou can add properties like#KODIPROP:seekable=true|false,#KODIPROP:inputstream=inputstream.ffmpegor"#KODIPROP:http-reconnect=true.
m3u output has additional options
m3u_include_type_in_url, default false, if true adds the stream typelive,movie,seriesto the url of the stream.m3u_mask_redirect_url, default false, if true uses urls fromapi_proxy.ymlfor user in proxy moderedirect.
xtream output has additional options
xtream_skip_live_direct_sourceif true the direct_source property from provider for live is ignoredxtream_skip_video_direct_sourceif true the direct_source property from provider for movies is ignoredxtream_skip_series_direct_sourceif true the direct_source property from provider for series is ignored
filter
The filter is a string with a filter statement.
The filter can have UnaryExpression NOT, BinaryExpression AND OR, Regexp Comparison (Group|Title|Name|Url) ~ "regexp"
and Type Comparsison Type = vod or Type = live or Type = series.
Filter fields are Group, Title, Name, Url and Type.
Example filter: ((Group ~ "^DE.*") AND (NOT Title ~ ".*Shopping.*")) OR (Group ~ "^AU.*")
If you use characters like + | [ ] ( ) in filters don't forget to escape them!!
The regular expression syntax is similar to Perl-style regular expressions,
but lacks a few features like look around and backreferences.
To test the regular expression i use regex101.com.
Don't forget to select Rust option which is under the FLAVOR section on the left.
rename
Is a List of rename configurations. Each configuration has 3 top level entries.
fieldcan begroup,title,nameorurl.patternis a regular expression like'^TR.:\s?(.*)'new_namecan contain capture groups variables addressed with$1,$2,...
rename supports capture groups. Each group can be addressed with $1, $2 .. in the new_name attribute.
This could be used for players which do not observe the order and sort themselves.
rename:
- { field: group, pattern: ^DE(.*), new_name: 1. DE$1 }
In the above example each entry starting with DE will be prefixed with 1..
(Please be aware of the processing order. If you first map, you should match the mapped entries!)
mapping
mapping: <list of mapping id's>
The mappings are defined in a file mapping.yml. The filename can be given as -m argument.
watch
For each target with a unique name, you can define a watched groups. It is a list of regular expression matching final group names from this target playlist. Final means in this case: the name in the resulting playlist after applying all steps of transformation.
For example given the following configuration:
watch:
- 'FR - Movies \[ 202[34] \]'
- 'FR - Series'
Changes from this groups will be printed as info on console and send to the configured messaging (f.e. telegram channel).