assume lists with no file extension are in raw txt format

This commit is contained in:
Collin M. Barrett 2019-06-27 08:52:57 -05:00
parent 7f37515cfa
commit 0cc92c8ff3

View file

@ -31,9 +31,10 @@ public Handler(HttpClient httpClient)
protected override async Task Handle(Command request, CancellationToken cancellationToken)
{
if (Path.GetExtension(request.ListInfo.ViewUrl.AbsolutePath) == ".txt")
if (!Path.HasExtension(request.ListInfo.ViewUrl.AbsolutePath) ||
Path.GetExtension(request.ListInfo.ViewUrl.AbsolutePath) == ".txt")
{
Debug.WriteLine($"Downloading list {request.ListInfo.Id}...");
Debug.WriteLine($"Downloading list {request.ListInfo.Id} from {request.ListInfo.ViewUrl}...");
try
{
using (var result = await _httpClient.GetAsync(request.ListInfo.ViewUrl, cancellationToken))