m_playlist_new: Store input URL in unescaped form
authorToni Gundogdu <legatvs@gmail.com>
Mon, 14 Oct 2013 13:12:25 +0000 (14 16:12 +0300)
committerToni Gundogdu <legatvs@gmail.com>
Tue, 15 Oct 2013 14:37:03 +0000 (15 17:37 +0300)
Signed-off-by: Toni Gundogdu <legatvs@gmail.com>
src/misc/playlist.c

index a338603..c670025 100644 (file)
 /* -- */
 #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);
 }