Add optional chain to jf genres
This commit is contained in:
parent
1327d58b23
commit
95780f1969
1 changed files with 4 additions and 4 deletions
|
@ -151,7 +151,7 @@ const normalizeSong = (
|
||||||
createdAt: item.DateCreated,
|
createdAt: item.DateCreated,
|
||||||
discNumber: (item.ParentIndexNumber && item.ParentIndexNumber) || 1,
|
discNumber: (item.ParentIndexNumber && item.ParentIndexNumber) || 1,
|
||||||
duration: item.RunTimeTicks / 10000000,
|
duration: item.RunTimeTicks / 10000000,
|
||||||
genres: item.GenreItems.map((entry) => ({
|
genres: item.GenreItems?.map((entry) => ({
|
||||||
id: entry.Id,
|
id: entry.Id,
|
||||||
imageUrl: null,
|
imageUrl: null,
|
||||||
itemType: LibraryItem.GENRE,
|
itemType: LibraryItem.GENRE,
|
||||||
|
@ -209,7 +209,7 @@ const normalizeAlbum = (
|
||||||
backdropImageUrl: null,
|
backdropImageUrl: null,
|
||||||
createdAt: item.DateCreated,
|
createdAt: item.DateCreated,
|
||||||
duration: item.RunTimeTicks / 10000000,
|
duration: item.RunTimeTicks / 10000000,
|
||||||
genres: item.GenreItems.map((entry) => ({
|
genres: item.GenreItems?.map((entry) => ({
|
||||||
id: entry.Id,
|
id: entry.Id,
|
||||||
imageUrl: null,
|
imageUrl: null,
|
||||||
itemType: LibraryItem.GENRE,
|
itemType: LibraryItem.GENRE,
|
||||||
|
@ -266,7 +266,7 @@ const normalizeAlbumArtist = (
|
||||||
backgroundImageUrl: null,
|
backgroundImageUrl: null,
|
||||||
biography: item.Overview || null,
|
biography: item.Overview || null,
|
||||||
duration: item.RunTimeTicks / 10000,
|
duration: item.RunTimeTicks / 10000,
|
||||||
genres: item.GenreItems.map((entry) => ({
|
genres: item.GenreItems?.map((entry) => ({
|
||||||
id: entry.Id,
|
id: entry.Id,
|
||||||
imageUrl: null,
|
imageUrl: null,
|
||||||
itemType: LibraryItem.GENRE,
|
itemType: LibraryItem.GENRE,
|
||||||
|
@ -307,7 +307,7 @@ const normalizePlaylist = (
|
||||||
return {
|
return {
|
||||||
description: item.Overview || null,
|
description: item.Overview || null,
|
||||||
duration: item.RunTimeTicks / 10000,
|
duration: item.RunTimeTicks / 10000,
|
||||||
genres: item.GenreItems.map((entry) => ({
|
genres: item.GenreItems?.map((entry) => ({
|
||||||
id: entry.Id,
|
id: entry.Id,
|
||||||
imageUrl: null,
|
imageUrl: null,
|
||||||
itemType: LibraryItem.GENRE,
|
itemType: LibraryItem.GENRE,
|
||||||
|
|
Reference in a new issue