summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsr55 <[email protected]>2011-03-20 17:42:56 +0000
committersr55 <[email protected]>2011-03-20 17:42:56 +0000
commitfc436bc475affd57046a4408a60730ec6f3d2fa6 (patch)
tree74e8f7af70aa26eb0e9466d661b5e5d1f3191e72
parent22393506f087fcb28e4aedab2e7a47d2ae6256ec (diff)
WinGui:
- 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
-rw-r--r--win/CS/HandBrake.ApplicationServices/Model/EncodeTask.cs2
-rw-r--r--win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs12
2 files changed, 11 insertions, 3 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Model/EncodeTask.cs b/win/CS/HandBrake.ApplicationServices/Model/EncodeTask.cs
index e896960c0..8dfb5d031 100644
--- a/win/CS/HandBrake.ApplicationServices/Model/EncodeTask.cs
+++ b/win/CS/HandBrake.ApplicationServices/Model/EncodeTask.cs
@@ -278,7 +278,7 @@ namespace HandBrake.ApplicationServices.Model
/// <summary>
/// Chapter Names
/// </summary>
- public Dictionary<int, string> ChapterNames { get; set; }
+ public List<string> ChapterNames { get; set; }
#endregion
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);