Mercurial > mplayer.hg
diff gui/util/list.c @ 35460:7d1d7f783975
Add listMgr command PLAYLIST_ITEM_FIND.
Search for a specific entry in the list.
author | ib |
---|---|
date | Sun, 02 Dec 2012 00:42:13 +0000 |
parents | 2a6113c08e20 |
children | 58a221f73d75 |
line wrap: on
line diff
--- a/gui/util/list.c Sun Dec 02 00:38:14 2012 +0000 +++ b/gui/util/list.c Sun Dec 02 00:42:13 2012 +0000 @@ -96,6 +96,21 @@ } else return listMgr(PLAYLIST_ITEM_APPEND, pdat); + case PLAYLIST_ITEM_FIND: + + if (plList) { + plItem *item = plList; + + do { + if (gstrcmp(item->path, pdat->path) == 0 && gstrcmp(item->name, pdat->name) == 0) + return item; + + item = item->next; + } while (item); + } + + return NULL; + case PLAYLIST_ITEM_SET_CURR: plCurrent = pdat;