Aubin Paul wrote:
That function is already in 'tv.py'
and it's called:
def get_friendly_channel(channel_id)

Ok, I missed that because I'm working on a branch of that file. I see you used config.TV_CHANNELS which is less work than what I have done (loading the guide). However, aren't there cases where the user has [] in TV_CHANNELS?


I think it would be best if functions like this lived in utility modules (if they are generic enough) as not to import unneccessary modules for worker functions. Also I can't use get_friendly_channel because it creates an AlertBox but that won't be good for record_server and webserver.

So, do you think we could do something like one of these ramblings?

1) In tv.py:

def get_friendly_channel(channel_id):
    channel_name = tv_util.get_chan_displayname(channel_id)

    if not channel_name:
        AlertBox(text='Could not find TV channel %s' % channel_id).show()
    return channel_name

2) If where you call get_friendly_channel (assuming it is only one or two places) call tv_util.get_chan_displayname and create the AlertBox there?

Now, what is 'best', using TV_CHANNELS for this info or the guide? Are there any tradeoffs? Loading the guide seems pretty fast on my end (even calling it repetively) but might it be slow for some? If TV_CHANNELS is empty its usage would fail. On the contrary TV_CHANNELS is even more neccessary now that xmltv has zap2it.com strings all over the place.

-Rob



On Sun, Jul 06, 2003 at 12:27:04PM -0700, [EMAIL PROTECTED] wrote:


Update of /cvsroot/freevo/freevo/src/tv
In directory sc8-pr-cvs1:/tmp/cvs-serv18019

Modified Files:
tv_util.py Log Message:
Add a function to get the display name of a program's channel. Using this
helps with recent xmltv changes.



------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01 _______________________________________________ Freevo-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freevo-devel

Reply via email to