mirror of
https://github.com/mpv-player/mpv
synced 2024-12-26 00:42:57 +00:00
auto_profiles.lua: don't warn if profile-restore=default
The code assumed that the value of the profile-restore field is "default" for such profiles, but the C implementation is such that the field is intentionally omitted in such case. This resulted in incorrectly trying to restore such profiles. However, there are no stored values with profile-restore=default, so it only resulted in a harmless warning, but otherwise behaved correctly (i.e. nothing is restored). Fix the condition by taking into account that missing field means "default", so that it doesn't try to restore in such case, and avoid the warning.
This commit is contained in:
parent
9fd9239990
commit
712ef65e2a
@ -163,7 +163,7 @@ local function load_profiles()
|
||||
properties = {},
|
||||
status = nil,
|
||||
dirty = true, -- need re-evaluate
|
||||
has_restore_opt = v["profile-restore"] ~= "default"
|
||||
has_restore_opt = v["profile-restore"] and v["profile-restore"] ~= "default"
|
||||
}
|
||||
profiles[#profiles + 1] = profile
|
||||
have_dirty_profiles = true
|
||||
|
Loading…
Reference in New Issue
Block a user