feat(subsonic): per-server music folder filter and sidebar picker (#125)

Adds library scoping per server: users can select one Navidrome music
folder or 'All' from a new sidebar dropdown. Choice is persisted per
server ID in localStorage. A musicLibraryFilterVersion counter triggers
refetches across browsing pages when the scope changes.

- getMusicFolders() + libraryFilterParams() in subsonic.ts
- New fields in authStore: musicFolders, musicLibraryFilterByServer,
  musicLibraryFilterVersion, setMusicFolders, setMusicLibraryFilter
- Sidebar dropdown via createPortal; collapses to icon in narrow mode
- API scoping applied to: getAlbumList2, getRandomSongs, getArtists,
  getStarred2, search3
- Full i18n coverage (en, de, fr, nl, zh, nb, ru)

Review fixes applied (co-authored):
- Sidebar: title={} → data-tooltip + data-tooltip-pos='right'
- authStore: setMusicFolders merged into single set() call
- Locales: removed dead libraryScopeHint key from all 7 files
- Genres.tsx: removed musicLibraryFilterVersion dep (getGenres unscoped)

Co-authored-by: cucadmuh <cucadmuh@users.noreply.github.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Psychotoxical
2026-04-07 13:54:57 +02:00
30 changed files with 489 additions and 35 deletions
+2
View File
@@ -20,6 +20,8 @@ export const deTranslation = {
genres: 'Genres',
playlists: 'Playlists',
radio: 'Internetradio',
libraryScope: 'Bibliotheksumfang',
allLibraries: 'Alle Bibliotheken',
},
home: {
hero: 'Featured',
+2
View File
@@ -21,6 +21,8 @@ export const enTranslation = {
genres: 'Genres',
playlists: 'Playlists',
radio: 'Internet Radio',
libraryScope: 'Library scope',
allLibraries: 'All libraries',
},
home: {
hero: 'Featured',
+2
View File
@@ -20,6 +20,8 @@ export const frTranslation = {
genres: 'Genres',
playlists: 'Playlists',
radio: 'Radio Internet',
libraryScope: 'Portée de la bibliothèque',
allLibraries: 'Toutes les bibliothèques',
},
home: {
hero: 'En vedette',
+2
View File
@@ -20,6 +20,8 @@ export const nbTranslation = {
genres: 'Sjangere',
playlists: 'Spillelister',
radio: 'Internettradio',
libraryScope: 'Biblioteksomfang',
allLibraries: 'Alle biblioteker',
},
home: {
hero: 'Utvalgt',
+2
View File
@@ -20,6 +20,8 @@ export const nlTranslation = {
genres: 'Genres',
playlists: 'Playlists',
radio: 'Internetradio',
libraryScope: 'Bibliotheekbereik',
allLibraries: 'Alle bibliotheken',
},
home: {
hero: 'Uitgelicht',
+2
View File
@@ -21,6 +21,8 @@ export const ruTranslation = {
genres: 'Жанры',
playlists: 'Плейлисты',
radio: 'Онлайн-радио',
libraryScope: 'Область медиатеки',
allLibraries: 'Все библиотеки',
},
home: {
hero: 'Подборка',
+2
View File
@@ -20,6 +20,8 @@ export const zhTranslation = {
genres: '流派',
playlists: '播放列表',
radio: '网络电台',
libraryScope: '资料库范围',
allLibraries: '所有资料库',
},
home: {
hero: '精选',