From 0a45edd6c3279680e14fc57c00fa17eaefc7386b Mon Sep 17 00:00:00 2001 From: theRealKLH <65736720+theRealKLH@users.noreply.github.com> Date: Tue, 13 Feb 2024 23:50:55 -0500 Subject: [PATCH] fix: broken cache --- ui/src/views/scenes/Details.vue | 12 ++++++------ ui/src/views/scenes/SceneCard.vue | 11 +++++++++-- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/ui/src/views/scenes/Details.vue b/ui/src/views/scenes/Details.vue index f98d327d3..cefe9e4d2 100644 --- a/ui/src/views/scenes/Details.vue +++ b/ui/src/views/scenes/Details.vue @@ -782,12 +782,12 @@ watch:{ return u } try { - if (u.startsWith('http') || u.startsWith('https')) { - if (strpos(u, "%") !== false) { - return '/img/' + size + '/' + decodeURI(u) - } - return '/img/' + size + '/' + encodeURI(u) - } else { + if (u.startsWith('http')) { + if (u.search("%") == -1) { + return '/img/' + size + '/' + encodeURI(u) + } else { + return '/img/' + size + '/' + encodeURI(decodeURI(u)) + } return u } } catch { diff --git a/ui/src/views/scenes/SceneCard.vue b/ui/src/views/scenes/SceneCard.vue index 1b74757f1..858fb6b82 100644 --- a/ui/src/views/scenes/SceneCard.vue +++ b/ui/src/views/scenes/SceneCard.vue @@ -172,8 +172,15 @@ export default { }, }, methods: { - getImageURL (u, size) { - return '/img/700x/' + u + getImageURL (u) { + if (u.startsWith('http') == false) { + return u + } + if (u.search("%") == -1) { + return '/img/700x/' + encodeURI(u) + } else { + return '/img/700x/' + encodeURI(decodeURI(u)) + } }, showDetails (scene) { // reRead is required when the SceneCard is clicked from the ActorDetails