run dotnet format
This commit is contained in:
parent
afc7d1a964
commit
93fac23128
2 changed files with 12 additions and 10 deletions
|
|
@ -322,12 +322,14 @@ public class TorBoxTorrentClient(ILogger<TorBoxTorrentClient> logger, IHttpClien
|
|||
{
|
||||
return fileName.Trim('"');
|
||||
}
|
||||
} else
|
||||
}
|
||||
else
|
||||
{
|
||||
if (response.Content.Headers.ContentType?.MediaType == "application/zip")
|
||||
{
|
||||
return $"download-{new Random().Next(1, 10001)}.zip";
|
||||
} else
|
||||
}
|
||||
else
|
||||
{
|
||||
logger.LogDebug($"Failed to get filename for URI {downloadUrl}");
|
||||
}
|
||||
|
|
@ -353,7 +355,7 @@ public class TorBoxTorrentClient(ILogger<TorBoxTorrentClient> logger, IHttpClien
|
|||
|
||||
return Map(result!);
|
||||
}
|
||||
|
||||
|
||||
public static void MoveHashDirContents(String extractPath, Torrent _torrent)
|
||||
{
|
||||
var hashDir = Path.Combine(extractPath, _torrent.Hash);
|
||||
|
|
|
|||
|
|
@ -11,13 +11,13 @@ namespace RdtClient.Service.Services;
|
|||
public class UnpackClient(Download download, String destinationPath)
|
||||
{
|
||||
public Boolean Finished { get; private set; }
|
||||
|
||||
|
||||
public String? Error { get; private set; }
|
||||
|
||||
|
||||
public Int32 Progess { get; private set; }
|
||||
|
||||
private readonly Torrent _torrent = download.Torrent ?? throw new($"Torrent is null");
|
||||
|
||||
|
||||
private readonly CancellationTokenSource _cancellationTokenSource = new();
|
||||
|
||||
public void Start()
|
||||
|
|
@ -70,13 +70,13 @@ public class UnpackClient(Download download, String destinationPath)
|
|||
if (archiveEntries.Any(m => m.Contains(".r00")))
|
||||
{
|
||||
extractPathTemp = Path.Combine(extractPath, Guid.NewGuid().ToString());
|
||||
|
||||
|
||||
if (!Directory.Exists(extractPathTemp))
|
||||
{
|
||||
Directory.CreateDirectory(extractPathTemp);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (extractPathTemp != null)
|
||||
{
|
||||
Extract(filePath, extractPathTemp, cancellationToken);
|
||||
|
|
@ -168,10 +168,10 @@ public class UnpackClient(Download download, String destinationPath)
|
|||
d =>
|
||||
{
|
||||
Debug.WriteLine(d);
|
||||
Progess = (Int32) Math.Round(d);
|
||||
Progess = (Int32)Math.Round(d);
|
||||
},
|
||||
cancellationToken: cancellationToken);
|
||||
|
||||
|
||||
archive.Dispose();
|
||||
|
||||
GC.Collect();
|
||||
|
|
|
|||
Loading…
Reference in a new issue