fix(statistics): cache Subsonic stat fetches and localize duration units

Add 7-minute TTL caches (same idea as rating prefetch) for overview
album strips, random-song format sample, and paginated library
aggregates; key by server and music folder.

Introduce formatHumanHoursMinutes with common.duration* strings in all
locales for Statistics and playlist duration labels.

Refresh RU/ZH statistics and nav wording; fix zh playtime label.
This commit is contained in:
Maxim Isaev
2026-04-10 01:39:08 +03:00
parent fc40d235d0
commit 6f6cb0fd6b
12 changed files with 233 additions and 90 deletions
+6 -4
View File
@@ -21,7 +21,7 @@ export const ruTranslation = {
offlineLibrary: 'Офлайн-библиотека',
genres: 'Жанры',
playlists: 'Плейлисты',
mostPlayed: 'Часто слушаемое',
mostPlayed: 'Чаще всего',
radio: 'Онлайн-радио',
folderBrowser: 'Браузер папок',
libraryScope: 'Область медиатеки',
@@ -375,6 +375,8 @@ export const ruTranslation = {
updaterAurHint: 'Установить обновление через AUR:',
updaterErrorMsg: 'Ошибка загрузки',
updaterRetryBtn: 'Повторить',
durationHoursMinutes: '{{hours}}ч {{minutes}}мин',
durationMinutesOnly: '{{minutes}}мин',
updaterOpenGitHub: 'Открыть на GitHub',
},
settings: {
@@ -794,8 +796,8 @@ export const ruTranslation = {
statAlbums: 'Альбомы',
statSongs: 'Треки',
statGenres: 'Жанры',
statPlaytime: 'Всего прослушано',
genreInsights: 'Жанры подробнее',
statPlaytime: 'Время звучания',
genreInsights: 'По жанрам',
formatDistribution: 'Форматы',
formatSample: 'Выборка {{n}} треков',
computing: 'Считаем…',
@@ -933,7 +935,7 @@ export const ruTranslation = {
downloadZip: 'Скачать (ZIP)',
},
mostPlayed: {
title: 'Часто слушаемое',
title: 'Чаще всего',
topArtists: 'Топ исполнителей',
topAlbums: 'Топ альбомов',
plays: '{{n}} прослушиваний',