-
Notifications
You must be signed in to change notification settings - Fork 5
Home
Some of the m3u-filter
features are:
-
filter
,raname
,map
entries of playlists withregular-expressions
- mimick
XTREAM
-Server or aM3U
-Server with api-endpoints - create files for
Kodi
- process one/multiple source(s) and produce one/multiple playlist(s)
- use templates for filter to avoid repetitions
- define filter as statements
- schedule updates
- send telegram bot messages
- watch changes in groups and get messages
m3u-filter
needs configurations for doing its job.
There are three configuration files in yaml format.
- config.yml
- mapping.yml
- api-proxy.yml
Is mandatory to run m3u-filter
.
Detailled explanation is here.
Is optional and used for advanced mapping functionality.
Detailled explanation is here.
Is optional and used for api-endpoints for xtream and m3u server mimicking.
Detailled explanation is here.
Extended M3U playlist filter
Usage: m3u-filter [OPTIONS]
Options:
-c, --config <CONFIG> The config file
-t, --target <TARGET> The target to process
-m, --mapping <MAPPING> The mapping file
-a, --api-proxy <API_PROXY> The user file
-s, --server Run in server mode
-l, --log-level <LOG_LEVEL> log level
-h, --help Print help
-V, --version Print version
m3u-filter
searches in the current directory for the configuration files.
If they are somewhere else you need to specifiy the locations
with the arguments -c
, -m
and -a
.
If you run m3u-filter
in cli-mode
(running from terminal and without the -s
argument),
you can define specific targets to update with the -t
argument. You can write multiple -t
arguments.
Target names should be provided in the config. The -t
option overrides enabled
attributes of input
and target
elements.
This means, even disabled inputs and targets are processed when the given target name as argument matches a target.
If you run with -s
argument, the -t
is ignored. This starts m3u-filter
in server mode.
In Server mode the Web-UI
is accesible through a browser. The port is defined in the config.yml file.
The Url should look like http://<IP-Address>:<Port>
. You need to replace <IP-Address>
and <Port>
Following log levels are supported:
debug
-
info
default warn
error
Use the -l
or -log-level
cli-argument to specify the log-level.
rustup update
sudo apt-get install pkg-config musl-tools libssl-dev
rustup target add x86_64-unknown-linux-musl
cargo build --target x86_64-unknown-linux-musl --release
If you want to compile this project on linux for windows, you need to do the following steps.
For ubuntu type:
sudo apt-get install gcc-mingw-w64
rustup target add x86_64-pc-windows-gnu
rustup toolchain install stable-x86_64-pc-windows-gnu
Compile it with:
cargo build --release --target x86_64-pc-windows-gnu
Dockerfile
FROM gcr.io/distroless/base-debian12 as build
FROM scratch
WORKDIR /
COPY --from=build /usr/share/zoneinfo /usr/share/zoneinfo
COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY ["./m3u-filter", "./config.yml", "./api-proxy.yml", "./mapping.yml", "/"]
COPY ./web /web
CMD ["/m3u-filter", "-s", "-c", "/config.yml"]
Image
docker build -t m3u-filter .
docker-compose.yml
version: '3'
services:
m3u-filter:
container_name: m3u-filter
image: m3u-filter:latest
working_dir: /
volumes:
- ./data:/data
ports:
- "8901:8901"
environment:
- TZ=Europe/Paris
restart: unless-stopped
The image should be around 15MB.
m3u-filter$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
m3u-filter latest c59e1edb9e56 1 day ago 14.6MB