Closed kiddac closed 2 weeks ago
jbleyel on openatv has recommended a regex solution instead
if not pngname:
name = sub("uhd$|fhd$|sd$|hd$|4k$", "", name)
if name:
pngname = findPicon(name)
I agree this is not Pli style. Please improve with 'sub'. Can be done in a kind of oneliner
The changes were added to the developer image. I have submitted a pull request to pick it into Release. https://github.com/OpenPLi/enigma2/pull/3861
Issue can then be closed.
It might also be beneficial in that context to strip anything in square brackets from ths start. And I have also seen "8K" (which if you're lucky is FHD), so this needs stripping too.
It would be better if IPTV tools would strip all this nonsense at the source though, instead of having to hack this into E2.
But if that was done, you would not know what the quality/resolution is supposed to be.
Please ignore. This is wrong.
On second thoughts and after comment by someone from another image, the wholesale trimming is not the best approach. The original suggestion where the trim is done if the full name is not found would have be better. That would have catered for channels where there are different logos for HD/SD channels.
But if that was done, you would not know what the quality/resolution is supposed to be.
I don't understand that, it is fine to strip HD and 4K, but not 8K?
And I was referring to channel name prefixes, which are currently not stripped at all, like
[BE] [8K] Play Sports 4 HVEC
which needs two prefixes stripped, and a suffix which we currently don't strip.
My comment was in response to It would be better if IPTV tools would strip all this nonsense at the source though, instead of having to hack this into E2.
. Not specific to 8k
My last comment is wrong, trims are done if the full name is not found
I have re-opened the pull request for 9.0 branch. I would be grateful if you can consider merging it.
As far I know this is included in a more smarter way.
It is only in Develop image.
Every IPTV providers has its own way to report there channels resolution (they are very creative on this), the implementation of the resolution strip was initially done for the satellite to have a fallback when there is no specific picon for hd (remember that at the very beginning of HD channels there was specific picon for those channels compared to SD one), so indeed the strip was done for the end of the string because it was there that it is placed on DVB transmission. And I agree that a regex would be better for perform this.
As far I know this is included in a more smarter way.
Then why is this issue still open?
Because it is not in release image yet
Leaving this open doesn't change that.
If it is in develop, the issue is dealt with, and available for the wider public in the net release.
I have created a pull request https://github.com/OpenPLi/enigma2/pull/4053 I hope you can merge it.
In a world of iptv would it be possible to amend the picon.py to include iptv references like sd, fhd, uhd, 4k
Currently SNP picons look for name and if ends with HD strips the HD
It would now be better if this code also incorporates other IPTV values like SD,4K, FHD, UHD to pick up more IPTV channels
Example new code.