Skip to content

Commit

Permalink
Minor changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
jdpurcell committed Oct 6, 2017
1 parent 307e242 commit 5369f8d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions RechatTool/Rechat.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public static void DownloadFile(long videoId, string path, bool overwrite = fals
progressCallback?.Invoke(segments.Count);
}
while (nextCursor != null);
JArray combined = new JArray(segments.SelectMany(s => s).ToArray());
JArray combined = new JArray(segments.SelectMany(s => s));
File.WriteAllText(path, combined.ToString(Formatting.None), new UTF8Encoding(true));
}

Expand All @@ -51,7 +51,7 @@ private static void AddTwitchApiHeaders(HttpWebRequest request) {

public static void ProcessFile(string pathIn, string pathOut = null, bool overwrite = false) {
if (pathOut == null) {
bool isAlreadyTxt = Path.GetExtension(pathIn).Equals(".txt", StringComparison.OrdinalIgnoreCase);
bool isAlreadyTxt = pathIn.EndsWith(".txt", StringComparison.OrdinalIgnoreCase);
pathOut = Path.Combine(
Path.GetDirectoryName(pathIn),
Path.GetFileNameWithoutExtension(pathIn) + (isAlreadyTxt ? "-p" : "") + ".txt");
Expand Down
2 changes: 2 additions & 0 deletions RechatTool/RechatTool.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
Expand All @@ -30,6 +31,7 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
Expand Down

0 comments on commit 5369f8d

Please sign in to comment.