diff options
author | Andre D <andre@andred.ca> | 2014-01-05 16:21:08 -0500 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-01-05 23:07:34 +0100 |
commit | 7c425fb71f89fca945363fb49007a5a70e824016 (patch) | |
tree | 125470880382a1a7f94889b337f5122086734177 | |
parent | 5819f4b7c9e65a2b73caa4f544dbbd97e3f21c93 (diff) |
quvi: add option to not fetch subtitles
Signed-off-by: wm4 <wm4@nowhere>
-rw-r--r-- | DOCS/man/en/options.rst | 7 | ||||
-rw-r--r-- | options/options.c | 2 | ||||
-rw-r--r-- | options/options.h | 1 | ||||
-rw-r--r-- | stream/resolve/resolve_quvi9.c | 2 |
4 files changed, 11 insertions, 1 deletions
diff --git a/DOCS/man/en/options.rst b/DOCS/man/en/options.rst index bf038f5d01..d582c5c55c 100644 --- a/DOCS/man/en/options.rst +++ b/DOCS/man/en/options.rst @@ -1743,6 +1743,13 @@ OPTIONS Also see ``--really-quiet`` and ``--msglevel``. +``--quvi-fetch-subtitles=<yes|no>`` + Toggles fetching of subtitles from streaming sites with libquvi. + + Supported in libquvi 0.9.x. + + Enabled by default + ``--quvi-format=<best|default|...>`` Video format/quality that is directly passed to libquvi (default: ``best``). This is used when opening links to streaming sites like YouTube. The diff --git a/options/options.c b/options/options.c index a92ace3ec0..d52672cde1 100644 --- a/options/options.c +++ b/options/options.c @@ -316,6 +316,7 @@ const m_option_t mp_opts[] = { ({"no", 0}, {"attachment", 1})), OPT_STRING("quvi-format", quvi_format, 0), + OPT_FLAG("quvi-fetch-subtitles", quvi_fetch_subtitles, 0), #if HAVE_CDDA { "cdda", (void *)&cdda_opts, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL}, @@ -718,6 +719,7 @@ const struct MPOpts mp_default_opts = { .sub_visibility = 1, .sub_pos = 100, .sub_speed = 1.0, + .quvi_fetch_subtitles = 1, .audio_output_channels = MP_CHMAP_INIT_STEREO, .audio_output_format = 0, // AF_FORMAT_UNKNOWN .playback_speed = 1., diff --git a/options/options.h b/options/options.h index b4366a2f2e..6b5e1c7392 100644 --- a/options/options.h +++ b/options/options.h @@ -158,6 +158,7 @@ typedef struct MPOpts { int forced_subs_only; int stretch_dvd_subs; char *quvi_format; + int quvi_fetch_subtitles; // subreader.c int suboverlap_enabled; diff --git a/stream/resolve/resolve_quvi9.c b/stream/resolve/resolve_quvi9.c index 108f1aabb7..7776b7d393 100644 --- a/stream/resolve/resolve_quvi9.c +++ b/stream/resolve/resolve_quvi9.c @@ -111,7 +111,7 @@ struct mp_resolve_result *mp_resolve_quvi(const char *url, quvi_media_free(media); } - if (quvi_supports(q, url, mode, QUVI_SUPPORTS_TYPE_SUBTITLE)) { + if (opts->quvi_fetch_subtitles && quvi_supports(q, url, mode, QUVI_SUPPORTS_TYPE_SUBTITLE)) { mp_info(log, "Getting subtitles...\n"); quvi_subtitle_t qsub = quvi_subtitle_new(q, url); if (mp_quvi_ok(q, log)) { |