Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions PatreonDownloader.App/Models/CommandLineOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,5 +64,11 @@ class CommandLineOptions

[Option("proxy-server-address", Required = false, HelpText = "The address of proxy server to use in the following format: [<proxy-scheme>://]<proxy-host>[:<proxy-port>]. Supported protocols: http(s), socks4, socks4a, socks5.")]
public string ProxyServerAddress { get; set; }

[Option("email", Required = false, HelpText = "Patreon account email used for automatic login in the browser.")]
public string Email { get; set; }

[Option("password", Required = false, HelpText = "Patreon account password used for automatic login in the browser.")]
public string Password { get; set; }
}
}
4 changes: 3 additions & 1 deletion PatreonDownloader.App/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,9 @@ private static async Task<PatreonDownloaderSettings> InitializeSettings(CommandL
MaxFilenameLength = commandLineOptions.MaxFilenameLength,
FallbackToContentTypeFilenames = commandLineOptions.FilenamesFallbackToContentType,
ProxyServerAddress = commandLineOptions.ProxyServerAddress,
IsUseLegacyFilenaming = commandLineOptions.IsUseLegacyFilenaming
IsUseLegacyFilenaming = commandLineOptions.IsUseLegacyFilenaming,
LoginEmail = commandLineOptions.Email,
LoginPassword = commandLineOptions.Password
};

if (settings.IsUseLegacyFilenaming && (settings.FileExistsAction == FileExistsAction.BackupIfDifferent || settings.FileExistsAction == FileExistsAction.ReplaceIfDifferent))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,11 @@ public record PatreonDownloaderSettings : UniversalDownloaderPlatformSettings, I
public string LoginPageAddress { get { return "https://www.patreon.com/login"; } }
public string LoginCheckAddress { get { return "https://www.patreon.com/api/badges?json-api-version=1.0&json-api-use-default-includes=false&include=[]"; } }
public string CaptchaCookieRetrievalAddress { get { return "https://www.patreon.com/home"; } }
public string AuthAddress { get { return "https://www.patreon.com/api/auth"; } }
public Uri RemoteBrowserAddress { get; init; }
public bool IsHeadlessBrowser { get; init; }
public string LoginEmail { get; init; }
public string LoginPassword { get; init; }

public PatreonDownloaderSettings()
{
Expand Down