StremThru Wrap - MunifTanjim/stremthru GitHub Wiki
Upstream Addon Transformer
Extractor
Extractor extracts data from streams fetched from an upstream addon.
The built-in extractors have a ✨
prefix in their name.
Custom Extractor
If you're building a custom extractor, here's the list of fields: https://github.com/MunifTanjim/stremthru/blob/d581386b9d2dd6c4de918fbb0c2ceecc05b262a6/internal/stremio/transformer/stream_extractor.go#L18-L43
These fields can be used as the name of regex capture group.
Built-in Extractors can be found here: https://github.com/MunifTanjim/stremthru/tree/main/internal/stremio/transformer
Template
Template uses the extracted data to transform the streams fetched from an upstream addon.
The built-in templates have a ✨
prefix in their name.
Custom Template
The result of the extractor can be used in the template.
The type of the result can be found here: https://github.com/MunifTanjim/stremthru/blob/d581386b9d2dd6c4de918fbb0c2ceecc05b262a6/internal/stremio/transformer/stream_extractor.go#L125-L137
There are also some helper functions that can be used in the template: https://github.com/MunifTanjim/stremthru/blob/d581386b9d2dd6c4de918fbb0c2ceecc05b262a6/internal/stremio/transformer/funcmap.go#L202-L226
Examples:
Show Languages as emoji:
{{if ne (len .Languages) 0}}🌐 {{lang_join .Languages " " "emoji"}}{{- end}}
Or show Languages as iso codes:
{{if ne (len .Languages) 0}}🌐 {{lang_join .Languages " | " "iso"}}{{- end}}