Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
16b6ea8f29 | ||
|
|
7150ea2987 | ||
|
|
bc2febf480 | ||
|
|
11ec48a506 |
+2
-2
@@ -1,6 +1,6 @@
|
||||
cask "plezy" do
|
||||
version "1.31.1"
|
||||
sha256 "8f10cf123a1e3afdb8f386ce822170bc7eb1df6b9d50077d449d6891c1528505"
|
||||
version "1.31.2"
|
||||
sha256 "9d2e403ff8a0449318deab16fe1232accc3959731bb44464dc4609e80a1c04f8"
|
||||
|
||||
url "https://github.com/edde746/plezy/releases/download/#{version}/plezy-macos.dmg"
|
||||
name "Plezy"
|
||||
|
||||
@@ -721,7 +721,7 @@ class PlexServer {
|
||||
);
|
||||
|
||||
if (!result.success) {
|
||||
appLogger.w('HTTPS upgrade failed, staying on HTTP candidate', error: {'url': currentUrl});
|
||||
appLogger.w('HTTPS upgrade failed, staying on HTTP candidate', error: {'url': currentUrl, 'reason': result.error});
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -795,18 +795,19 @@ class PlexServer {
|
||||
) {
|
||||
if (entries.isEmpty) return null;
|
||||
|
||||
// Sort by latency first, then by protocol (HTTPS > HTTP), then by URL type (prefer plex.direct)
|
||||
// Sort by protocol first (HTTPS enables H2 multiplexing), then latency, then URL type
|
||||
entries.sort((a, b) {
|
||||
final latencyCompare = a.value.latencyMs.compareTo(b.value.latencyMs);
|
||||
if (latencyCompare != 0) return latencyCompare;
|
||||
|
||||
// If latencies are equal, prefer HTTPS over HTTP
|
||||
// Prefer HTTPS over HTTP
|
||||
final aIsHttps = a.key.isHttps;
|
||||
final bIsHttps = b.key.isHttps;
|
||||
if (aIsHttps && !bIsHttps) return -1;
|
||||
if (!aIsHttps && bIsHttps) return 1;
|
||||
|
||||
// If latencies and protocols are equal, prefer plex.direct URI (isPlexDirectUri = true)
|
||||
// Within same protocol, sort by latency
|
||||
final latencyCompare = a.value.latencyMs.compareTo(b.value.latencyMs);
|
||||
if (latencyCompare != 0) return latencyCompare;
|
||||
|
||||
// Prefer plex.direct URI on tie
|
||||
if (a.key.isPlexDirectUri && !b.key.isPlexDirectUri) return -1;
|
||||
if (!a.key.isPlexDirectUri && b.key.isPlexDirectUri) return 1;
|
||||
return 0;
|
||||
|
||||
@@ -43,6 +43,13 @@ class _Http2WithFallbackAdapter implements HttpClientAdapter {
|
||||
appLogger.d('H2 handshake failed for ${options.uri.host}, falling back to HTTP/1.1');
|
||||
_http1Hosts.add(options.uri.host);
|
||||
return _http1Fallback.fetch(options, requestStream, cancelFuture);
|
||||
} catch (e) {
|
||||
if (e.toString().contains('HTTP/2')) {
|
||||
appLogger.d('H2 connection error for ${options.uri.host}, falling back to HTTP/1.1');
|
||||
_http1Hosts.add(options.uri.host);
|
||||
return _http1Fallback.fetch(options, requestStream, cancelFuture);
|
||||
}
|
||||
rethrow;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
name: plezy
|
||||
description: "A beautiful Plex client for Flutter"
|
||||
publish_to: "none"
|
||||
version: 1.31.2+66
|
||||
version: 1.31.3+67
|
||||
|
||||
environment:
|
||||
sdk: ^3.8.1
|
||||
|
||||
Reference in New Issue
Block a user