Skip to content

Commit

Permalink
- accepts username and password as commandline parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
nocturneop15 committed Dec 25, 2023
1 parent d8b020e commit 9062195
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 deletions.
23 changes: 21 additions & 2 deletions SCCDownloader/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,29 @@ static async Task MainAsync(string[] args)
// create number from yearText
var year = Int32.Parse(yearText);

// username from command line
var userName = Config["username"];

if (userName == null)
{
Console.Write("Zadej uzivatelske jmeno: ");
userName = Console.ReadLine();
}


// password from command line
var password = Config["password"];

if (password == null)
{
Console.Write("Zadej heslo: ");
password = Console.ReadLine();
}

//test
// var genre = String.Format("Western"); //used for search testing
//konec testu

var DownloadFolder = yearText;


Expand All @@ -71,11 +89,12 @@ static async Task MainAsync(string[] args)
var movies = await sc.GetMovieList(year);
if (movies.Any())
{

/*
Console.Write("Zadej jmeno: ");
var userName = Console.ReadLine();
Console.Write("Zadej heslo: ");
var password = Console.ReadLine();
*/ //passed from command line, not needed anymore

if (!String.IsNullOrEmpty(userName) || !String.IsNullOrEmpty(password))
{
Expand Down
2 changes: 1 addition & 1 deletion SCCDownloader/Properties/launchSettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"profiles": {
"SCCDownloader": {
"commandName": "Project",
"commandLineArgs": "--year 1923"
"commandLineArgs": "--year 1923 --username nocturne.op.15 --password OpsRPMPVF3Q4PDQd9nH0"
}
}
}

0 comments on commit 9062195

Please sign in to comment.