Dirk Meyer wrote:
Rob Shortt wrote:-It still takes too long to enter the guide. Its fast getting the programs form the database but I'm still creating a ProgramItem for every program in the guide. We could: 1) get smaller groups of programs at a time, 2) have something refresh our data in the background, 3) don't keep a persistant list of ProgramItems but rebuild them on a page by page basis by creating them on the fly from frequent DB queries.
2 is the way to go. Look at listing_area.py. For thumbnail listing (image view) the area loads the next menu in background using the notifier callback. One image at a time to make sure it won't stop freevo. 3 is bad, I guess it will be too slow. But maybe combine 2 and 3 like the listing. Get the complete data on guide startup (should be fast), create items for the needed ones and load the next page in each direction in background.
Ok, Ive changed it in such a way that it gets enough data for the scope of the guide plus a bit on either end of start/stop. If you scroll where we have no data it gets another chunk. This seems to work pretty good and is fast here. Please test. No doubt there are some optimizations that can be made.
-do we still need to create an index of the list of ProgramItems for faster access?
No, it was a hack for the tv guide for faster access. I don't think we
still need it.
I've removed it.
-how should we deal with empy data and gaps? Should we use ProgramItems with defaults suitable for manipulating in a manual record interface (30-60 minute chunks)?
After requesting programs from pyepg it checks for gaps or empty data, filling in these gaps with ProgramItems of default length (30 minutes right now). There are a couple issues remaining:
-These default ProgramItems get highlighted together, if they're one on top of the other at least. This probably has to do with the cmp function of ProgramItem.
-If the tvguide requests a chunk of data from start to stop and one of these isn't "on the half hour" we will get a default ProgramItem that has a length of the difference. In my guide I sometimes see a 20 minute 'NO DATA' program followed by a 10 minute one.
Something to keep in mind:
The default ProgramItems have an id of -1 and don't exist in the database. For manual recording we should prompt the user for modifying its properties (title/description, etc) and modifying the stop time because its unlikely all shows are 30 minutes. If the stop time is modified we will have to modify the start time of the next default program or remove it.
Once we have a suitably modified ProgramItem for manual recording we can add it to pyepg which will insert it into the database with a unique id.
I have also added any items of config.TV_CHANNELS to the ChannelList if they don't exist in pyepg.
-Rob
------------------------------------------------------- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl _______________________________________________ Freevo-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freevo-devel