From 62f48353ba048f3e456ef9cbe42cff66c0c9d98b Mon Sep 17 00:00:00 2001 From: ITotalJustice <47043333+ITotalJustice@users.noreply.github.com> Date: Sun, 31 Aug 2025 01:48:27 +0100 Subject: [PATCH] download: use new etag cache file and delete the old one, this removes all the old themezer entries. --- sphaira/source/app.cpp | 7 ++++--- sphaira/source/download.cpp | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/sphaira/source/app.cpp b/sphaira/source/app.cpp index 8c032bf..6f0afa4 100644 --- a/sphaira/source/app.cpp +++ b/sphaira/source/app.cpp @@ -1495,9 +1495,10 @@ App::App(const char* argv0) { } { - // delete old themezer cache as themezer does not exit anymore. - SCOPED_TIMESTAMP("themezer cache delete"); - m_fs->DeleteDirectoryRecursively("/switch/sphaira/cache/themezer"); + // delete old cached folders/files on startup. + SCOPED_TIMESTAMP("old cache delete"); + m_fs->DeleteDirectoryRecursively("/switch/sphaira/cache/themezer"); // themezer icon/json cache. + m_fs->DeleteFile("/switch/sphaira/cache/cache.json"); // old etag cache. } if (log_is_init()) { diff --git a/sphaira/source/download.cpp b/sphaira/source/download.cpp index 5985c25..4a569d8 100644 --- a/sphaira/source/download.cpp +++ b/sphaira/source/download.cpp @@ -247,7 +247,7 @@ private: } } - static constexpr inline fs::FsPath JSON_PATH{"/switch/sphaira/cache/cache.json"}; + static constexpr inline fs::FsPath JSON_PATH{"/switch/sphaira/cache/etag_v2.json"}; static constexpr inline const char* ETAG_STR{"etag"}; static constexpr inline const char* LAST_MODIFIED_STR{"last-modified"};