core/tags/artist: Add a pointer to store a playlist
Similar to the library tag, this is a void pointer that should only be used by the playlist layer. Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
This commit is contained in:
parent
938bbc92f2
commit
e41f554b2e
|
@ -14,6 +14,7 @@ static struct artist *__artist_alloc(gchar *name)
|
|||
dbe_init(&artist->ar_dbe, artist);
|
||||
artist->ar_name = name;
|
||||
artist->ar_lower = string_lowercase(name);
|
||||
artist->ar_playlist = NULL;
|
||||
|
||||
return artist;
|
||||
}
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
struct artist {
|
||||
gchar *ar_name; /* This artist's name. */
|
||||
gchar *ar_lower; /* This artist's name (lowercased). */
|
||||
void *ar_playlist; /* This artist's associated playlist. */
|
||||
struct db_entry ar_dbe;
|
||||
};
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@ static void test_verify_empty(struct artist *artist)
|
|||
const struct db_ops *artist_ops = test_artist_ops();
|
||||
test_equal(artist->ar_name, "");
|
||||
test_equal(artist->ar_lower, "");
|
||||
test_equal(artist->ar_playlist, NULL);
|
||||
test_equal(artist_ops->dbe_key(&artist->ar_dbe), "");
|
||||
}
|
||||
|
||||
|
@ -17,6 +18,7 @@ static void test_verify_koji(struct artist *artist)
|
|||
const struct db_ops *artist_ops = test_artist_ops();
|
||||
test_equal(artist->ar_name, "Koji Kondo");
|
||||
test_equal(artist->ar_lower, "koji kondo");
|
||||
test_equal(artist->ar_playlist, NULL);
|
||||
test_equal(artist_ops->dbe_key(&artist->ar_dbe), "Koji Kondo");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue