From 6f696c9262a36ad7c0a584662e5a0c621fbb0d4e Mon Sep 17 00:00:00 2001 From: telyn <175827+telyn@users.noreply.github.com> Date: Mon, 22 Dec 2025 14:59:39 +0000 Subject: [PATCH] [invidious] default thumbnail hostname to configured URL's For context, Invidious performs a type check of its configuration during bootup, and allows the "domain" to be unspecified, in which case the API and HTML it generates includes path-only URLs. This is valid: in these cases we should assume that the Host for those URLs is the same as the Host we used to access the endpoint called. This commit adds support for servers configured in such a way, by defaulting the host of thumbnail URLs, to that used for authentication. --- Model/Applications/InvidiousAPI.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Model/Applications/InvidiousAPI.swift b/Model/Applications/InvidiousAPI.swift index f64f0955..6e2f313d 100644 --- a/Model/Applications/InvidiousAPI.swift +++ b/Model/Applications/InvidiousAPI.swift @@ -612,6 +612,9 @@ final class InvidiousAPI: Service, ObservableObject, VideosAPI { // Some instances are not configured properly and return thumbnail links // with an incorrect scheme or a missing port. components.scheme = accountUrlComponents.scheme + if (components.host ?? "") == "" { + components.host = accountUrlComponents.host + } components.port = accountUrlComponents.port // If basic HTTP authentication is used,