From 0a797db129c3f4089212cae635848b8944e88bb5 Mon Sep 17 00:00:00 2001 From: Arkadiusz Fal Date: Wed, 15 Jun 2022 23:48:38 +0200 Subject: [PATCH] Improve Invidious thumbnails URL handling --- Model/Applications/InvidiousAPI.swift | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/Model/Applications/InvidiousAPI.swift b/Model/Applications/InvidiousAPI.swift index d892133b..98b37e18 100644 --- a/Model/Applications/InvidiousAPI.swift +++ b/Model/Applications/InvidiousAPI.swift @@ -410,11 +410,12 @@ final class InvidiousAPI: Service, ObservableObject, VideosAPI { func extractChannel(from json: JSON) -> Channel { var thumbnailURL = json["authorThumbnails"].arrayValue.last?.dictionaryValue["url"]?.stringValue ?? "" - // append https protocol to unproxied thumbnail URL if it's missing + // append protocol to unproxied thumbnail URL if it's missing if thumbnailURL.count > 2, - String(thumbnailURL[..