diff options
author | wm4 <wm4@nowhere> | 2012-11-15 19:08:21 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2012-11-16 21:21:15 +0100 |
commit | 1197e13c2f86ea0c521c206fa3412d50587376da (patch) | |
tree | 197e381ab8f62574932fdfd2afd355d7d081b70a | |
parent | 2b851c6ed3de92c22837d44f16e7033e926b72e9 (diff) | |
download | mpv-1197e13c2f86ea0c521c206fa3412d50587376da.tar.bz2 mpv-1197e13c2f86ea0c521c206fa3412d50587376da.tar.xz |
options: rename -sub-fuzziness to -autosub-match, change option values
"--autosub-match" is close to "--autosub", and reflects what this
option does slightly better. Replace the magic number option values
with choices:
--sub-fuzziness=0 becomes --autosub-match=exact
--sub-fuzziness=1 becomes --autosub-match=fuzzy
--sub-fuzziness=2 becomes --autosub-match=all
-rw-r--r-- | DOCS/man/en/changes.rst | 1 | ||||
-rw-r--r-- | DOCS/man/en/options.rst | 16 | ||||
-rw-r--r-- | core/cfg-mplayer.h | 3 |
3 files changed, 11 insertions, 9 deletions
diff --git a/DOCS/man/en/changes.rst b/DOCS/man/en/changes.rst index 5de62fe601..8bd81c1832 100644 --- a/DOCS/man/en/changes.rst +++ b/DOCS/man/en/changes.rst @@ -108,6 +108,7 @@ Command line switches -ss --start -endpos --length --cursor-autohide-delay --cursor-autohide + -sub-fuzziness --autosub-match =================================== =================================== input.conf and slave commands diff --git a/DOCS/man/en/options.rst b/DOCS/man/en/options.rst index 8dd852e6a8..e25a7db4f1 100644 --- a/DOCS/man/en/options.rst +++ b/DOCS/man/en/options.rst @@ -206,7 +206,14 @@ --autosub, --no-autosub Load additional subtitle files matching the video filename. Enabled by - default. See also ``--sub-fuzziness``. + default. See also ``--autosub-match``. + +--autosub-match=<exact|fuzzy|all> + Adjust matching fuzziness when searching for subtitles: + + :exact: exact match + :fuzzy: Load all subs containing movie name. + :all: Load all subs in the current and ``--sub-paths`` directories. --autosync=<factor> Gradually adjusts the A/V sync based on audio delay measurements. @@ -1738,13 +1745,6 @@ will force it, this will skip some checks! Give the demuxer name as printed by ``--sub-demuxer=help``. ---sub-fuzziness=<mode> - Adjust matching fuzziness when searching for subtitles: - - :0: exact match - :1: Load all subs containing movie name. - :2: Load all subs in the current and ``--sub-paths`` directories. - --sub-no-text-pp Disables any kind of text post processing done after loading the subtitles. Used for debug purposes. diff --git a/core/cfg-mplayer.h b/core/cfg-mplayer.h index b5b15df0d1..26649b42f6 100644 --- a/core/cfg-mplayer.h +++ b/core/cfg-mplayer.h @@ -510,7 +510,8 @@ const m_option_t common_opts[] = { // enable Closed Captioning display {"overlapsub", &suboverlap_enabled, CONF_TYPE_FLAG, 0, 0, 2, NULL}, {"sub-no-text-pp", &sub_no_text_pp, CONF_TYPE_FLAG, 0, 0, 1, NULL}, - {"sub-fuzziness", &sub_match_fuzziness, CONF_TYPE_INT, CONF_RANGE, 0, 2, NULL}, + {"autosub-match", &sub_match_fuzziness, CONF_TYPE_CHOICE, 0, + M_CHOICES(({"exact", 0}, {"fuzzy", 1}, {"all", 2}))}, {"font", &font_name, CONF_TYPE_STRING, 0, 0, 0, NULL}, {"subfont", &sub_font_name, CONF_TYPE_STRING, 0, 0, 0, NULL}, {"sub-pos", &sub_pos, CONF_TYPE_INT, CONF_RANGE, 0, 100, NULL}, |