This commit is contained in:
Frank Skare
2019-10-15 05:58:00 +02:00
parent f48901355a
commit be57edf2c5
3 changed files with 12 additions and 10 deletions

View File

@@ -1,4 +1,4 @@
### ### 5.4.2.1
- pressing shift key suppresses auto-load-folder - pressing shift key suppresses auto-load-folder
- switch --queue added, this will not clear the playlist but append - switch --queue added, this will not clear the playlist but append
@@ -7,6 +7,8 @@
[Open with++](https://github.com/stax76/OpenWithPlusPlus#add-to-mpvnet-playlist) shell extension, as far as I know multi selection [Open with++](https://github.com/stax76/OpenWithPlusPlus#add-to-mpvnet-playlist) shell extension, as far as I know multi selection
can not be done using the Registry but only via shell extension can not be done using the Registry but only via shell extension
- window-size mpv property support added ([default bindings](https://github.com/stax76/mpv.net/blob/master/mpv.net/Resources/inputConf.txt#L137)) - window-size mpv property support added ([default bindings](https://github.com/stax76/mpv.net/blob/master/mpv.net/Resources/inputConf.txt#L137))
- the config editor keeps profiles and comments in mpv.conf intact!
- the options in the config editor are better organized
### 5.4.2 ### 5.4.2

View File

@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers // You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below: // by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("5.4.2.0")] [assembly: AssemblyVersion("5.4.2.1")]
[assembly: AssemblyFileVersion("5.4.2.0")] [assembly: AssemblyFileVersion("5.4.2.1")]

View File

@@ -100,7 +100,7 @@ namespace mpvnet
return string.Join("", SettingsDefinitions.Select(item => item.Name + item.Value).ToArray()); return string.Join("", SettingsDefinitions.Select(item => item.Name + item.Value).ToArray());
} }
string SectionComment; Dictionary<string, string> SectionComment = new Dictionary<string, string>();
void LoadConf(string file) void LoadConf(string file)
{ {
@@ -127,8 +127,8 @@ namespace mpvnet
{ {
section = line.Substring(0, line.IndexOf("]") + 1); section = line.Substring(0, line.IndexOf("]") + 1);
if (SectionComment == null) if (!SectionComment.ContainsKey(file))
SectionComment = comment; SectionComment[file] = comment;
comment = ""; comment = "";
isSectionItem = true; isSectionItem = true;
@@ -211,11 +211,11 @@ namespace mpvnet
} }
} }
if (SectionComment != "") if (SectionComment.ContainsKey(name) && SectionComment[name] != "\r\n")
sb.Append(SectionComment); sb.Append(SectionComment[name]);
if (!sb.ToString().Contains("\r\n# Editor")) if (!sb.ToString().Contains("# Editor"))
sb.AppendLine("\r\n# Editor"); sb.AppendLine("# Editor");
foreach (SettingBase setting in SettingsDefinitions) foreach (SettingBase setting in SettingsDefinitions)
{ {