summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/quvi.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/core/quvi.c b/core/quvi.c
index 697b3736d4..e300e2dd03 100644
--- a/core/quvi.c
+++ b/core/quvi.c
@@ -26,12 +26,18 @@
struct mp_resolve_result *mp_resolve_quvi(const char *url, struct MPOpts *opts)
{
QUVIcode rc;
+ bool mp_url = false;
quvi_t q;
rc = quvi_init(&q);
if (rc != QUVI_OK)
return NULL;
+ if (!strncmp(url, "mp_", 3)) {
+ url += 3;
+ mp_url = true;
+ }
+
// Don't try to use quvi on an URL that's not directly supported, since
// quvi will do a network access anyway in order to check for HTTP
// redirections etc.
@@ -65,8 +71,12 @@ struct mp_resolve_result *mp_resolve_quvi(const char *url, struct MPOpts *opts)
char *val;
- if (quvi_getprop(m, QUVIPROP_MEDIAURL, &val) == QUVI_OK)
- result->url = talloc_strdup(result, val);
+ if (quvi_getprop(m, QUVIPROP_MEDIAURL, &val) == QUVI_OK) {
+ if (mp_url)
+ result->url = talloc_asprintf(result, "mp_%s", val);
+ else
+ result->url = talloc_strdup(result, val);
+ }
if (quvi_getprop(m, QUVIPROP_PAGETITLE, &val) == QUVI_OK)
result->title = talloc_strdup(result, val);