diff --git a/src/FilterLists.Agent/Core/List/IListRepository.cs b/src/FilterLists.Agent/Core/List/IListRepository.cs index 09cc98236..1ebf201cb 100644 --- a/src/FilterLists.Agent/Core/List/IListRepository.cs +++ b/src/FilterLists.Agent/Core/List/IListRepository.cs @@ -7,6 +7,6 @@ namespace FilterLists.Agent.Core.List { public interface IListRepository { - Task GetListStreamAsync(Uri url, CancellationToken cancellationToken); + Task GetAsStreamAsync(Uri url, CancellationToken cancellationToken); } } \ No newline at end of file diff --git a/src/FilterLists.Agent/Features/Lists/DownloadRawText.cs b/src/FilterLists.Agent/Features/Lists/DownloadRawText.cs index 335d7454a..b1114373d 100644 --- a/src/FilterLists.Agent/Features/Lists/DownloadRawText.cs +++ b/src/FilterLists.Agent/Features/Lists/DownloadRawText.cs @@ -34,7 +34,7 @@ public Handler(IListRepository listRepository) protected override async Task Handle(Command request, CancellationToken cancellationToken) { var destinationPath = BuildDestinationPath(request); - using var input = await _repo.GetListStreamAsync(request.ListUrl.ViewUrl, cancellationToken); + using var input = await _repo.GetAsStreamAsync(request.ListUrl.ViewUrl, cancellationToken); using var output = File.OpenWrite(destinationPath); await input.CopyToAsync(output, cancellationToken); } diff --git a/src/FilterLists.Agent/Features/Lists/DownloadSevenZip.cs b/src/FilterLists.Agent/Features/Lists/DownloadSevenZip.cs index adbe92a32..9c8abb12d 100644 --- a/src/FilterLists.Agent/Features/Lists/DownloadSevenZip.cs +++ b/src/FilterLists.Agent/Features/Lists/DownloadSevenZip.cs @@ -34,7 +34,7 @@ public Handler(IListRepository listRepository) protected override async Task Handle(Command request, CancellationToken cancellationToken) { var destinationDirectoryPath = Path.Combine(RepoDirectory, $"{request.ListUrl.Id}"); - using var input = await _repo.GetListStreamAsync(request.ListUrl.ViewUrl, cancellationToken); + using var input = await _repo.GetAsStreamAsync(request.ListUrl.ViewUrl, cancellationToken); using var archive = SevenZipArchive.Open(input); foreach (var entry in archive.Entries) if (!entry.IsDirectory) diff --git a/src/FilterLists.Agent/Features/Lists/DownloadZip.cs b/src/FilterLists.Agent/Features/Lists/DownloadZip.cs index 8c8d2cfbc..60965cbf4 100644 --- a/src/FilterLists.Agent/Features/Lists/DownloadZip.cs +++ b/src/FilterLists.Agent/Features/Lists/DownloadZip.cs @@ -33,7 +33,7 @@ public Handler(IListRepository listRepository) protected override async Task Handle(Command request, CancellationToken cancellationToken) { var destinationDirectoryPath = Path.Combine(RepoDirectory, $"{request.ListUrl.Id}"); - using var input = await _repo.GetListStreamAsync(request.ListUrl.ViewUrl, cancellationToken); + using var input = await _repo.GetAsStreamAsync(request.ListUrl.ViewUrl, cancellationToken); using var reader = ReaderFactory.Open(input); while (reader.MoveToNextEntry()) if (!reader.Entry.IsDirectory) diff --git a/src/FilterLists.Agent/Infrastructure/ListRepository.cs b/src/FilterLists.Agent/Infrastructure/ListRepository.cs index 20484db2f..137620392 100644 --- a/src/FilterLists.Agent/Infrastructure/ListRepository.cs +++ b/src/FilterLists.Agent/Infrastructure/ListRepository.cs @@ -27,7 +27,7 @@ public ListRepository(HttpClient httpClient, ILogger logger) _logger = logger; } - public async Task GetListStreamAsync(Uri url, CancellationToken cancellationToken) + public async Task GetAsStreamAsync(Uri url, CancellationToken cancellationToken) { using var response = await _httpClient.GetAsync(url, cancellationToken); if (response.IsSuccessStatusCode)