Improved streams detection
authorMichael <heluecht@pirati.ca>
Thu, 16 May 2024 15:26:46 +0000 (15:26 +0000)
committerMichael <heluecht@pirati.ca>
Thu, 16 May 2024 15:26:46 +0000 (15:26 +0000)
src/Model/GServer.php

index f4ef38e..8eb77bd 100644 (file)
@@ -1589,6 +1589,9 @@ class GServer
                $name = 'nomad';
                $curlResult = DI::httpClient()->get($url . '/manifest', 'application/manifest+json', [HttpClientOptions::REQUEST => HttpClientRequest::SERVERINFO]);
                if (!$curlResult->isSuccess() || ($curlResult->getBodyString() == '')) {
+                       if ($curlResult->getReturnCode() == 418) {
+                               $name = 'streams';
+                       }
                        return $name;
                }