History

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

Kacper Michajłow committed 1 year ago

Commit ecc31ec1 parent 7b9290f4 files · +10 −3Browse files

Unified · Split

4 files
  1. DOCS/interface-changes/hearing-impaired.txt +1 −1
  2. DOCS/man/input.rst +5 −0
  3. player/command.c +2 −1
  4. player/core.h +2 −1
DOCS/interface-changes/hearing-impaired.txt+1−1
@@ -1 +1 @@
1−add `hearing-impaired` and `visual-impaired` flags to track add command
1+add `hearing-impaired`, `visual-impaired` and `attached-picture` flags to track add command
DOCS/man/input.rst+5−0
@@ -673,6 +673,11 @@ Track Manipulation · 672 unmodified lines
673673
674674 Marks the track as suitable for the visually impaired.
675675
676+ <attached-picture> (only for ``video-add``)
677+
678+ Marks the track as an attached picture, same as ``albumart`` argument
679+ for ```video-add``.
680+
676681 The ``title`` argument sets the track title in the UI.
677682
678683 The ``lang`` argument sets the track language, and can also influence
player/command.c+2−1
@@ -7187,7 +7187,8 @@ const struct mp_cmd_def mp_cmds[] = { · 7186 unmodified lines
71877187 {"flags", OPT_FLAGS(v.i,
71887188 {"select", 0}, {"auto", 1}, {"cached", 2},
71897189 {"hearing-impaired", TRACK_HEARING_IMPAIRED},
7190− {"visual-impaired", TRACK_VISUAL_IMPAIRED}),
7190+ {"visual-impaired", TRACK_VISUAL_IMPAIRED},
7191+ {"attached-picture", TRACK_ATTACHED_PICTURE}),
71917192 .flags = MP_CMD_OPT_ARG},
71927193 {"title", OPT_STRING(v.s), .flags = MP_CMD_OPT_ARG},
71937194 {"lang", OPT_STRING(v.s), .flags = MP_CMD_OPT_ARG},
player/core.h+2−1
@@ -492,9 +492,10 @@ struct mp_abort_entry { · 491 unmodified lines
492492 #define BLACK_CIRCLE "\xe2\x97\x8f"
493493
494494 enum track_flags {
495− TRACK_ATTACHED_PICTURE = 1 << 0,
495+ // starts at 4, for cmd_track_add backwards compatibility
496496 TRACK_HEARING_IMPAIRED = 1 << 2,
497497 TRACK_VISUAL_IMPAIRED = 1 << 3,
498+ TRACK_ATTACHED_PICTURE = 1 << 4,
498499 };
499500
500501 // audio.c

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t