-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error parsing watch later files #13016
Comments
Config files don't support multi-line option values, and that is unlikely to change. |
Is it possible to escape line breaks for multi-line options when saving a watch_later file? |
If you save |
This patch works: diff --git a/options/parse_configfile.c b/options/parse_configfile.c
index edd6be91..a4cc0904 100644
--- a/options/parse_configfile.c
+++ b/options/parse_configfile.c
@@ -105,12 +105,21 @@ int m_config_parse(m_config_t *config, const char *location, bstr data,
if (rest.len == line.len || !bstr_eatstart0(&rest, "%") ||
len > rest.len)
{
+ if (rest.len && len > rest.len) {
+ line.len = len + (rest.start - line.start);
+ rest.len = len;
+ unsigned char *start = line.start + line.len;
+ data.len -= start - data.start;
+ data.start = start;
+ goto ok;
+ }
MP_ERR(config, "%s fixed-length quoting expected - put "
"\"quotes\" around the option value if you did not "
"intend to use this, but your option value starts "
"with '%%'\n", loc);
goto error;
}
+ ok:
value = bstr_splice(rest, 0, len);
line = bstr_cut(rest, len);
} else {
|
Important Information
Provide following Information:
Reproduction steps
mpv --save-position-on-quit --watch-later-options-append=stream-lavf-o <FILE>
Expected behavior
no errors
Actual behavior
The text was updated successfully, but these errors were encountered: