Exemplo n.º 1
0
            protected override async Task <int> OnExecuteAuthenticatedAsync(QBittorrentClient client, CommandLineApplication app, IConsole console)
            {
                var apiVersion = await client.GetApiVersionAsync();

                if (apiVersion < new ApiVersion(2, 1))
                {
                    console.WriteLineColored("The --save-path parameter requires qBittorrent 4.1.3 or later.",
                                             ColorScheme.Current.Warning);
                    return(ExitCodes.Failure);
                }

                await client.EditCategoryAsync(Name, SavePath);

                return(ExitCodes.Success);
            }