Skip to content

Commit

Permalink
Merge pull request #77 from AlexCSDev/remote_file_size_control
Browse files Browse the repository at this point in the history
Ability to choose to keep or replace file when remote file size cannot be retrieved
  • Loading branch information
AlexCSDev authored Aug 1, 2021
2 parents 04e09a1 + ae958f3 commit e54a04f
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
4 changes: 4 additions & 0 deletions PatreonDownloader.App/Models/CommandLineOptions.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using CommandLine;
using UniversalDownloaderPlatform.Common.Enums;

namespace PatreonDownloader.App.Models
{
Expand All @@ -25,6 +26,9 @@ class CommandLineOptions
[Option("overwrite-files", Required = false, HelpText = "Overwrite already existing files (recommended if creator might have files multiple files with the same filename or makes changes to already existing posts)", Default = false)]
public bool OverwriteFiles { get; set; }

[Option("no-remote-size-action", Required = false, HelpText = "What to do with existing files when it is not possible to retrieve file size from the server. Possible options: ReplaceExisting, KeepExisting. --overwrite-files has priority over KeepExisting.", Default = RemoteFileSizeNotAvailableAction.KeepExisting)]
public RemoteFileSizeNotAvailableAction NoRemoteSizeAction { get; set; }

[Option("remote-browser-address", Required = false, HelpText = "Advanced users only. Address of the browser with remote debugging enabled. Refer to documentation for more details.")]
public string RemoteBrowserAddress { get; set; }
}
Expand Down
3 changes: 2 additions & 1 deletion PatreonDownloader.App/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,8 @@ private static async Task<PatreonDownloaderSettings> InitializeSettings(CommandL
SaveDescriptions = commandLineOptions.SaveDescriptions,
SaveEmbeds = commandLineOptions.SaveEmbeds,
SaveJson = commandLineOptions.SaveJson,
DownloadDirectory = commandLineOptions.DownloadDirectory
DownloadDirectory = commandLineOptions.DownloadDirectory,
RemoteFileSizeNotAvailableAction = commandLineOptions.NoRemoteSizeAction
};

return settings;
Expand Down
4 changes: 2 additions & 2 deletions PatreonDownloader.App/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@
// Build Number
// Revision
//
[assembly: AssemblyVersion("0.10.0.1")]
[assembly: AssemblyFileVersion("0.10.0.1")]
[assembly: AssemblyVersion("0.10.0.2")]
[assembly: AssemblyFileVersion("0.10.0.2")]

0 comments on commit e54a04f

Please sign in to comment.