Skip to content

🎧 Your Personal Streaming Service

UI: When navigating to another resource, pre-fill the filter with the parent info

Deluan04637b24cd02
diff --git a/ui/src/album/AlbumList.js b/ui/src/album/AlbumList.js
index c88a047c6..cc0cc79e7 100644
--- a/ui/src/album/AlbumList.js
+++ b/ui/src/album/AlbumList.js
@@ -35,7 +35,7 @@ const AlbumDetails = (props) => {
}
const albumRowClick = (id, basePath, record) =>
- `/song?filter={"album_id":"${record.id}"}&order=ASC&sort=trackNumber`
+ `/song?filter={"artist":"${record.artist}","album":"${record.name}","album_id":"${record.id}"}&order=ASC&sort=trackNumber`
const AlbumList = (props) => (
<List
diff --git a/ui/src/artist/ArtistList.js b/ui/src/artist/ArtistList.js
index 7a345779f..0b58cac55 100644
--- a/ui/src/artist/ArtistList.js
+++ b/ui/src/artist/ArtistList.js
@@ -16,7 +16,7 @@ const ArtistFilter = (props) => (
)
const artistRowClick = (id, basePath, record) =>
- `/album?filter={"artist_id":"${record.id}"}&order=ASC&sort=year`
+ `/album?filter={"artist":"${record.name}","artist_id":"${record.id}"}&order=ASC&sort=year`
const ArtistList = (props) => (
<List