Skip to content

Commit

Permalink
Actually that may not be a great idea
Browse files Browse the repository at this point in the history
  • Loading branch information
ScrubN committed Jun 10, 2024
1 parent d040eb2 commit 8dd96ae
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 14 deletions.
7 changes: 3 additions & 4 deletions TwitchDownloaderCLI/Modes/DownloadChat.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,9 @@ private static ChatDownloadOptions GetDownloadOptions(ChatDownloadArgs inputOpti
TrimEnding = inputOptions.TrimEndingTime > TimeSpan.Zero,
TrimEndingTime = ((TimeSpan)inputOptions.TrimEndingTime).TotalSeconds,
EmbedData = inputOptions.EmbedData,
Filename = FilenameService.ReplaceInvalidFilenameChars(
inputOptions.Compression is ChatCompression.Gzip
? inputOptions.OutputFile + ".gz"
: inputOptions.OutputFile),
Filename = inputOptions.Compression is ChatCompression.Gzip
? inputOptions.OutputFile + ".gz"
: inputOptions.OutputFile,
Compression = inputOptions.Compression,
TimeFormat = inputOptions.TimeFormat,
DownloadThreads = inputOptions.DownloadThreads,
Expand Down
2 changes: 1 addition & 1 deletion TwitchDownloaderCLI/Modes/DownloadClip.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ private static ClipDownloadOptions GetDownloadOptions(ClipDownloadArgs inputOpti
ClipDownloadOptions downloadOptions = new()
{
Id = clipIdMatch.Value,
Filename = FilenameService.ReplaceInvalidFilenameChars(inputOptions.OutputFile),
Filename = inputOptions.OutputFile,
Quality = inputOptions.Quality,
ThrottleKib = inputOptions.ThrottleKib,
FfmpegPath = string.IsNullOrWhiteSpace(inputOptions.FfmpegPath) ? FfmpegHandler.FfmpegExecutableName : Path.GetFullPath(inputOptions.FfmpegPath),
Expand Down
2 changes: 1 addition & 1 deletion TwitchDownloaderCLI/Modes/DownloadVideo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ private static VideoDownloadOptions GetDownloadOptions(VideoDownloadArgs inputOp
ThrottleKib = inputOptions.ThrottleKib,
Id = long.Parse(vodIdMatch.ValueSpan),
Oauth = inputOptions.Oauth,
Filename = FilenameService.ReplaceInvalidFilenameChars(inputOptions.OutputFile),
Filename = inputOptions.OutputFile,
Quality = Path.GetExtension(inputOptions.OutputFile)!.ToLower() switch
{
".mp4" => inputOptions.Quality,
Expand Down
3 changes: 1 addition & 2 deletions TwitchDownloaderCLI/Modes/MergeTs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
using TwitchDownloaderCLI.Tools;
using TwitchDownloaderCore;
using TwitchDownloaderCore.Options;
using TwitchDownloaderCore.Tools;

namespace TwitchDownloaderCLI.Modes
{
Expand All @@ -26,7 +25,7 @@ private static TsMergeOptions GetMergeOptions(TsMergeArgs inputOptions, FileColl
{
TsMergeOptions mergeOptions = new()
{
OutputFile = FilenameService.ReplaceInvalidFilenameChars(inputOptions.OutputFile),
OutputFile = inputOptions.OutputFile,
InputFile = inputOptions.InputList,
FileCollisionCallback = collisionHandler.HandleCollisionCallback,
};
Expand Down
3 changes: 1 addition & 2 deletions TwitchDownloaderCLI/Modes/RenderChat.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
using TwitchDownloaderCore.Chat;
using TwitchDownloaderCore.Interfaces;
using TwitchDownloaderCore.Options;
using TwitchDownloaderCore.Tools;

namespace TwitchDownloaderCLI.Modes
{
Expand All @@ -33,7 +32,7 @@ private static ChatRenderOptions GetRenderOptions(ChatRenderArgs inputOptions, F
ChatRenderOptions renderOptions = new()
{
InputFile = inputOptions.InputFile,
OutputFile = FilenameService.ReplaceInvalidFilenameChars(inputOptions.OutputFile),
OutputFile = inputOptions.OutputFile,
BackgroundColor = SKColor.Parse(inputOptions.BackgroundColor),
AlternateBackgroundColor = SKColor.Parse(inputOptions.AlternateBackgroundColor),
MessageColor = SKColor.Parse(inputOptions.MessageColor),
Expand Down
7 changes: 3 additions & 4 deletions TwitchDownloaderCLI/Modes/UpdateChat.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,9 @@ private static ChatUpdateOptions GetUpdateOptions(ChatUpdateArgs inputOptions, F
ChatUpdateOptions updateOptions = new()
{
InputFile = inputOptions.InputFile,
OutputFile = FilenameService.ReplaceInvalidFilenameChars(
inputOptions.Compression is ChatCompression.Gzip
? inputOptions.OutputFile + ".gz"
: inputOptions.OutputFile),
OutputFile = inputOptions.Compression is ChatCompression.Gzip
? inputOptions.OutputFile + ".gz"
: inputOptions.OutputFile,
Compression = inputOptions.Compression,
OutputFormat = outFormat,
EmbedMissing = inputOptions.EmbedMissing,
Expand Down

0 comments on commit 8dd96ae

Please sign in to comment.