mirror of
https://github.com/Jellyfin2Samsung/Samsung-Jellyfin-Installer.git
synced 2026-03-01 11:21:12 +03:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7792b3c276 | ||
|
|
f3c81a1400 | ||
|
|
a5e7c0e9ca |
@@ -85,7 +85,7 @@ namespace Jellyfin2Samsung.Helpers
|
||||
// ----- Application-scoped settings (readonly at runtime) -----
|
||||
public string ReleasesUrl { get; set; } = "https://api.github.com/repos/jeppevinkel/jellyfin-tizen-builds/releases";
|
||||
public string AuthorEndpoint { get; set; } = "https://dev.tizen.samsung.com/apis/v2/authors";
|
||||
public string AppVersion { get; set; } = "v2.2.0.9";
|
||||
public string AppVersion { get; set; } = "v2.2.0.8";
|
||||
public string TizenSdb { get; set; } = "https://api.github.com/repos/PatrickSt1991/tizen-sdb/releases";
|
||||
public string JellyfinAvRelease { get; set; } = "https://api.github.com/repos/PatrickSt1991/tizen-jellyfin-avplay/releases";
|
||||
public string JellyfinAvReleaseFork { get; set; } = "https://api.github.com/repos/asamahy/tizen-jellyfin-avplay/releases";
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Net;
|
||||
using System.Net.Http;
|
||||
using System.Net.Http.Headers;
|
||||
using System.Threading;
|
||||
@@ -18,7 +17,7 @@ namespace Jellyfin2Samsung.Helpers.Core
|
||||
_token = token;
|
||||
}
|
||||
|
||||
protected override async Task<HttpResponseMessage> SendAsync(
|
||||
protected override Task<HttpResponseMessage> SendAsync(
|
||||
HttpRequestMessage request,
|
||||
CancellationToken cancellationToken)
|
||||
{
|
||||
@@ -27,23 +26,7 @@ namespace Jellyfin2Samsung.Helpers.Core
|
||||
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", _token);
|
||||
}
|
||||
|
||||
var response = await base.SendAsync(request, cancellationToken);
|
||||
|
||||
// Token is expired or revoked — retry unauthenticated for public endpoints
|
||||
if (response.StatusCode == HttpStatusCode.Unauthorized &&
|
||||
request.Headers.Authorization != null)
|
||||
{
|
||||
Trace.TraceWarning("[GitHubAuth] Token rejected (401) — retrying without authorization");
|
||||
var retry = new HttpRequestMessage(request.Method, request.RequestUri);
|
||||
foreach (var header in request.Headers)
|
||||
{
|
||||
if (!string.Equals(header.Key, "Authorization", StringComparison.OrdinalIgnoreCase))
|
||||
retry.Headers.TryAddWithoutValidation(header.Key, header.Value);
|
||||
}
|
||||
response = await base.SendAsync(retry, cancellationToken);
|
||||
}
|
||||
|
||||
return response;
|
||||
return base.SendAsync(request, cancellationToken);
|
||||
}
|
||||
|
||||
private static bool IsGitHubRequest(Uri? uri)
|
||||
|
||||
@@ -31,8 +31,8 @@
|
||||
|
||||
| Channel | Version | Notes |
|
||||
|------------|---------------------------------------------------------------------|------------------------------|
|
||||
| **Stable** | [v2.2.0.8](https://github.com/Jellyfin2Samsung/Samsung-Jellyfin-Installer/releases/tag/v2.2.0.8) | Recommended for most users |
|
||||
| **Beta** | [v2.2.0.9-beta](https://github.com/Jellyfin2Samsung/Samsung-Jellyfin-Installer/releases/tag/v2.2.0.9-beta) | Includes new features |
|
||||
| **Stable** | [v2.2.0.7](https://github.com/Jellyfin2Samsung/Samsung-Jellyfin-Installer/releases/tag/v2.2.0.7) | Recommended for most users |
|
||||
| **Beta** | [v2.2.0.8-beta](https://github.com/Jellyfin2Samsung/Samsung-Jellyfin-Installer/releases/tag/v2.2.0.8-beta) | Includes new features |
|
||||
|
||||
<!-- versions:end -->
|
||||
|
||||
|
||||
Reference in New Issue
Block a user