mirror of
https://github.com/Psychotoxical/psysonic.git
synced 2026-07-21 23:05:46 +00:00
fix(random-mix): keyword blocks and scoped genre list on Build a Mix (#965)
* fix(random-mix): honor keyword blocks and scope genre list to library Keyword filter was gated behind the audiobook exclusion checkbox, so blocked artists still appeared after Remix. Genre Mix now loads genres via fetchGenreCatalog (scoped index / library filter) instead of raw getGenres; show empty state when all tracks are filtered out. * docs(changelog): credit zunoz on Psysonic Discord for PR #965
This commit is contained in:
@@ -6,6 +6,7 @@ interface Props {
|
||||
isMobile: boolean;
|
||||
genreMixExpanded: boolean;
|
||||
setGenreMixExpanded: React.Dispatch<React.SetStateAction<boolean>>;
|
||||
genresLoading: boolean;
|
||||
serverGenresLength: number;
|
||||
displayedGenres: string[];
|
||||
allAvailableGenresLength: number;
|
||||
@@ -18,7 +19,7 @@ interface Props {
|
||||
|
||||
export default function RandomMixGenrePanel({
|
||||
isMobile, genreMixExpanded, setGenreMixExpanded,
|
||||
serverGenresLength, displayedGenres, allAvailableGenresLength,
|
||||
genresLoading, serverGenresLength, displayedGenres, allAvailableGenresLength,
|
||||
selectedGenre, genreMixLoading, onSelectAll, onSelectGenre, onShuffle,
|
||||
}: Props) {
|
||||
const { t } = useTranslation();
|
||||
@@ -43,9 +44,9 @@ export default function RandomMixGenrePanel({
|
||||
<div style={{ marginTop: isMobile ? '0.75rem' : 0 }}>
|
||||
<p style={{ fontSize: 12, color: 'var(--text-muted)', marginBottom: '0.75rem' }}>{t('randomMix.genreMixDesc')}</p>
|
||||
<div style={{ display: 'flex', flexWrap: 'wrap', gap: '0.4rem', alignItems: 'center' }}>
|
||||
{serverGenresLength === 0 ? (
|
||||
{genresLoading ? (
|
||||
<div className="spinner" style={{ width: 14, height: 14 }} />
|
||||
) : displayedGenres.length === 0 ? (
|
||||
) : serverGenresLength === 0 || displayedGenres.length === 0 ? (
|
||||
<span style={{ fontSize: 12, color: 'var(--text-muted)' }}>{t('randomMix.genreMixNoGenres')}</span>
|
||||
) : (
|
||||
<>
|
||||
|
||||
Reference in New Issue
Block a user