#435 Fix mpv options not working in case of existing same line comments
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
is created with defaults for osc and console.
|
||||
- Support mpv idle property, see manual for remarks.
|
||||
- Fix external audio and subtitle files not shown in all use cases.
|
||||
- Fix mpv options not working in case of existing same line comments.
|
||||
- Fix crash choosing Matroska edition in the menu.
|
||||
- Fix auto-play and auto-load-folder not working with user scripts.
|
||||
- Fix slow startup using `osd-scale-by-window=no`.
|
||||
|
||||
@@ -359,7 +359,17 @@ namespace mpvnet
|
||||
if (File.Exists(ConfPath))
|
||||
foreach (var i in File.ReadAllLines(ConfPath))
|
||||
if (i.Contains("=") && !i.TrimStart().StartsWith("#"))
|
||||
_Conf[i.Substring(0, i.IndexOf("=")).Trim()] = i.Substring(i.IndexOf("=") + 1).Trim();
|
||||
{
|
||||
string key = i.Substring(0, i.IndexOf("=")).Trim();
|
||||
string value = i.Substring(i.IndexOf("=") + 1).Trim();
|
||||
|
||||
if (value.Contains("#") && !value.StartsWith("#") &&
|
||||
!value.StartsWith("'#") && !value.StartsWith("\"#"))
|
||||
|
||||
value = value.Substring(0, value.IndexOf("#")).Trim();
|
||||
|
||||
_Conf[key] = value;
|
||||
}
|
||||
|
||||
foreach (var i in _Conf)
|
||||
ProcessProperty(i.Key, i.Value);
|
||||
|
||||
Reference in New Issue
Block a user