initial implementation for lyrics

This commit is contained in:
Kendall Garner 2023-05-22 17:38:31 -07:00 committed by Jeff
parent 8eb0029bb8
commit 23f9bd4e9f
9 changed files with 223 additions and 11 deletions

View file

@ -155,6 +155,7 @@ const normalizeSong = (
imageUrl: getSongCoverArtUrl({ baseUrl: server?.url || '', item, size: imageSize || 100 }),
itemType: LibraryItem.SONG,
lastPlayedAt: null,
lyrics: null,
name: item.Name,
path: (item.MediaSources && item.MediaSources[0]?.Path) || null,
playCount: (item.UserData && item.UserData.PlayCount) || 0,

View file

@ -74,6 +74,7 @@ const normalizeSong = (
imageUrl,
itemType: LibraryItem.SONG,
lastPlayedAt: item.playDate.includes('0001-') ? null : item.playDate,
lyrics: item.lyrics ? item.lyrics : null,
name: item.title,
path: item.path,
playCount: item.playCount,

View file

@ -81,6 +81,7 @@ const normalizeSong = (
imageUrl,
itemType: LibraryItem.SONG,
lastPlayedAt: null,
lyrics: null,
name: item.title,
path: item.path,
playCount: item?.playCount || 0,

View file

@ -187,6 +187,7 @@ export type Song = {
imageUrl: string | null;
itemType: LibraryItem.SONG;
lastPlayedAt: string | null;
lyrics: string | null;
name: string;
path: string | null;
playCount: number;