diff options
author | Sverrir Sigmundarson <[email protected]> | 2015-11-23 15:10:37 +0100 |
---|---|---|
committer | Sverrir Sigmundarson <[email protected]> | 2015-11-23 15:10:37 +0100 |
commit | 70e6b6257736722684294f79cb467b54960dd21a (patch) | |
tree | 76b2733daa80a2466e96dbee1162eb2db0b61b8d /win/CS/HandBrakeWPF/Utilities | |
parent | 4137a887b8fad760eb0c90d3ca90303aa3674740 (diff) |
Minor fixes to chapterdb.org support that were lost in a merge-gone-wrong.
Diffstat (limited to 'win/CS/HandBrakeWPF/Utilities')
-rw-r--r-- | win/CS/HandBrakeWPF/Utilities/Input/ChapterImporterCsv.cs | 8 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Utilities/Input/ChapterImporterTxt.cs | 12 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Utilities/Output/CsvHelper.cs | 2 |
3 files changed, 21 insertions, 1 deletions
diff --git a/win/CS/HandBrakeWPF/Utilities/Input/ChapterImporterCsv.cs b/win/CS/HandBrakeWPF/Utilities/Input/ChapterImporterCsv.cs index 906eae510..8317f4c1a 100644 --- a/win/CS/HandBrakeWPF/Utilities/Input/ChapterImporterCsv.cs +++ b/win/CS/HandBrakeWPF/Utilities/Input/ChapterImporterCsv.cs @@ -16,8 +16,16 @@ namespace HandBrakeWPF.Utilities.Input /// </summary> internal class ChapterImporterCsv { + /// <summary> + /// The file filter value for the OpenFileDialog + /// </summary> public static string FileFilter => "CSV files (*.csv;*.tsv)|*.csv;*.tsv"; + /// <summary> + /// Imports all chapter information from the given <see cref="filename"/> into the <see cref="chapterMap"/> dictionary. + /// </summary> + /// <param name="filename">The full path and filename of the chapter marker file to import</param> + /// <param name="chapterMap">The dictionary that should be populated with parsed chapter markers</param> public static void Import(string filename, ref Dictionary<int, Tuple<string, TimeSpan>> importedChapters) { using (TextFieldParser csv = new TextFieldParser(filename) diff --git a/win/CS/HandBrakeWPF/Utilities/Input/ChapterImporterTxt.cs b/win/CS/HandBrakeWPF/Utilities/Input/ChapterImporterTxt.cs index 678abb20a..55b24b7a1 100644 --- a/win/CS/HandBrakeWPF/Utilities/Input/ChapterImporterTxt.cs +++ b/win/CS/HandBrakeWPF/Utilities/Input/ChapterImporterTxt.cs @@ -10,10 +10,22 @@ namespace HandBrakeWPF.Utilities.Input using HandBrakeWPF.Helpers; + /// <summary> + /// Imports chapter markers in the ChaptersDb.org TXT format + /// More info: http://www.chapterdb.org/docs + /// </summary> public class ChapterImporterTxt { + /// <summary> + /// The file filter value for the OpenFileDialog + /// </summary> public static string FileFilter => "Text files (*.txt)|*.txt"; + /// <summary> + /// Imports all chapter information from the given <see cref="filename"/> into the <see cref="chapterMap"/> dictionary. + /// </summary> + /// <param name="filename">The full path and filename of the chapter marker file to import</param> + /// <param name="chapterMap">The dictionary that should be populated with parsed chapter markers</param> public static void Import(string filename, ref Dictionary<int, Tuple<string, TimeSpan>> chapterMap) { using (var file = new StreamReader(filename)) diff --git a/win/CS/HandBrakeWPF/Utilities/Output/CsvHelper.cs b/win/CS/HandBrakeWPF/Utilities/Output/CsvHelper.cs index cf2d7a38d..48a0bcf63 100644 --- a/win/CS/HandBrakeWPF/Utilities/Output/CsvHelper.cs +++ b/win/CS/HandBrakeWPF/Utilities/Output/CsvHelper.cs @@ -13,7 +13,7 @@ namespace HandBrakeWPF.Utilities.Output { private const string QUOTE = "\""; private const string ESCAPED_QUOTE = "\"\""; - private static readonly char[] CHARACTERS_THAT_MUST_BE_QUOTED = { ',', '"', '\n' }; + private static readonly char[] CHARACTERS_THAT_MUST_BE_QUOTED = { ',', '"', '\n', '\t' }; /// <summary> /// Properly escapes a string value containing reserved characters with double quotes "..." before it is written to a CSV file. |