# HG changeset patch # User ib # Date 1367237403 0 # Node ID d4056035c260f720f228d013b90700eaa475664d # Parent 6500c354cd2ca93d355c272aa6640fce38a1f569 Set file prior to adding to the URL list. An already existing URL list item won't be added, but the allocated url string will be freed (which thus can't be uiSetFile() nor be added to the playlist). diff -r 6500c354cd2c -r d4056035c260 gui/dialog/url.c --- a/gui/dialog/url.c Mon Apr 29 12:03:51 2013 +0000 +++ b/gui/dialog/url.c Mon Apr 29 12:10:03 2013 +0000 @@ -61,13 +61,14 @@ } if (str) { + uiSetFile(NULL, str, STREAMTYPE_STREAM); + listMgr(PLAYLIST_DELETE, 0); + add_to_gui_playlist(str, PLAYLIST_ITEM_APPEND); + item = calloc(1, sizeof(urlItem)); item->url = str; listMgr(URLLIST_ITEM_ADD, item); - uiSetFile(NULL, str, STREAMTYPE_STREAM); - listMgr(PLAYLIST_DELETE, 0); - add_to_gui_playlist(str, PLAYLIST_ITEM_APPEND); guiInfo.NewPlay = GUI_FILE_NEW; uiEvent(evPlay, 0); }