]> granicus.if.org Git - handbrake/commitdiff
WinGui:
authorsr55 <sr55.hb@outlook.com>
Sun, 20 Mar 2011 17:42:56 +0000 (17:42 +0000)
committersr55 <sr55.hb@outlook.com>
Sun, 20 Mar 2011 17:42:56 +0000 (17:42 +0000)
- Minor error. Don't try to serialize a dictionary in a model.

git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3855 b64f7644-9d1e-0410-96f1-a4d463321fa5

win/CS/HandBrake.ApplicationServices/Model/EncodeTask.cs
win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs

index e896960c0000b92c1e7702d2b0429aab411debee..8dfb5d031e879217ad188ed6c81ecc55f52dc239 100644 (file)
@@ -278,7 +278,7 @@ namespace HandBrake.ApplicationServices.Model
         /// <summary>\r
         /// Chapter Names\r
         /// </summary>\r
-        public Dictionary<int, string> ChapterNames { get; set; }\r
+        public List<string> ChapterNames { get; set; }\r
 \r
         #endregion\r
 \r
index 34b6190c6af454bdc139852c277e863dcb130ca1..ce963188fe7c656151c9f75d6a1d4c1633830ba5 100644 (file)
@@ -556,9 +556,17 @@ namespace HandBrake.ApplicationServices.Utilities
         /// <param name="chapters">The List of chapters</param>\r
         /// <param name="filePathName">Path to save the csv file</param>\r
         /// <returns>True if successful </returns>\r
-        private static bool ChapterCsvSave(Dictionary<int, string> chapters, string filePathName)\r
+        private static bool ChapterCsvSave(List<string> chapters, string filePathName)\r
         {\r
-            string csv = chapters.Aggregate(string.Empty, (current, row) => current + (row.Key + "," + row.Value.Replace(",", "\\,") + Environment.NewLine));\r
+            string csv = string.Empty;\r
+            int counter = 0;\r
+\r
+            foreach (string name in chapters)\r
+            {\r
+                csv += counter + "," + name.Replace(",", "\\,") + Environment.NewLine;\r
+                counter ++;\r
+            }\r
+\r
 \r
             StreamWriter file = new StreamWriter(filePathName);\r
             file.Write(csv);\r