1
0
mirror of https://github.com/mpv-player/mpv synced 2025-02-21 15:27:00 +00:00
mpv/DOCS/man
Dudemanguy 32be72623b player: make all autoload extensions configurable
--audio-file-auto, --cover-art-auto, and --sub-auto all work by using an
internally hardcoded list that determine what file extensions get
recognized. This is fine and people periodically update it, but we can
actually expose this as a stringlist option instead. This way users can
add or remove any file extension for any type. For the most part, this
is pretty pretty easy and involves making sub_exts, etc. the defaults
for the new options (--audio-file-auto-exts, --cover-art-auto-exts, and
--sub-auto-exts). There's actually one slight complication however. The
input code uses mp_might_be_subtitle_file which guesses if the file drag
and dropped file is a subtitle. The input ctx has no access to mpctx so
we have to be clever here.

For this, the trick is to recognize that we can leverage the
m_option_change_callback. We add a new flag, UPDATE_SUB_EXTS, which
fires when the player starts up. Then in the callback, we can set the
value of sub_exts in external_files to opts->sub_auto_exts. Whenever the
option updates, the callback is fired again and sub_exts updates. That
way mp_might_be_subtitle_file can just operate off of this global
variable instead of trying to mess with the core mpv state directly.

Fixes #12000.
2023-08-26 00:33:00 +00:00
..
af.rst various: remove trailing whitespace 2022-05-14 14:51:34 +00:00
ao.rst ao_pipewire: clarify --pipewire-buffer=native 2023-04-23 21:03:58 -07:00
changes.rst manpage: directly link interface-changes.rst in changelog section 2020-02-21 14:34:02 +01:00
console.rst console.lua: add a script-opt for the border size 2023-04-26 16:30:01 +00:00
encode.rst manpage: explain deprecated usage of multiple items with *-add 2020-01-07 18:13:12 +01:00
input.rst player: add playlist-path properties 2023-08-13 19:58:20 +00:00
ipc.rst DOCS: Add missing 'not' 2023-01-28 11:59:59 -05:00
javascript.rst lua/js: remove user-data helpers 2023-01-29 01:52:31 +02:00
libmpv.rst DOCS/libmpv: fix typo in linkage section 2022-09-03 12:54:48 -04:00
lua.rst DOCS/lua: fix typo 2023-03-21 15:49:42 +02:00
mpv.rst DOCS/mpv: document ZOOMIN & ZOOMOUT multimedia keys 2023-08-23 15:37:02 +02:00
options.rst player: make all autoload extensions configurable 2023-08-26 00:33:00 +00:00
osc.rst osc: support speed-independent time-remaiing display 2023-08-11 14:30:42 +03:00
stats.rst stats.lua: set sans-serif as default font 2023-07-10 16:58:54 +02:00
vf.rst vf_vapoursynth: save display resolution as a variable 2023-08-13 19:58:20 +00:00
vo.rst DOCS/vo: clarify dmabuf-wayland a bit 2023-07-23 04:55:26 +00:00