Skip to content

options: add --playlist-inherit-options=auto and make it default - #18319

Open
na-na-hi wants to merge 1 commit into
mpv-player:masterfrom
na-na-hi:playlist-inherit-options-auto
Open

options: add --playlist-inherit-options=auto and make it default#18319
na-na-hi wants to merge 1 commit into
mpv-player:masterfrom
na-na-hi:playlist-inherit-options-auto

Conversation

@na-na-hi

Copy link
Copy Markdown
Contributor

Should make more sense as a default to inherit file local options for ordinary playlists. Items from auto created playlists do not logically belong to the starting item so they are excluded.

Should make more sense as a default to inherit file local options
for ordinary playlists. Items from auto created playlists do not
logically belong to the starting item so they are excluded.
Comment thread options/options.c
M_RANGE(0, INT_MAX)},
{"playlist-inherit-options", OPT_CHOICE(playlist_inherit_options,
{"no", 0}, {"yes", 1}, {"current", 2})},
{"no", 0}, {"yes", 1}, {"current", 2}, {"auto", 3})},

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

auto should be 0 by convention, default options are 0 if possible.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

auto should be 0 by convention

Is it?
Out of 85 "auto" values, 15 are 0.
Out of 70 "no" values, 40 are 0.
Clearly by convention no should be 0, not auto.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Default values are 0 because it avoids explicit initializer and is consistent with any structure initialization.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Default values are 0 because it avoids explicit initializer and is consistent with any structure initialization.

Yes, but this is not a convention.
--gapless-audio: no - 0, yes - 1, default - -1
--stop-screensaver: no - 0, yes - 1, default - 1
--term-osd: no - 0, auto - 2, default - 2
and so on...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants