The problem of channels which are shared by different providers (or from the same provider in different countries) for which the users want the EPG in their own language.
I tried to solve it by splitting up the sources. The General files in each county source should not contain only channels for that country only.
Shared channels are in the Misc and Sport/Movie files (or named so in the local language). Not importing these from another country should solve most of the problems. But some people insist of also importing these.
(Although some channels can reside in the wrong file - I do not know everything)
On a regular interval, I get questions that a channel have the wrong language EPG. I each time try to explain they can omit importing the EPG for the offending language.
But this comes back time after time.
So I tried to think of a method to exclude some EPG on an individual base. And this is what Pr2 has programmed to do.
Of course it is true that setting the EPG language you want should filter out and give preference to language you want. And the XMLTV file contains that info. But for one reason or another the language setting does not take effect on imported EPG. I can not figure out why. Nor do I have clue how this can be enforced.
So, I though of the next best thing, exclude some channel_id's (EPG references) from importing
And yes the system that Pr2 programmed uses regex. But it is not as bad as it looks.
f.i. Animal Planet
<!-- DK --><!-- 0.8W --><channel id="AnimalPlanet.dk">1:0:1:4274:4:46:E080000:0:0:0:</channel><!-- Animal Planet -->
<!-- FI --><!-- 0.8W --><channel id="AnimalPlanet.fi">1:0:1:4274:4:46:E080000:0:0:0:</channel><!-- Animal Planet -->
<!-- NO --><!-- 0.8W --><channel id="AnimalPlanet.no">1:0:1:4274:4:46:E080000:0:0:0:</channel><!-- Animal Planet -->
<!-- SE --><!-- 0.8W --><channel id="AnimalPlanet.se">1:0:1:4274:4:46:E080000:0:0:0:</channel><!-- Animal Planet -->
All have the same service ref.
If you want the Finnish EPG. Then it depends on the order which you import the EPG. The last one wins. But requires that the rytec.sources.xml file is edited
(Of course you can choose not to import Danish, Swedish or Norwegian EPG)
With this filter you add to the "channel_id_filter.conf" file the following:
AnimalPlanet\.dk
AnimalPlanet\.no
AnimalPlanet\.se
This is the correct regex expression to achieve the desired effect.
However, the following does exactly the same.
AnimalPlanet.dk
AnimalPlanet.no
AnimalPlanet.se
In regex a . (period) just means any character. So it also matches also the desired "channel-id"'s for exclusion.
And since no other combinations exist, it does simply what you want.
The knowledge of regex you have to know is very limited.
Of course if you want more complicated matters like excluding all French channels (.fr) is a bit more complicated.
But is a rather stupid example. In this case just do not select anything to import from the French XMLTV files.
But hé, it can be done.