Linux downgrade
This commit is contained in:
parent
ba5bc6347c
commit
cf5984385f
@ -63,6 +63,10 @@ public class Person
|
||||
|
||||
private void Loop(long ticks, ILogger log)
|
||||
{
|
||||
Uri uri;
|
||||
HttpClient httpClient = new();
|
||||
string fileName;
|
||||
Task<byte[]> task;
|
||||
int age;
|
||||
string json;
|
||||
string code;
|
||||
@ -210,6 +214,18 @@ public class Person
|
||||
personDisplayDirectory = Path.Combine(_AppSettings.SaveDirectory, ticks.ToString(), $"{personName.First.Value} {personName.Last.Value}~{approximateYears}");
|
||||
if (!Directory.Exists(personDisplayDirectory))
|
||||
_ = Directory.CreateDirectory(personDisplayDirectory);
|
||||
log.Information("Enter url to download an image (press enter if none)");
|
||||
line = System.Console.ReadLine();
|
||||
log.Information(". . .");
|
||||
if (!string.IsNullOrEmpty(line))
|
||||
{
|
||||
uri = new(line);
|
||||
if (uri.HostNameType != UriHostNameType.Dns)
|
||||
continue;
|
||||
task = httpClient.GetByteArrayAsync(uri);
|
||||
fileName = Path.Combine(personDisplayDirectory, Path.GetFileName(uri.LocalPath));
|
||||
File.WriteAllBytes(fileName, task.Result);
|
||||
}
|
||||
if (dateTime is null)
|
||||
personKeyFormatted = "2";
|
||||
else
|
||||
|
@ -5,7 +5,7 @@
|
||||
<Nullable>enable</Nullable>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RuntimeIdentifiers>win-x64;linux-x64</RuntimeIdentifiers>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<UserSecretsId>7ca5318a-9332-4217-b9d8-cae696629934</UserSecretsId>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
|
@ -5,7 +5,7 @@
|
||||
<Nullable>enable</Nullable>
|
||||
<OutputType>library</OutputType>
|
||||
<RuntimeIdentifiers>win-x64;linux-x64</RuntimeIdentifiers>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<PackageId>Phares.View.by.Distance.Property</PackageId>
|
||||
|
@ -4,7 +4,7 @@
|
||||
<LangVersion>10.0</LangVersion>
|
||||
<Nullable>enable</Nullable>
|
||||
<RuntimeIdentifiers>win-x64;linux-x64</RuntimeIdentifiers>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<PackageId>Phares.View.by.Distance.Shared</PackageId>
|
||||
|
Loading…
x
Reference in New Issue
Block a user