mpv/DOCS
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
..
man player: make all autoload extensions configurable 2023-08-26 00:33:00 +00:00
client-api-changes.rst DOCS/client-api-changes.rst: move mpv_del_property to 0.36.0 2023-02-21 17:07:57 +00:00
compatibility.rst
compile-windows.md DOCS/compile-windows.md: update MSYS2 packages 2023-01-28 01:03:12 +00:00
contribute.md DOCS/contrinute: add commit title example prefixes 2021-08-15 22:15:27 +03:00
edl-mpv.rst
encoding.rst DOCS/encoding: remove the legacy option syntax 2022-07-07 21:12:57 -04:00
interface-changes.rst player: make all autoload extensions configurable 2023-08-26 00:33:00 +00:00
mplayer-changes.rst DOCS: convert mpv.io and github links to https 2021-08-17 13:42:21 +00:00
release-policy.md DOCS/release-policy.md: add additional advice 2023-07-17 11:55:45 +02:00
tech-overview.txt various: fix typos 2022-04-25 09:07:18 -04:00