Browse Source

Fix civitai login dialog not showing when needed

pull/495/head
JT 9 months ago
parent
commit
bce305b216
  1. 1
      CHANGELOG.md
  2. 7
      StabilityMatrix.Core/Services/DownloadService.cs

1
CHANGELOG.md

@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning 2.0](https://semver.org/spec/v2
- (Internal) Updated to Avalonia 11.0.9
### Fixed
- Fixed image viewer dialog arrow key navigation not working
- Fixed CivitAI login prompt not showing when downloading models that require CivitAI logins
## v2.9.0-pre.1
### Added

7
StabilityMatrix.Core/Services/DownloadService.cs

@ -1,4 +1,5 @@
using System.Net.Http.Headers;
using System.Net;
using System.Net.Http.Headers;
using Microsoft.Extensions.Logging;
using Polly.Contrib.WaitAndRetry;
using StabilityMatrix.Core.Attributes;
@ -184,6 +185,10 @@ public class DownloadService : IDownloadService
throw new UnauthorizedAccessException();
}
}
else if (noRedirectResponse.StatusCode == HttpStatusCode.Unauthorized)
{
throw new UnauthorizedAccessException();
}
using var redirectRequest = new HttpRequestMessage();
redirectRequest.Method = HttpMethod.Get;

Loading…
Cancel
Save