options: don't always set set-locally to true

Since 1d1d1fbff9 option-info/<name>/set-locally was being set to true
for every option. This broke setting start from ytdl-hook, which doesn't
overwrite start if it was set-locally. Fix this so that only adding an
option to reset-on-next-file or setting file-local-options/<name> make
set-locally true like before.

However, it's arguable that just adding an option to
reset-on-next-file without ever changing it should not make set-locally
true, so that e.g.
--reset-on-next-file=start 'https://youtube.com/watch?v=...&t=30'
will start at 30, though it currently doesn't.

Fixes #9081.
This commit is contained in:
Guido Cella 2021-08-03 12:11:10 +02:00 committed by Dudemanguy
parent 416668d3c8
commit dd7a49eb71
1 changed files with 1 additions and 2 deletions

View File

@ -283,8 +283,7 @@ void m_config_backup_all_opts(struct m_config *config)
void m_config_backup_watch_later_opts(struct m_config *config)
{
for (int n = 0; n < config->num_opts; n++)
ensure_backup(&config->watch_later_backup_opts, BACKUP_LOCAL,
&config->opts[n]);
ensure_backup(&config->watch_later_backup_opts, 0, &config->opts[n]);
}
struct m_config_option *m_config_get_co_raw(const struct m_config *config,