From 32d207e47075ce211efd6074b5d574111a529362 Mon Sep 17 00:00:00 2001 From: Pierre Ynard Date: Fri, 28 Jan 2011 02:07:08 +0100 Subject: [PATCH] ncurses: use make_URI() when adding item --- modules/gui/ncurses.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/modules/gui/ncurses.c b/modules/gui/ncurses.c index 2645eac550..33087e013e 100644 --- a/modules/gui/ncurses.c +++ b/modules/gui/ncurses.c @@ -1516,6 +1516,13 @@ static void HandleEditBoxKey(intf_thread_t *p_intf, int key, int box) } else if (len) { + char *psz_uri = make_URI(p_sys->psz_open_chain, NULL); + if (psz_uri == NULL) + { + p_sys->i_box_type = BOX_PLAYLIST; + return; + } + playlist_t *p_playlist = pl_Get(p_intf); playlist_item_t *p_parent = p_sys->p_node, *p_current; @@ -1532,11 +1539,12 @@ static void HandleEditBoxKey(intf_thread_t *p_intf, int key, int box) p_parent = p_parent->p_parent; PL_UNLOCK; - playlist_Add(p_playlist, p_sys->psz_open_chain, NULL, + playlist_Add(p_playlist, psz_uri, NULL, PLAYLIST_APPEND|PLAYLIST_GO, PLAYLIST_END, p_parent->p_input == p_playlist->p_local_onelevel->p_input, false); + free(psz_uri); p_sys->b_plidx_follow = true; } p_sys->i_box_type = BOX_PLAYLIST; -- 2.39.2