[mythtv-users] ANNOUNCE: mythalsig v2.3 (Icon/Logo grabber)

Stephen Boddy stephen.boddy at btinternet.com
Thu May 11 22:44:48 EDT 2006


On Thursday 11 May 2006 20:47, Cougar wrote:
> Some more ideas what to improve of change (I try to learn python as mucha
> as possible to make such changes myself but it takse some time ;-)

Well, welcome to the wonderful world of Python. However, I hope you don't read 
too much into my code. I enjoy writing stuff in Python, but it's probably 
full of bad decisions :-)

> * add command line option to skip web download. I have very long region
> list because of satellite (at least as long sat regions are not
> implemented). Right now it has already 25 country codes and I still miss
> some programs that are not country specific (like programs from sat
> provider) or I just don't know their origin yet

Not sure what you're getting at here. You have to do at least one web download 
to at least get the initial data set. If you want to reduce the subsequent 
downloads, just increase the value of web_cache_period and/or 
icon_cache_period to suit. You can set it for 60 days if you want, and it'll 
very rarely pull new information from the web.

> * Use the same channel index even when channel list is entered. Right now
> I get with --info something like this:
>
> ...
> [503/521] 8506: LibertyTV FR         LibertyTV FR
> [504/521] 8505: QVC Deutschland      QVC Deutschland
> [505/521] 8504: Astra Vision         Astra Vision
> [506/521] 8503: Primetime            Primetime
> ...
>
> but when I run mythalsig with "--list 504,506-521" it asks such channels:
>
> --Channel ID:
> 8505---------------------------------------------------[001/017]-- Name:
> QVC Deutschland
> --Channel ID:
> 8503---------------------------------------------------[002/017]-- Name:
> Primetime
> --Channel ID:
> 8502---------------------------------------------------[003/017]-- Name:
> RTL TELE Letzebuerg
> ...
>
> When I miss some channel or enter wrong number then I can't use shown
> index any more to restart process from point where I made a mistake but
> should check info again or calculate position manually.
>
> I know that this total number comes from SQL result and position is just a
> counter but maybe somebody has a good idea how to show "absolute" database
> position here as well.

A different approach will work here. Instead of filtering the channels that 
come from the database, I can just skip over any not in the list when doing 
the main user input loop (same with the new unassigned feature). This way 
you'll have consistant numbers barring the difference that specifying a 
sourceid would cause.

Of course the idea of the [003/017] readout was originally so you had an 
indication of progress. So I'll have to account for that somehow. How about:

--Channel ID: 8503 (506)-------------------------------------------[002/017]--
        Name: RTL TELE Letzebuerg

You have the channel ID, the index, then on the right you have the progress.
And with no lists:

--Channel ID: 8503 (506)-------------------------------------------[506/521]--
        Name: RTL TELE Letzebuerg

One other approach would be to not use internal indexs and use the channel ids 
to specifiy lists, i.e:
--list 8503,8505-8550

Meaning no changes to the current header. Let me know what you think.

I've added this one to the list for after I've refactored that big ugly 
Matcher.assign_icons method.

Cheers
-- 
Steve Boddy


More information about the mythtv-users mailing list