On Sun, Jul 06, 2003 at 06:22:06PM -0300, Rob Shortt wrote:
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?
There shouldn't be, but we should use the faster one if we can, right? Perhaps just checking if TV_CHANNELS is None...
if TV_CHANNELS: <<my way>> else: <<your way>>
Ahh, good idea. Yes we should do it that way.
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.
It's fine by me... Io only put it in because the AlertBox when you schedule a recording was showing: 'C10on10dm.zap2it.com' which isn't very helpful when it should just say "10 ONTV"
I updated my xmltv today and that zap2it.com crap drove me nuts for a while. ;)
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.
Reloading the guide shouldn't take a lot of time, but it's still
slower than using the tuple from config. I figure use the one that's
available, with the config element being faster since it's smaller.
A fallback to parsing the guide is ok too.
Ok, when I get a chance I'll change it to what you had above here and only load the guide if neccessary.
-Rob
------------------------------------------------------- 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