diff --git a/src/components/Sidebar.tsx b/src/components/Sidebar.tsx
index 6cc42cc9..77a7319d 100644
--- a/src/components/Sidebar.tsx
+++ b/src/components/Sidebar.tsx
@@ -159,7 +159,7 @@ export default function Sidebar({
{t('sidebar.library')}
{selectedFolderName ? (
-
+
{selectedFolderName}
) : null}
diff --git a/src/locales/de.ts b/src/locales/de.ts
index ddc661dc..94b0b4bb 100644
--- a/src/locales/de.ts
+++ b/src/locales/de.ts
@@ -24,7 +24,6 @@ export const deTranslation = {
playlists: 'Playlists',
radio: 'Internetradio',
libraryScope: 'Bibliotheksumfang',
- libraryScopeHint: 'Gesamten Server-Katalog oder nur einen Medienordner durchsuchen.',
allLibraries: 'Alle Bibliotheken',
},
home: {
diff --git a/src/locales/en.ts b/src/locales/en.ts
index 451aa3e0..76d40444 100644
--- a/src/locales/en.ts
+++ b/src/locales/en.ts
@@ -24,7 +24,6 @@ export const enTranslation = {
playlists: 'Playlists',
radio: 'Internet Radio',
libraryScope: 'Library scope',
- libraryScopeHint: 'Browse either your whole server catalog or a single media folder.',
allLibraries: 'All libraries',
},
home: {
diff --git a/src/locales/fr.ts b/src/locales/fr.ts
index fe7d38a6..f9b33d47 100644
--- a/src/locales/fr.ts
+++ b/src/locales/fr.ts
@@ -24,7 +24,6 @@ export const frTranslation = {
playlists: 'Playlists',
radio: 'Radio Internet',
libraryScope: 'Portée de la bibliothèque',
- libraryScopeHint: 'Parcourir tout le catalogue du serveur ou un seul dossier média.',
allLibraries: 'Toutes les bibliothèques',
},
home: {
diff --git a/src/locales/nb.ts b/src/locales/nb.ts
index 9aef408f..7cae0bff 100644
--- a/src/locales/nb.ts
+++ b/src/locales/nb.ts
@@ -24,7 +24,6 @@ export const nbTranslation = {
playlists: 'Spillelister',
radio: 'Internettradio',
libraryScope: 'Biblioteksomfang',
- libraryScopeHint: 'Vis hele serverkatalogen eller én mediemappe.',
allLibraries: 'Alle biblioteker',
},
home: {
diff --git a/src/locales/nl.ts b/src/locales/nl.ts
index 5c5bba8a..c86a51ec 100644
--- a/src/locales/nl.ts
+++ b/src/locales/nl.ts
@@ -24,7 +24,6 @@ export const nlTranslation = {
playlists: 'Playlists',
radio: 'Internetradio',
libraryScope: 'Bibliotheekbereik',
- libraryScopeHint: 'Doorzoek de hele servercatalogus of één mediabibliotheek.',
allLibraries: 'Alle bibliotheken',
},
home: {
diff --git a/src/locales/ru.ts b/src/locales/ru.ts
index b95016d3..18aa00a5 100644
--- a/src/locales/ru.ts
+++ b/src/locales/ru.ts
@@ -25,7 +25,6 @@ export const ruTranslation = {
playlists: 'Плейлисты',
radio: 'Онлайн-радио',
libraryScope: 'Область медиатеки',
- libraryScopeHint: 'Показывать весь каталог сервера или только одну медиапапку.',
allLibraries: 'Все библиотеки',
},
home: {
diff --git a/src/locales/zh.ts b/src/locales/zh.ts
index e32427be..87b73671 100644
--- a/src/locales/zh.ts
+++ b/src/locales/zh.ts
@@ -24,7 +24,6 @@ export const zhTranslation = {
playlists: '播放列表',
radio: '网络电台',
libraryScope: '资料库范围',
- libraryScopeHint: '浏览整个服务器目录或仅单个媒体文件夹。',
allLibraries: '所有资料库',
},
home: {
diff --git a/src/pages/Genres.tsx b/src/pages/Genres.tsx
index 13c2c46f..cd153c20 100644
--- a/src/pages/Genres.tsx
+++ b/src/pages/Genres.tsx
@@ -49,7 +49,6 @@ const SCROLL_KEY = 'genres-scroll';
export default function Genres() {
const { t } = useTranslation();
const navigate = useNavigate();
- const musicLibraryFilterVersion = useAuthStore(s => s.musicLibraryFilterVersion);
const [genres, setGenres] = useState([]);
const [loading, setLoading] = useState(true);
const containerRef = useRef(null);
@@ -61,7 +60,7 @@ export default function Genres() {
setGenres(sorted);
})
.finally(() => setLoading(false));
- }, [musicLibraryFilterVersion]);
+ }, []); // getGenres is not folder-scoped — no dep on musicLibraryFilterVersion
// Restore scroll position after genres are rendered
useEffect(() => {
diff --git a/src/store/authStore.ts b/src/store/authStore.ts
index dfb29ed5..b24259d0 100644
--- a/src/store/authStore.ts
+++ b/src/store/authStore.ts
@@ -243,15 +243,17 @@ export const useAuthStore = create()(
setHotCacheDownloadDir: (v) => set({ hotCacheDownloadDir: v }),
setMusicFolders: (folders) => {
- set({ musicFolders: folders });
const sid = get().activeServerId;
- if (!sid) return;
- const f = get().musicLibraryFilterByServer[sid];
- if (f && f !== 'all' && !folders.some(x => x.id === f)) {
- set(s => ({
- musicLibraryFilterByServer: { ...s.musicLibraryFilterByServer, [sid]: 'all' },
- }));
- }
+ set(s => {
+ const f = sid ? s.musicLibraryFilterByServer[sid] : undefined;
+ const invalidFilter = f && f !== 'all' && !folders.some(x => x.id === f);
+ return {
+ musicFolders: folders,
+ ...(sid && invalidFilter
+ ? { musicLibraryFilterByServer: { ...s.musicLibraryFilterByServer, [sid]: 'all' } }
+ : {}),
+ };
+ });
},
setMusicLibraryFilter: (folderId) => {