From 85bb67feedef7ec1012b87794d7a76b8f125acf4 Mon Sep 17 00:00:00 2001 From: Anna Schumaker Date: Mon, 22 Aug 2016 09:15:22 -0400 Subject: [PATCH] core/playlist: Add a private field to struct playlist I intend to use this for playlist filtering to store filter text. Signed-off-by: Anna Schumaker --- core/playlists/generic.c | 1 + include/core/playlists/type.h | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/core/playlists/generic.c b/core/playlists/generic.c index c0b1ec15..fdeda6bd 100644 --- a/core/playlists/generic.c +++ b/core/playlists/generic.c @@ -38,6 +38,7 @@ void playlist_generic_init(struct playlist *playlist, unsigned int flags, queue_sort(&playlist->pl_queue, COMPARE_ARTIST, true); queue_sort(&playlist->pl_queue, COMPARE_YEAR, false); queue_sort(&playlist->pl_queue, COMPARE_TRACK, false); + playlist->pl_private = NULL; } bool playlist_generic_can_select(struct playlist *playlist) diff --git a/include/core/playlists/type.h b/include/core/playlists/type.h index 50bfec4d..3619c9f1 100644 --- a/include/core/playlists/type.h +++ b/include/core/playlists/type.h @@ -19,9 +19,10 @@ enum playlist_type_t { struct playlist { - enum playlist_type_t pl_type; /* This playlist's type. */ - gchar *pl_name; /* This playlist's name. */ - struct queue pl_queue; /* This playlist's queue of tracks. */ + enum playlist_type_t pl_type; /* This playlist's type. */ + gchar *pl_name; /* This playlist's name. */ + void *pl_private; /* This playlist's private data. */ + struct queue pl_queue; /* This playlist's queue of tracks. */ };