[mythtv] Re: [patch]building a tree for video{tree|gallery}

thor mythtv at lamedomainname.com
Tue Sep 28 18:44:45 EDT 2004


On Tuesday 28 September 2004 02:42 am, Leo Weppelman wrote:

> > It is my first major c++ project, so beware ;-) Thor was willing to
> > preview it, but he didn't have the time to actually do it. So we decided
> > to throw it on this list.

	And look who ends up responding, eventually ....

	In general, it's definitely moving in the right direction. One thing, the 
buildVideoList() is a little rambling. Would probably be clearer (at least to 
me) to break it out into separate methods that are called for file_browser 
TRUE | FALSE. Might also be possible for those two methods to call common 
bits of code, dunno.

> >
> > There is one 'bug' in the code that I know of, but have no fix for yet:
> >    In the videotree, you now see the 'updir's popping up. They have no
> >    in this view. But I couldn't find an easy way to suppress them. An
> >    opion would be to pass a flag to videolist::buildVideoList() to
> >    not include them. But that would be harmfull to the next item...
> >

	Well, first though is that the tree never needs a node that means "up", 
because it's inherent in the notion of a tree. The root node(s) have no up, 
everything else does. Of course, that would mean slight changes in the way 
the views work, but nothing too extreme. That make sense?

> > Another thing that is missing is actually an idea from Thor, that it
> > would be nice to be able to pass the tree around between the various
> > views without the need to rebuild it. I haven't implemented it, because I
> > could not find a good way to do it and because the current patch is
> > already pretty big.

	One fairly straightforward way to do this would be to pass trees to the views 
in their constructors. If the tree is null, they build it, otherwise, they 
just use what they've been handed.

	If you can keep at it, would be really nice to keep proceeding in this 
direction. You probably also want to watch for any responses from J. Donavan 
Stanley, as he's done the bulk of the work on MythVideo recently and 
understands how the current code works better than I do.

- thor


More information about the mythtv-dev mailing list