# HG changeset patch # User ib # Date 1364172268 0 # Node ID df731f25759e1b9b010f51b9cd8ef2ad2c746399 # Parent 373c1104023f43b6b8bf6fec8a58fed96439b7d6 Add new listMgr command PLAYLIST_ITEM_GET_LAST. Patch by Hans-Dieter Kosch, hdkosch kabelbw de. diff -r 373c1104023f -r df731f25759e gui/util/list.c --- a/gui/util/list.c Sun Mar 24 15:15:26 2013 +0000 +++ b/gui/util/list.c Mon Mar 25 00:44:28 2013 +0000 @@ -165,6 +165,19 @@ return NULL; + case PLAYLIST_ITEM_GET_LAST: + + if (plList) { + plItem *item = plList; + + while (item->next) + item = item->next; + + return item; + } + + return NULL; + case PLAYLIST_ITEM_DEL_CURR: if (plCurrent) { diff -r 373c1104023f -r df731f25759e gui/util/list.h --- a/gui/util/list.h Sun Mar 24 15:15:26 2013 +0000 +++ b/gui/util/list.h Mon Mar 25 00:44:28 2013 +0000 @@ -30,6 +30,7 @@ PLAYLIST_ITEM_GET_POS, PLAYLIST_ITEM_GET_PREV, PLAYLIST_ITEM_GET_NEXT, + PLAYLIST_ITEM_GET_LAST, PLAYLIST_ITEM_DEL_CURR, PLAYLIST_DELETE, URLLIST_GET,