feat(ratings): mix cutoff filter for random flows and home, i18n

Apply the same per-axis star cutoff to random mix (multi-batch fetch until
full), random albums, Hero, and Home hero/discover rows. Prefetch artist and
album ratings via Subsonic when list payloads omit them. Exclude items when
0 < rating ≤ threshold; 0 or missing counts as unrated.

Settings: rating filter description interpolates sidebar menu labels; Russian
strings for custom title bar; short axis labels aligned across locales.
This commit is contained in:
Maxim Isaev
2026-04-08 04:57:26 +03:00
parent 8a1d942128
commit 1624880c2a
21 changed files with 557 additions and 137 deletions
+4 -1
View File
@@ -54,6 +54,8 @@ interface AlbumTrackListProps {
currentTrack: Track | null;
isPlaying: boolean;
ratings: Record<string, number>;
/** Merged after local `ratings` (e.g. skip→1★ optimistic updates). */
userRatingOverrides: Record<string, number>;
starredSongs: Set<string>;
onPlaySong: (song: SubsonicSong) => void;
onRate: (songId: string, rating: number) => void;
@@ -67,6 +69,7 @@ export default function AlbumTrackList({
currentTrack,
isPlaying,
ratings,
userRatingOverrides,
starredSongs,
onPlaySong,
onRate,
@@ -252,7 +255,7 @@ export default function AlbumTrackList({
return (
<StarRating
key="rating"
value={ratings[song.id] ?? song.userRating ?? 0}
value={ratings[song.id] ?? userRatingOverrides[song.id] ?? song.userRating ?? 0}
onChange={r => onRate(song.id, r)}
/>
);