mirror of
https://github.com/antebudimir/feishin.git
synced 2026-01-01 18:33:33 +00:00
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:
parent
89e27ec6ff
commit
b0d86ee5c9
9 changed files with 131 additions and 13 deletions
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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(),
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue