diff gui/util/list.c @ 35962:df731f25759e

Add new listMgr command PLAYLIST_ITEM_GET_LAST. Patch by Hans-Dieter Kosch, hdkosch kabelbw de.
author ib
date Mon, 25 Mar 2013 00:44:28 +0000
parents cc6e25e348ee
children 319cbb4d0967
line wrap: on
line diff
--- 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) {