Feature #3525
closedImplement Service Name Picons (vs Service Reference Picons)
100%
Description
The current picon code uses service references - so frequency, orbital position, etc. - to identify which icon to use on which channel. However, I've found this to be patchy at best, requiring a lot of manual work afterwards to fill the gaps.
There also seems to be a way to use service names, so more like the current channel name approach - but with a standardised way to 'slugify' the channel names, and also to build the icons through the picon process.
More information here:
https://github.com/picons/picons-source#snp---service-name-picons
and sample code used to generate the names here:
https://github.com/OpenViX/enigma2/blob/master/lib/python/Components/Renderer/Picon.py#L88-L89
Updated by Jaroslav Kysela almost 10 years ago
It looks like another request to mangle the channel names to picon filenames. Doesn't ?
So actually "Channel icon name lower-case" should become a combobox with label 'channel name scheme' with two options 'lower-case names' and 'service name picons'.
Updated by Prof Yaffle almost 10 years ago
Yes, something like that. It's more than just lower case, though, as there needs to be that standardised way to handle the special characters - so you mangle/slugify from "BBC Three HD with EXTRA &Bells+ on!!" to "bbcthreehdwithstarextrastarandbellsplus..." or however the translation in the sample code works.
If it's a recognised approach - and I don't know if this really is widely-adopted - then it at least gives a template way to handle it.
Updated by Jaroslav Kysela almost 10 years ago
- Status changed from New to Fixed
- % Done changed from 0 to 100
Applied in changeset commit:tvheadend|afa1a3c417831970616421b02387bff917e0f6ef.
Updated by Prof Yaffle almost 10 years ago
Thanks for this - it works well once you tweak a couple of options.
One question: the sample code seems to use a-z/0-9, translate &, + and *, and strip any other characters, if I understand it correctly:
name = re.sub('[^a-z0-9]', '', name.replace('&', 'and').replace('+', 'plus').replace('*', 'star').lower())
... but I think your implementation just removes everything except a-z/0-9, does it not? I don't know which is the "correct" way vs just being a different approach. I suppose it depends on whether https://picons.xyz/ is definitive, as that's where the trail begins.
Updated by Jaroslav Kysela almost 10 years ago
The svcnamepicons() does all string transitions:
1) lowercase
2) [a-z0-9] filter
3) replacing &, + and * with words
For example:
d[0] = 'a'; d[1] = 'n'; d[2] = 'd'; d += 3;
writes "and" to the destination string - see 'a' 'n' 'd' characters .....
Updated by Jaroslav Kysela almost 10 years ago
Okay, found a little copy bug: https://tvheadend.org/projects/tvheadend/repository/revisions/e29df17984c5e743b8a5ff1fc94ef9273b2166d5
Updated by Prof Yaffle over 9 years ago
Yup, that fixed it - it was obviously simply skipping over "+", which is the one I noticed as the most common of these characters. Working as intended, I think - thanks.