-
Notifications
You must be signed in to change notification settings - Fork 6
config_sources_targets
targets
Has the following top level entries:
-
enabled
optional default istrue
, if you disable the processing is skipped -
name
optional default isdefault
, if not default it has to be unique, for running selective targets -
sort
optional -
output
mandatory list of output formats -
processing_order
optional default isfrm
-
options
optional -
filter
mandatory, -
rename
optional -
mapping
optional -
watch
optional
Has three top level attributes
-
match_as_ascii
optional default isfalse
groups
channels
has one top level attribute order
which can be set to asc
or desc
.
is a list of sort configurations for groups. Each configuration has 3 top level entries.
-
field
can begroup
,title
,name
orurl
. -
group_pattern
is a regular expression like'^TR.:\s?(.*)'
which is matched against group title. -
order
can beasc
ordesc
The pattern should be selected taking into account the processing sequence.
sort:
groups:
order: asc
channels:
- { field: name, group_pattern: '^DE.*', order: asc }
Is a list of output format: Each format has 2 properties
type
filename
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
.
strm
output has additional options
underscore_whitespace
cleanup
-
kodi_style
.
xtream
output has additional options
xtream_skip_live_direct_source
xtream_skip_video_direct_source
m3u
output has additional options
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_series
if is set totrue
and 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_delay
to 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.
output:
- type: m3u
filename: {}.m3u
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)
- ignore_logo
true
orfalse
- underscore_whitespace
true
orfalse
- cleanup
true
orfalse
- kodi_style
true
orfalse
underscore_whitespace
, cleanup
and kodi_style
are only valid for strm
output.
-
ingore_log
logo attributes are ignored to avoid caching logo files on devices. -
underscore_whitespace
replaces all whitespaces with_
in the path. -
cleanup
deletes the directory given atfilename
. -
kodi_style
tries to renamefilename
with kodi style.
The filter is a string with a filter statement.
The filter can have UnaryExpression NOT
, BinaryExpression AND OR
, and Comparison (Group|Title|Name|Url) ~ "regexp"
.
Filter fields are Group
, Title
, Name
and Url
.
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.
Is a List of rename configurations. Each configuration has 3 top level entries.
-
field
can begroup
,title
,name
orurl
. -
pattern
is a regular expression like'^TR.:\s?(.*)'
-
new_name
can 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: <list of mapping id's>
The mappings are defined in a file mapping.yml
. The filename can be given as -m
argument.
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).