mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-15 13:00:25 +02:00
Add optional chain to jf genres
This commit is contained in:
@@ -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 New Issue
Block a user