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

Leo Weppelman leo at wau.mis.ah.nl
Fri Oct 1 17:54:28 EDT 2004


On Fri, Oct 01, 2004 at 07:43:57AM +0200, Leo Weppelman wrote:
> On Thu, Sep 30, 2004 at 04:14:36PM -0400, thor wrote:
> > On Thursday 30 September 2004 02:59 pm, Leo Weppelman wrote:
> > 
> > > I haven't yet figured it out, but... Would it be an idea to drop the
> > > updirs in the gallery mode and just use the quit-key (escape) to go
> > > up one level?
> > 
> >  In the gallery code, you can ask the current level of the tree if it has
> > a grandparent. If it does, you put in an "up level" icon.
> 
> Yes, I understand that. The problem is not so much the condition of when to
> add an updir. The problem is how to get it displayed, while keeping the
> tree clean of it ;-)
> 
> If the tree returned by the videoList class is to be re-used, the sub-clases
> using it should not modify it...right?
> 
> Currently, I see the following options to attack this problem:
>   1) Provide a method to add/remove updirs in the videoList class
>   2) have the classes that need updirs insert/remove them themselves.
>      What I mean is that when the gallery code enters a subdirectory that
>      should have an updir-node it can add one to the tree. Removal should
>      be done when leaving that level.
>      I don't really like it much it sounds messy and error prone, but
>      can be made to work ;-)
>   3) Do not add an entry to the tree, but fake one on display time.
>      I have been looking at this, but I got lost in a maze of twisty
>      UI-passages...
> 
> So I was planning to investigate solution 1 today ;-)

Ok, solution 1 wasn't very hard to implement. A new patch is attached. I
Also ripped apart de buildVideoList() function as suggested earlier and
removed some debug left-over's. Also added is a check on the parental level
in case the data was read from the filesystem, but meta-data could be
retrieved from the database.

Leo.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: diff-videolist-20041001.gz
Type: application/x-gunzip
Size: 9157 bytes
Desc: not available
Url : http://mythtv.org/pipermail/mythtv-dev/attachments/20041001/9270e3e0/diff-videolist-20041001.bin


More information about the mythtv-dev mailing list