[mythtv] [mythtv-commits] mythtv commit: r10078 by ijr

Isaac Richards ijr at case.edu
Wed May 31 21:18:46 UTC 2006

On Wednesday 31 May 2006 8:43 am, Colin Guthrie wrote:
> Simon Kenyon wrote:
> > Colin Guthrie wrote:
> >>The db schema is much neater (tho' the playlists is still a string list
> >>of song_id's)
> >
> > do you plan to change that?
> > and if so, to what?
> >
> > perhaps a table containing the playlist name and a single song id which
> > you could iterate over
> I did originally plan on changing it to a table defining the playlist
> (auto-id + name) and a link table that contained (pl_id, song_id, order
> {as db order cannot be guarenteed - especially for reordering etc.}).

I dislike schemas like this.  Leads to more database hits/work during editing, 
which ends up getting slow.

> However as I dug into the code I discovered a feature I didn't know
> about which is that playlists can contain other playlists in them
> (provided no circular dependancy is created overall).
> In order to do this, they use negative numbers as song_ids in the
> current database and the code is littered with "if (id < 1)" type
> conditions. It's not very easy to understand but it does work.

Playlists containing other playlists is an absolute requirement.


More information about the mythtv-dev mailing list