Closed kumy closed 1 year ago
Is this done with the current mapping refactoring ?
Sorry for late testing I had a new stay at the hospital... :(
Is this done with the current mapping refactoring ?
Hum, if you are referring to prefix
in mapping.yml
https://github.com/euzu/m3u-filter#2344-prefix, then unfortunately no.
I wish with the same mapping file to be able to add distinct tags per config input
. So I better see the tag definition at the config level not the mapping level (don't remove the tags in mapping level they have use case too). With the prefix in mapping to achieve what I want I would need to duplicate mapping to set a static prefix tag :(
I'm not sure how I can better explain than it the initial issue comment.
(Could you please reopen, I miss the privileges for that, thanks)
I dont understand the use-case. The tags are only used during thge mapping phase. You define them on the top level. You want to define a tag with the same name for different inputs (sources)?
Maybe we call tag
for 2 distinct things, so it may be confusing.
My use case is: I have multiple providers giving me the same channels (sometime there are outage so I switch on another one). I'm using Kodi, so I would love to see the provider name along with the channel name
such as
I can achieve that today by renaming the Title
(only the Title, I prefer to leave the Name with only the channel Name so tvheadend can also do it's XMLTV mapping itself - just a personal choice) at the input
level:
rename:
- { field: name, new_name: "$1", pattern: "FR: (.*) FHD" }
- { field: group, new_name: "ALI", pattern: ".*" }
- { field: title, new_name: "$1 - ALI", pattern: "FR: (.*) FHD" }
That worked fine until I requested #10, where I overwrite the Title by the Name. I use processing_order: frm
as I clean the channel Title before mapping (else the regexp will be too much complicated on mapping side).
So my idea was to have a new setting at the input
level which would allow me to add static suffixes per input
. All channels from provider 1 will be configured to add ALI
to the Title, the second provider WANI
, the third NIRV
.
Sorry again for the confusion around that.
Each input presents a m3u file. You want to Prefix/Suffix each entry for one specific input-file with a static text?
input:
persist: 'playlist_1_{}.m3u'
url: 'http://myserver.net/playlist.m3u'
suffix: {field: title, value: "Prov.1" }
prefix: <like suffix>
Something like this ?
Looks great, and the syntax is neat and open. Not sure I was clear, but it would be nice to have that after the FRM, or maybe a 4 letters combination, FRMT 🤷 Thanks
Please look at the latest commit or release
That works only if the assignments
is not enabled in mapping.yml
assignments:
title: name
With assignments
only assigned to Tf1 series film
entry. It's not working, the lines 2 and 3 should have ended by -ALI
or - NIRV
iptv-ALI-FHD_raw.m3u:#EXTINF:-1 tvg-id="TF1.fr" tvg-name="TF1" group-title="ALIFR|TNT" tvg-chno="1" tvg-logo="https://upload.wikimedia.org/wikipedia/commons/thumb/3/3c/TF1_logo_2013.svg/320px-TF1_logo_2013.svg.png",TF1 - ALI
iptv-ALI-FHD_raw.m3u:#EXTINF:-1 tvg-id="TF1SeriesFilms.fr" tvg-name="TF1 Séries Films" group-title="ALIFR|TNT" tvg-chno="20" tvg-logo="https://upload.wikimedia.org/wikipedia/commons/d/d4/Logo_TF1_S%C3%A9ries_Films_2018.jpg",TF1 Séries Films
iptv-NIRV-FR_raw.m3u:#EXTINF:-1 tvg-id="TF1SeriesFilms.fr" tvg-name="TF1 Séries Films" group-title="NIRVFR|TNT" tvg-chno="20" tvg-logo="https://upload.wikimedia.org/wikipedia/commons/d/d4/Logo_TF1_S%C3%A9ries_Films_2018.jpg",TF1 Séries Films
iptv-NIRV-FR_raw.m3u:#EXTINF:-1 tvg-id="TF1.fr" tvg-name="TF1" group-title="NIRVFR|TNT" tvg-chno="1" tvg-logo="https://upload.wikimedia.org/wikipedia/commons/thumb/3/3c/TF1_logo_2013.svg/320px-TF1_logo_2013.svg.png",TF1 HD - NIRV
iptv-NIRV-FR_raw.m3u:#EXTINF:-1 tvg-id="TF1SeriesFilms.fr" tvg-name="TF1 Séries Films [HD]" group-title="NIRVFR|TNT" tvg-chno="20" tvg-logo="https://upload.wikimedia.org/wikipedia/commons/d/d4/Logo_TF1_S%C3%A9ries_Films_2018.jpg",TF1 Séries Films [HD]
iptv-WANI-FR_raw.m3u:#EXTINF:-1 tvg-id="TF1SeriesFilms.fr" tvg-name="TF1 Séries Films" group-title="WANIFR|TNT" tvg-chno="20" tvg-logo="https://upload.wikimedia.org/wikipedia/commons/d/d4/Logo_TF1_S%C3%A9ries_Films_2018.jpg",TF1 Séries Films
iptv-WANI-FR_raw.m3u:#EXTINF:-1 tvg-id="TF1.fr" tvg-name="TF1" group-title="WANIFR|TNT" tvg-chno="1" tvg-logo="https://upload.wikimedia.org/wikipedia/commons/thumb/3/3c/TF1_logo_2013.svg/320px-TF1_logo_2013.svg.png",TF1 HD - WANI
iptv-WANI-FR_raw.m3u:#EXTINF:-1 tvg-id="TF1SeriesFilms.fr" tvg-name="TF1 Séries Films [HD]" group-title="WANIFR|TNT" tvg-chno="20" tvg-logo="https://upload.wikimedia.org/wikipedia/commons/d/d4/Logo_TF1_S%C3%A9ries_Films_2018.jpg",TF1 Séries Films [HD]
Without the assignment at all, this feature is working well for all lines:
iptv-ALI-FHD_raw.m3u:#EXTINF:-1 tvg-id="TF1.fr" tvg-name="TF1" group-title="ALIFR|TNT" tvg-chno="1" tvg-logo="https://upload.wikimedia.org/wikipedia/commons/thumb/3/3c/TF1_logo_2013.svg/320px-TF1_logo_2013.svg.png",TF1 - ALI
iptv-ALI-FHD_raw.m3u:#EXTINF:-1 tvg-id="TF1SeriesFilms.fr" tvg-name="TF1 Séries Films" group-title="ALIFR|TNT" tvg-chno="20" tvg-logo="https://upload.wikimedia.org/wikipedia/commons/d/d4/Logo_TF1_S%C3%A9ries_Films_2018.jpg",TF1 Series Films - ALI
iptv-NIRV-FR_raw.m3u:#EXTINF:-1 tvg-id="TF1SeriesFilms.fr" tvg-name="TF1 Séries Films" group-title="NIRVFR|TNT" tvg-chno="20" tvg-logo="https://upload.wikimedia.org/wikipedia/commons/d/d4/Logo_TF1_S%C3%A9ries_Films_2018.jpg",HD1 - NIRV
iptv-NIRV-FR_raw.m3u:#EXTINF:-1 tvg-id="TF1.fr" tvg-name="TF1" group-title="NIRVFR|TNT" tvg-chno="1" tvg-logo="https://upload.wikimedia.org/wikipedia/commons/thumb/3/3c/TF1_logo_2013.svg/320px-TF1_logo_2013.svg.png",TF1 HD - NIRV
iptv-NIRV-FR_raw.m3u:#EXTINF:-1 tvg-id="TF1SeriesFilms.fr" tvg-name="TF1 Séries Films [HD]" group-title="NIRVFR|TNT" tvg-chno="20" tvg-logo="https://upload.wikimedia.org/wikipedia/commons/d/d4/Logo_TF1_S%C3%A9ries_Films_2018.jpg",TF1 Series Films HD - NIRV
iptv-WANI-FR_raw.m3u:#EXTINF:-1 tvg-id="TF1SeriesFilms.fr" tvg-name="TF1 Séries Films" group-title="WANIFR|TNT" tvg-chno="20" tvg-logo="https://upload.wikimedia.org/wikipedia/commons/d/d4/Logo_TF1_S%C3%A9ries_Films_2018.jpg",HD1 - WANI
iptv-WANI-FR_raw.m3u:#EXTINF:-1 tvg-id="TF1.fr" tvg-name="TF1" group-title="WANIFR|TNT" tvg-chno="1" tvg-logo="https://upload.wikimedia.org/wikipedia/commons/thumb/3/3c/TF1_logo_2013.svg/320px-TF1_logo_2013.svg.png",TF1 HD - WANI
iptv-WANI-FR_raw.m3u:#EXTINF:-1 tvg-id="TF1SeriesFilms.fr" tvg-name="TF1 Séries Films [HD]" group-title="WANIFR|TNT" tvg-chno="20" tvg-logo="https://upload.wikimedia.org/wikipedia/commons/d/d4/Logo_TF1_S%C3%A9ries_Films_2018.jpg",TF1 Series Films HD - WANI
I did not understand the issue, what works and what not? The input affixes are applied after frm processing, so the assignment happens before.
That works as long as the mappings doesn't use the assignments
feature.
ok i will check when i am back at home
I cant reproduce this, and i cant see it in the code, because the input affixes are appended after everything is done. Please can you provide me a little set of anonymized config, mapping, input file zip to reproduce this.
Sure I'll try to provide that during the day. Thanks for digging into the issue :+1:
I did the exercise and stripped my conf to the bare minimum, and finally found the issue :innocent: :bow:
I was defining the suffix
in config.yml
at .sources[].targets[].suffix
instead of .sources[].input.suffix
.
I'm really sorry to make you loose your time, issue was on my side. I thought I had it working fine the first time I tested the feature because my rename
rules were applied and the expected result was the same.
Closing. And thanks again!
you are welcome.
Is your feature request related to a problem? Please describe. As I'm using multiple providers, I like to know which one I'm currently using. So I used to tag my channels as: (mind the
- PROVx
inName
andTitle
)Describe the solution you'd like Be able per
config.yml
source
, to add a specific suffixDescribe alternatives you've considered
rename
to achieve that:2.1 With the rename feature: when using default
FRM
, theRename hack
still works, but the mapping doesn't (The regex filters can be changed to permit matching2.2 With the rename feature: when using
FMR
, theRename hack
works only onTitle
(Name
only contains the mapped name - as expected), the mapping works, as I have theChno
andLogo
Both 2.1 an 2.2 are easily explainable, and are the expected result for the current implementation
Additional context Add any other context or screenshots about the feature request here.