From 9dad4016ef52ae71c0325ea9d078e499c484d51f Mon Sep 17 00:00:00 2001 From: quou Date: Thu, 13 Jun 2024 20:23:37 +1000 Subject: playlists and stuff --- playlist.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 playlist.h (limited to 'playlist.h') diff --git a/playlist.h b/playlist.h new file mode 100644 index 0000000..83d532f --- /dev/null +++ b/playlist.h @@ -0,0 +1,22 @@ +#ifndef playlist_h +#define playlist_h + +#include "config.h" +#include "library.h" + +typedef struct { + char name[32]; + Song* songs[playlist_max]; + int cnt; +} Playlist; + +void init_playlist(Playlist* p); +void playlist_rm(Playlist* p, int i); +void playlist_add(Playlist* p, Song* s); +void playlist_add_first(Playlist* p, Song* s); +void playlist_shuffle(Playlist* p); +void playlist_save(const Playlist* p); +int playlist_load(Library* l, Playlist* p, const char* name); +void get_playlist_dir(char* buf); + +#endif -- cgit v1.2.3-54-g00ecf