player/command: add attached-picture flags to track add command

This commit is contained in:
Kacper Michajłow committed 2025-03-08 00:21:06 +01:00
1 parent 7b9290f620
commit ecc31ecab3
4 files changed
+10 -3

No files matched your search

+1 -1
View File
@@ -1 +1 @@
add `hearing-impaired` and `visual-impaired` flags to track add command
add `hearing-impaired`, `visual-impaired` and `attached-picture` flags to track add command
+5
View File
@@ -673,6 +673,11 @@ Track Manipulation
Marks the track as suitable for the visually impaired.
<attached-picture> (only for ``video-add``)
Marks the track as an attached picture, same as ``albumart`` argument
for ```video-add``.
The ``title`` argument sets the track title in the UI.
The ``lang`` argument sets the track language, and can also influence
+2 -1
View File
@@ -7187,7 +7187,8 @@ const struct mp_cmd_def mp_cmds[] = {
{"flags", OPT_FLAGS(v.i,
{"select", 0}, {"auto", 1}, {"cached", 2},
{"hearing-impaired", TRACK_HEARING_IMPAIRED},
{"visual-impaired", TRACK_VISUAL_IMPAIRED}),
{"visual-impaired", TRACK_VISUAL_IMPAIRED},
{"attached-picture", TRACK_ATTACHED_PICTURE}),
.flags = MP_CMD_OPT_ARG},
{"title", OPT_STRING(v.s), .flags = MP_CMD_OPT_ARG},
{"lang", OPT_STRING(v.s), .flags = MP_CMD_OPT_ARG},
+2 -1
View File
@@ -492,9 +492,10 @@ struct mp_abort_entry {
#define BLACK_CIRCLE "\xe2\x97\x8f"
enum track_flags {
TRACK_ATTACHED_PICTURE = 1 << 0,
// starts at 4, for cmd_track_add backwards compatibility
TRACK_HEARING_IMPAIRED = 1 << 2,
TRACK_VISUAL_IMPAIRED = 1 << 3,
TRACK_ATTACHED_PICTURE = 1 << 4,
};
// audio.c