quvi: add option to not fetch subtitles

Signed-off-by: wm4 <wm4@nowhere>
This commit is contained in:
Andre D 2014-01-05 16:21:08 -05:00 committed by wm4
parent 61ed9a8747
commit 14fdbe07ac
4 changed files with 11 additions and 1 deletions

View File

@ -1746,6 +1746,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

View File

@ -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.,

View File

@ -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;

View File

@ -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)) {