From b3e4a243a91998afa4d3fd835fcc2ee937f243fa Mon Sep 17 00:00:00 2001 From: Bnyro Date: Mon, 31 Mar 2025 17:18:45 +0200 Subject: [PATCH] fix: thumbnails of videos containing '#' can't be downloaded --- .../main/java/com/github/libretube/services/DownloadService.kt | 2 +- app/src/main/java/com/github/libretube/util/TextUtils.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/github/libretube/services/DownloadService.kt b/app/src/main/java/com/github/libretube/services/DownloadService.kt index 19a21af1b..c71038f9a 100644 --- a/app/src/main/java/com/github/libretube/services/DownloadService.kt +++ b/app/src/main/java/com/github/libretube/services/DownloadService.kt @@ -172,7 +172,7 @@ class DownloadService : LifecycleService() { try { ImageHelper.downloadImage( this@DownloadService, - streams.thumbnailUrl, + ProxyHelper.rewriteUrlUsingProxyPreference(streams.thumbnailUrl), thumbnailTargetPath ) } catch (e: Exception) { diff --git a/app/src/main/java/com/github/libretube/util/TextUtils.kt b/app/src/main/java/com/github/libretube/util/TextUtils.kt index a9f62f7c9..bfe2c8714 100644 --- a/app/src/main/java/com/github/libretube/util/TextUtils.kt +++ b/app/src/main/java/com/github/libretube/util/TextUtils.kt @@ -29,7 +29,7 @@ object TextUtils { /** * Reserved characters by unix which can not be used for file name. */ - const val RESERVED_CHARS = "?:\"*|/\\<>\u0000" + const val RESERVED_CHARS = "#?:\"*|/\\<>\u0000" /** * Date time formatter which uses the [FormatStyle.MEDIUM] format style.