mpv/player
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
..
javascript build: remove outdated generated directory 2023-07-31 19:00:06 +00:00
lua stats.lua: display output resolution if it differs to native one 2023-08-18 16:39:35 +02:00
audio.c audio: drain ao before setting pause 2023-08-11 22:28:50 +00:00
client.c options: read config file as stream 2023-04-29 22:34:54 +00:00
client.h
command.c player: make all autoload extensions configurable 2023-08-26 00:33:00 +00:00
command.h player: make deprecated track/chapter/metadata events internal 2021-12-15 12:29:10 +01:00
configfiles.c player: delete watch_later file after successful load 2023-07-08 14:33:47 +00:00
core.h loadfile: avoid infinite playlist loading loops 2023-08-16 13:01:28 +00:00
external_files.c player: make all autoload extensions configurable 2023-08-26 00:33:00 +00:00
external_files.h player: make all autoload extensions configurable 2023-08-26 00:33:00 +00:00
javascript.c build: remove outdated generated directory 2023-07-31 19:00:06 +00:00
loadfile.c loadfile: avoid infinite playlist loading loops 2023-08-16 13:01:28 +00:00
lua.c build: remove outdated generated directory 2023-07-31 19:00:06 +00:00
main.c player/main: do not print build time, if it is unknown 2023-08-02 18:51:13 +00:00
meson.build build: remove outdated generated directory 2023-07-31 19:00:06 +00:00
misc.c vo_wayland: fix warning -Wvoid-pointer-to-enum-cast 2023-02-26 16:45:07 +01:00
osd.c player: add --term-remaining-playtime option 2023-08-13 19:58:20 +00:00
playloop.c player: use audio pts corresponding to playing audio on EOF 2023-08-25 22:38:25 +00:00
screenshot.c screenshot: implement screenshot-window in sw for most VOs 2023-07-21 20:23:11 +02:00
screenshot.h
scripting.c
sub.c sub: fix switching tracks while paused 2023-08-11 22:28:50 +00:00
video.c player/video: avoid spamming logs with EOF 2023-08-11 22:28:50 +00:00