Project

General

Profile

Actions

Feature #3525

closed

Implement Service Name Picons (vs Service Reference Picons)

Added by Prof Yaffle almost 10 years ago. Updated over 9 years ago.

Status:
Fixed
Priority:
Normal
Assignee:
-
Category:
User Interface
Target version:
Start date:
2016-01-23
Due date:
% Done:

100%

Estimated time:

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

Actions #1

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'.

Actions #2

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.

Actions #3

Updated by Jaroslav Kysela almost 10 years ago

  • Target version set to 4.2
Actions #4

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.

Actions #5

Updated by Jaroslav Kysela almost 10 years ago

Added to v4.1-1422-gafa1a3c .

Actions #6

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.

Actions #7

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 .....

Actions #9

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.

Actions

Also available in: Atom PDF