[TB] fix: download urls still not returning filename via HEAD.
This commit is contained in:
parent
fd7bc529c8
commit
9d57466472
1 changed files with 9 additions and 0 deletions
|
|
@ -322,6 +322,15 @@ public class TorBoxTorrentClient(ILogger<TorBoxTorrentClient> logger, IHttpClien
|
|||
{
|
||||
return fileName.Trim('"');
|
||||
}
|
||||
} else
|
||||
{
|
||||
if (response.Content.Headers.ContentType?.MediaType == "application/zip")
|
||||
{
|
||||
return $"download-{new Random().Next(1, 10001)}.zip";
|
||||
} else
|
||||
{
|
||||
logger.LogDebug($"Failed to get filename for URI {downloadUrl}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue