From: Toni Gundogdu Date: Mon, 14 Oct 2013 13:12:25 +0000 (+0300) Subject: m_playlist_new: Store input URL in unescaped form X-Git-Tag: v0.9.4~4^2~7 X-Git-Url: https://repo.or.cz/w/libquvi.git/commitdiff_plain/c312f9aa2d61cffb93fd28b3b2056b383c7ea8ff m_playlist_new: Store input URL in unescaped form Signed-off-by: Toni Gundogdu --- diff --git a/src/misc/playlist.c b/src/misc/playlist.c index a338603..c670025 100644 --- a/src/misc/playlist.c +++ b/src/misc/playlist.c @@ -29,19 +29,30 @@ /* -- */ #include "misc/playlist.h" #include "misc/slst.h" +#include "misc/url.h" gpointer m_playlist_new(_quvi_t q, const gchar *url) { - _quvi_playlist_t qp = g_new0(struct _quvi_playlist_s, 1); - /* URL */ + _quvi_playlist_t qp; + gchar *u; + + qp = g_new0(struct _quvi_playlist_s, 1); + qp->url.thumbnail = g_string_new(NULL); - qp->url.input = g_string_new(url); - /* ID */ qp->id.playlist = g_string_new(NULL); - /* Handle */ - qp->handle.quvi = q; - /* Other */ + + /* + * Store the input URL in the unescaped form which is what the `ident' + * functions of the scripts expect when the support check is run + * offline. + */ + u = m_url_unescaped_form(url); + qp->url.input = g_string_new(u); + g_free(u); + qp->title = g_string_new(NULL); + qp->handle.quvi = q; + return (qp); }