diff options
Diffstat (limited to 'win/CS/HandBrake.ApplicationServices/Utilities')
-rw-r--r-- | win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs b/win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs index 34b6190c6..ce963188f 100644 --- a/win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs +++ b/win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs @@ -556,9 +556,17 @@ namespace HandBrake.ApplicationServices.Utilities /// <param name="chapters">The List of chapters</param>
/// <param name="filePathName">Path to save the csv file</param>
/// <returns>True if successful </returns>
- private static bool ChapterCsvSave(Dictionary<int, string> chapters, string filePathName)
+ private static bool ChapterCsvSave(List<string> chapters, string filePathName)
{
- string csv = chapters.Aggregate(string.Empty, (current, row) => current + (row.Key + "," + row.Value.Replace(",", "\\,") + Environment.NewLine));
+ string csv = string.Empty;
+ int counter = 0;
+
+ foreach (string name in chapters)
+ {
+ csv += counter + "," + name.Replace(",", "\\,") + Environment.NewLine;
+ counter ++;
+ }
+
StreamWriter file = new StreamWriter(filePathName);
file.Write(csv);
|