mirror of
https://github.com/owntone/owntone-server.git
synced 2024-12-24 06:05:56 -05:00
Allow empty playlists
This commit is contained in:
parent
9727812201
commit
d9d0acd412
@ -897,8 +897,10 @@ DAAP_BLOCK *daap_response_playlist_items(unsigned int playlist, char* metaStr, c
|
||||
henum=db_playlist_items_enum_begin(playlist);
|
||||
}
|
||||
|
||||
/* we can allow an empty playlist...
|
||||
if(!henum)
|
||||
return NULL;
|
||||
*/
|
||||
|
||||
root=daap_add_empty(NULL,"apso");
|
||||
if(root) {
|
||||
|
@ -923,8 +923,14 @@ ENUMHANDLE db_playlist_items_enum_begin(int playlistid) {
|
||||
* Walk to the next entry
|
||||
*/
|
||||
MP3FILE *db_enum(ENUMHANDLE *current) {
|
||||
MP3HELPER* helper = *(MP3HELPER**) current;
|
||||
MP3RECORD* record = helper->next;
|
||||
MP3HELPER* helper;
|
||||
MP3RECORD* record;
|
||||
|
||||
if(!current)
|
||||
return 0;
|
||||
|
||||
helper = *(MP3HELPER**) current;
|
||||
record = helper->next;
|
||||
|
||||
if(helper->next == 0)
|
||||
return 0;
|
||||
@ -963,9 +969,14 @@ int db_playlist_enum(ENUMHANDLE* handle) {
|
||||
* walk to the next entry
|
||||
*/
|
||||
int db_playlist_items_enum(ENUMHANDLE* handle) {
|
||||
DB_PLAYLISTENTRY **current = (DB_PLAYLISTENTRY**) handle;
|
||||
DB_PLAYLISTENTRY **current;
|
||||
int retval;
|
||||
|
||||
if(!handle)
|
||||
return -1;
|
||||
|
||||
current = (DB_PLAYLISTENTRY**) handle;
|
||||
|
||||
if(*current) {
|
||||
retval = (*current)->id;
|
||||
*current=(*current)->next;
|
||||
|
Loading…
Reference in New Issue
Block a user