Jump to content


Photo

Picons by 'Service name'.


  • Please log in to reply
97 replies to this topic

#1 Huevos

  • PLi® Contributor
  • 4,229 posts

+158
Excellent

Posted 7 November 2014 - 11:06

Picons by 'Service name'.

 

Benefits:

Picon names are human readable.
If the service ref changes, the picon continues to work without intervention.
Picons can be shared between satellites, terrestrial and cable.
No symlinks are necessary for picon sharing. That means picons that previously needed symlinks can now work from a FAT32 formatted USB stick.
Service-ref picons take priority, so where a unique picon is needed, for example where regional channels all use the same service name, they are still available.

Filename format is as follows:

Lower case, bbconehd.png (this allows BBC One HD and BBC ONE HD to share a picon (Das Earst, 19.2E; DAS ERSTE, 13.0E; etc))
No spaces,
Excluded characters: ['/', '\\', '\'', '"', '`', '?', ' ', '(', ')', ':', '<', '>', '|', '.', '\n']
Special characters: '*', '+' and '&' are converted to 'star', 'plus' and 'and' respectively.

 

Enjoy!

Attached Files


Edited by Huevos, 7 November 2014 - 11:08.


Re: Picons by 'Service name'. #2 ColinB

  • Senior Member
  • 743 posts

+28
Good

Posted 7 November 2014 - 12:11

@Huevos where/how to install ?

 

Thanks


Xtrend et8000 7.1-Release

2 x 8/1 DiSEqC  30w 13e 19e 23e 28e   

Astrometa USB Tuner Working DVB-T2 now on Kernel 4.10+  ;)

WD10EARX 1TB

Sandisk 32GB USB for AFB, EPG, Picons & Timeshift

 

ZGemma Star S 7.0-Release

4/1 DiSEqC  30w 13e 19e 28e

Sandisk 8GB USB for AFB, EPG, Picons & Timeshift

 

LG 49UH610V UHD-HDR

UHF/Cable/Sat

 

E-Channelizer

 

 

 


Re: Picons by 'Service name'. #3 Trial

  • Senior Member
  • 1,127 posts

+34
Good

Posted 7 November 2014 - 12:25

Hi,

I thought about something like that for IPTV. Did you test if IPTV will work also?

 

ciao



Re: Picons by 'Service name'. #4 Huevos

  • PLi® Contributor
  • 4,229 posts

+158
Excellent

Posted 7 November 2014 - 12:39

Goes in ./python/components/renderer.

Not sure about IPTV. If serviceReference returns the name of the IPTV stream it should work just the same. Have a look what the IPTV stream is named in service info.

Edited by Huevos, 7 November 2014 - 12:41.


Re: Picons by 'Service name'. #5 littlesat

  • PLi® Core member
  • 56,123 posts

+685
Excellent

Posted 8 November 2014 - 11:23

Committed... but slightly changed...


WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: Picons by 'Service name'. #6 Taykun345

  • Senior Member
  • 1,296 posts

+41
Good

Posted 8 November 2014 - 12:00

Great idea Huevos!


Army MoodBlue HD skin modification by me: https://github.com/T...-MoodBlueHD-mod
Matrix10 MH-HD2 skin modification by me: https://github.com/B...-MX-HD2-OpenPli
MetrixHD skin modification by me: https://github.com/T...xHD-WPstyle-mod
Slovenian translation for OpenPLi E2: https://github.com/T...ion-for-OpenPLi

Re: Picons by 'Service name'. #7 Huevos

  • PLi® Contributor
  • 4,229 posts

+158
Excellent

Posted 8 November 2014 - 14:02

Committed... but slightly changed...

Thanks.



Re: Picons by 'Service name'. #8 Rob van der Does

  • Senior Member
  • 7,766 posts

+184
Excellent

Posted 8 November 2014 - 16:29

Committed... but slightly changed...

Hmmm, looking at the commit you already forgot about Eriks humble suggestion.....
 

How can I do that if i only get plain py files?
And this time I also changed little things...

The general courtesy rules of open source.
 
If you get changes/patches from someone else, use their name/e-mail/id to commit, and commit it just like you get it. From the command line git client, just overwrite the python files, use commit -a --author "bla@bla.bla" -s, that does exactly the trick.
 
After that (!) you do your changes and apply them in a separate commit on your own name.
 
Also there is no rule that says you have to always push directly after you commit something... As long as you pull before each sets of commits (to prevent conflicts with the nasty extra "merged..." commit) you're okay.

Not sure why; it was a recent suggestion.....

Edited by SatKiekerd, 8 November 2014 - 16:32.


Re: Picons by 'Service name'. #9 ims

  • PLi® Core member
  • 13,603 posts

+210
Excellent

Posted 13 November 2014 - 18:51

@ Huevos - my plugin SetPicon can save all used picon from actual bouquet as service_name.png.

F.eg:

Eurosport_HD.png

Eurosport__HD.png

Fishing_and_Hunting.png

 

