[vlc-devel] playlist: flat / tree separation

Jean-Baptiste Kempf jb at videolan.org
Sat Aug 22 17:01:48 CEST 2009

On Sat, Aug 22, 2009 at 04:26:40PM +0200, Jakob Leben wrote :
> On Sat, Aug 22, 2009 at 1:47 AM, Jean-Baptiste Kempf <jb at videolan.org>wrote:
> > So, do we need flat views? yes
> > Do we need trees views? very likely, in some situations, like Services
> > Do we need trees for current playlist? possibly not, but if you
> > implement it for Services, how is it different now?
> >
> > Could they be the same internally (trees) and flat would just be the
> > view, when required?
> >
> I am sorry, maybe I am missing a point, but I still don't understand why we
> need flat views of tree data? When you need to display a flat presentation
I didn't say that: I said that the use case where you add a few folders
in the playlist should be possible to be visible TO the user like a flat playlist.

> of a portion of data that is otherwise stored in a tree structure, then you
> take copies of data from the tree structure and put those copies together
> into a list and then present the list. What you did is you didn't only
> display data in a list form, but you created new data which is now in a list
> structure and then you displayed it, naturally as a list. And all structural
> operations exhibited on that list shall be exhibited on that exact list
> structure and only on it, not on the original data which you copied from the
> tree structure.

You are totally missing the point here, you are answering a technical way to a
"need" mail and a "use case" mail.

> On Sat, Aug 22, 2009 at 1:47 AM, Jean-Baptiste Kempf <jb at videolan.org>wrote:
> >  - Playlists are playlists, and people want to sort and rearrange
> >   them... Which is difficult to do in a tree-view.
> >   1) We need flat views
> Why do we need flat views again?
When you add various folders with various subfolder to your current
playlist, most people expect to see a flat view, like in iTunes, or Winamp.

> Why is sorting and rearranging difficult in a tree view?
When you sort by metadata a playlist that is composed by folders you
need to sort across subtrees, which isn't trivial. It is not difficult,
but not trivial.

>We have it working and it's nice.
Re-read my mail, I never said that we didn't have it the good way so

> I still think the playlist could be possibly forced flat, but the reason
> would not be difficulty of sorting and rearranging, but only one solely
> tradition and common sense as to what a playlist is supposed to mean (media
> items that follow each other in time - no notion of parent-child
> relationships)
I don't see how you oppose what I said here.

> On Sat, Aug 22, 2009 at 1:47 AM, Jean-Baptiste Kempf <jb at videolan.org>wrote:
> > Sorting is done by the core (core must know what to play next),
> > and moving items can be tricky, (because of trees rendered in flat).
> And once again. Why should be have those trees rendered in flat? Scenario:
> you wanna search for data which is stored in a tree structure, you prefer to
> have the search results in a list instead, and you get it in a list, but
> what you should get is a COPY of the (relevant, searched-for) data from the
> tree strcuture and operations shall be exhibit only on that copy. Equally:
> why would you ever want to present tree structured data in a list, and then
> carry out on the tree structure the operations which are requested on the
> structurally different displayed data? Why, if we can avoid it? If a user
> wants to have a flat playlist, then in his instance of VLC the data is also
> STORED in a list, why should it be stored as a tree instead? For whom
> (what)?
Once again, you are answering in a technical way to a "use-case" mail.

 From a user point of view, I DON'T care about how you store the trees
 or how you copy them. And my last mail was just about user PoV.

What I just said is that if you add folders (or any other item with
sub-items) to your playlist is that most people expect it to be flat
and when you sort, you  expect the sort to happen on all subitems,
regardless of their parent. I never said that we would need to keep the trees
behind. In fact, I never said anything about what should happen behind.

I am not sure we are speaking about the same thing, in fact.

Best Regards,

Jean-Baptiste Kempf

More information about the vlc-devel mailing list