[mythtv-users] Great source for channel icons (was --> "http://www.lyngsat-logo.com")

Stephen Boddy stephen.boddy at btinternet.com
Tue Dec 20 18:12:22 EST 2005

On Tuesday 20 December 2005 22:45, Greg Estabrooks wrote:
> > I like the idea of the master list, and I'll have a think of the best
> > way. Probably have to be seperated by country in case there are
> > equivalent channel names with different logos.
>  Yeah that's basically what I was thinking.  A Plain text format with
> something like
> "TEXT" = filename(or URL)
>  Where TEXT could be a callsign or a full station name.
>   For example :
> "WSET" = file1.jpg
> "WSET 13 CityName" = file1.jpg
> "ATV" = file2.jpg
> "ATV Halifax" = http://www.blah.com/logos/file3.jpg

As I'm sure you've sussed out I've included the master list in the main file 
as a dictionary (or hash in perl parlance)

> > getting exact matches. If people have assigned there own names it's
> > likely to be somewhat ineffective.
>  I'm not very familiar with Python

I'm not bad with it, and as you can see it's pretty good for hacking up 
versatile little scripts.

>  but are the matches done on the 
> filename, the station name  or both?  I've had many incidents where I
> didn't get a fuzzy match but where the callsign I was matching against
> should have easily matched either and they aren't found. And yeah I've
> updated the lyngsat_page_count value as well as the country code.

Okay, the name field in the channel table is used as the "search term". A list 
of all the available URL's for icons for a country is built. This is 
basename'd (discards the folder) and splitext'd (to lose the suffix) and a 
list of these stripped down icon filenames is created. This list is what the 
"search term" is tested against for a best match. There is a threshold and a 
max of the 10 best matches.

> For example I'm setting up a box for my uncle which will have a channel
> with the callsign WSET  which would match both the file name
> "http://www.lyngsat-logo.com/logo/tv/ww/wset_abc13_lynchburg.jpg" and the
> station name "WSET 13 Lynchburg" but doesn't find eityher.

Strange, that name should be a good match against the base filename of the 
icon on LS?!?

Does it give you incorrect possibilities? Or is it an empty list? All entries 
get converted to upper case for matching purposes.

Two options. Manuall add an override in the master list. It's the entry in the 
channel.name field to the full URL off of LS. Look at the UK one and you'll 
get the idea.

Otherwise if you need further help I'll have to send one with some basic debug 
lines to figure out what the problem is.

> > BTW, what's the policy on attachments to the mail list? Don't want to be
> > on the receiving end of an Isaac lashing <:-(
>  Can't say I've seen any complaints about small attachments of small
> scripts or patches.  Larger stuff should of course be put up on a webserver
> with a link to it.

Good to know I won't need my flame retardent clothing ;-)
Steve Boddy

More information about the mythtv-users mailing list