Support tags, and better participants for servers

- Parses `tags` for Navidrome (mapping string: string[])
- Parses `Tags` (and fetches for it) for Jellyfin (map a string to empty, and display as a bool)
- Clean parsing of participants for Navidrome/Subsonic
- Only show `People` for Jellyfin, not clickable
This commit is contained in:
Kendall Garner 2025-05-17 21:35:58 -07:00
parent 89e27ec6ff
commit b0d86ee5c9
No known key found for this signature in database
GPG key ID: 9355F387FE765C94
9 changed files with 131 additions and 13 deletions

View file

@ -191,6 +191,7 @@ const normalizeSong = (
serverType: ServerType.NAVIDROME,
size: item.size,
streamUrl: `${server?.url}/rest/stream.view?id=${id}&v=1.13.0&c=Feishin&${server?.credential}`,
tags: item.tags || null,
trackNumber: item.trackNumber,
uniqueId: nanoid(),
updatedAt: item.updatedAt,
@ -236,6 +237,7 @@ const normalizeAlbum = (
isCompilation: item.compilation,
itemType: LibraryItem.ALBUM,
lastPlayedAt: normalizePlayDate(item),
mbzId: item.mbzAlbumId || null,
name: item.name,
originalDate: item.originalDate
@ -254,6 +256,7 @@ const normalizeAlbum = (
size: item.size,
songCount: item.songCount,
songs: item.songs ? item.songs.map((song) => normalizeSong(song, server)) : undefined,
tags: item.tags || null,
uniqueId: nanoid(),
updatedAt: item.updatedAt,
userFavorite: item.starred,

View file

@ -155,6 +155,7 @@ const album = z.object({
sortArtistName: z.string(),
starred: z.boolean(),
starredAt: z.string().optional(),
tags: z.record(z.string(), z.array(z.string())).optional(),
updatedAt: z.string(),
});