but e2 does not accept it with your changes. Something I overlooked ? Names all in lower ?


Edited by ims, 13 November 2014 - 19:04.

Kdo nic nedělá, nic nezkazí!

Re: Picons by 'Service name'. #10 littlesat

  • PLi® Core member
  • 56,123 posts

+685
Excellent

Posted 13 November 2014 - 19:09

The _ is excluded... and captitals also... I suggest this is done to get the best hits as possible....

 

use eurosporthd.png, fishingandhunting.png...


Edited by littlesat, 13 November 2014 - 19:10.

WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: Picons by 'Service name'. #11 athoik

  • PLi® Core member
  • 8,458 posts

+327
Excellent

Posted 13 November 2014 - 19:13

Also + - & are excluded...
>>> import re
>>> re.sub('[^a-z0-9]', '', "a1+b2-c3&d4*e5")
'a1b2c3d4e5'
>>> re.sub('[^a-z0-9&+*-]', '', "a1+b2-c3&d4*e5")
'a1+b2-c3&d4*e5'

Wavefield T90: 0.8W - 1.9E - 4.8E - 13E - 16E - 19.2E - 23.5E - 26E - 33E - 39E - 42E - 45E on EMP Centauri DiseqC 16/1
Unamed: 13E Quattro - 9E Quattro on IKUSI MS-0916

Re: Picons by 'Service name'. #12 ims

  • PLi® Core member
  • 13,603 posts

+210
Excellent

Posted 13 November 2014 - 19:25

Ok, I must convert filenames same as in python.py.

But when I use generating with same routine as is used now, then I got f.eg.:

 

CBS Reality => eality.png

 

Will not be better then set service name at first to lowercase and not as last operation ?

 

btw, why is "_" excluded ? Would not be better replace "space" in service name with "_" ? Then is better orientation in pycon's names, imho


Edited by ims, 13 November 2014 - 19:27.

Kdo nic nedělá, nic nezkazí!

Re: Picons by 'Service name'. #13 littlesat

  • PLi® Core member
  • 56,123 posts

+685
Excellent

Posted 13 November 2014 - 19:31

I suggest it is better to use al less as possible and not use a underscore... The less you pass the more the chance a picon could be found and the names are still unique.
But as it is made now I'm afraid we still need to add star,plus etc.... As they are excluded

Edited by littlesat, 13 November 2014 - 19:34.

WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: Picons by 'Service name'. #14 ims

  • PLi® Core member
  • 13,603 posts

+210
Excellent

Posted 13 November 2014 - 19:39

Ok. 

 

About "CBS Reality => eality.png"  ... I must use conversion little reversed ... I am creating name from Service reference, I do not reading name... :D  => at first I must set it into lower.


Kdo nic nedělá, nic nezkazí!

Re: Picons by 'Service name'. #15 littlesat

  • PLi® Core member
  • 56,123 posts

+685
Excellent

Posted 13 November 2014 - 19:46

Here CBS Reality becomes cbsreality.png ???


WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: Picons by 'Service name'. #16 ims

  • PLi® Core member
  • 13,603 posts

+210
Excellent

Posted 13 November 2014 - 19:51

When I set it to lower at first, then it is created as cbsreality.png

name = re.sub('[^a-z0-9]', '', name).replace('&', 'and').replace('+', 'plus').replace('*', 'star').lower()

it must be set to .lower() at first,  imho. If not, then are all Upercase dropped.


Kdo nic nedělá, nic nezkazí!

Re: Picons by 'Service name'. #17 littlesat

  • PLi® Core member
  • 56,123 posts

+685
Excellent

Posted 13 November 2014 - 19:54

Not here????????????

 

import re
name = "CBS Reality"
name = re.sub('[^a-z0-9]', '', name.replace('&', 'and').replace('+', 'plus').replace('*', 'star').lower())
print name

Edited by littlesat, 13 November 2014 - 19:56.

WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: Picons by 'Service name'. #18 littlesat

  • PLi® Core member
  • 56,123 posts

+685
Excellent

Posted 13 November 2014 - 19:57

Oeps.... typo in the commit and not in the prototype.... ;)


Edited by littlesat, 13 November 2014 - 20:06.

WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: Picons by 'Service name'. #19 ims

  • PLi® Core member
  • 13,603 posts

+210
Excellent

Posted 13 November 2014 - 20:04

in plugin:

serviceName = "CBS Reality"
serviceName = unicodedata.normalize('NFKD', unicode(serviceName, 'utf_8')).encode('ASCII', 'ignore')
print "---------", serviceName
serviceName = re.sub('[^a-z0-9]', '', serviceName).replace('&', 'and').replace('+', 'plus').replace('*', 'star').lower()
print "+++++++++", serviceName

output:

--------- CBS Reality
+++++++++ eality


Kdo nic nedělá, nic nezkazí!

Re: Picons by 'Service name'. #20 littlesat

  • PLi® Core member
  • 56,123 posts

+685
Excellent

Posted 13 November 2014 - 20:06

Is already fixed.... 


WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W



1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users