now playing header now shows context menu

fixed now playing image gradient
This commit is contained in:
austinried
2021-08-16 11:57:36 +09:00
parent ad25972774
commit b5392b6731
9 changed files with 77 additions and 40 deletions

View File

@@ -116,7 +116,6 @@ export const useArtistArtFile = (artistId: string) => {
useEffect(() => {
if (!file && artistInfo && artistInfo.largeImageUrl) {
console.log(artistInfo.largeImageUrl)
cacheItem('artistArt', artistId, artistInfo.largeImageUrl)
}
}, [artistId, artistInfo, artistInfo?.largeImageUrl, cacheItem, file])

View File

@@ -279,11 +279,11 @@ function mapSongToTrack(song: Song, coverArtPaths: { [coverArt: string]: string
album: song.album || 'Unknown Album',
url: song.streamUri,
artwork:
song.coverArt && coverArtPaths[song.coverArt]
? `file://${coverArtPaths[song.coverArt]}`
: require('@res/fallback.png'),
song.coverArt && coverArtPaths[song.coverArt] ? coverArtPaths[song.coverArt] : require('@res/fallback.png'),
coverArt: song.coverArt,
duration: song.duration,
artistId: song.artistId,
albumId: song.albumId,
}
}
@@ -297,5 +297,7 @@ export function mapTrackExtToSong(track: TrackExt): Song {
streamUri: track.url as string,
coverArt: track.coverArt,
duration: track.duration,
artistId: track.artistId,
albumId: track.albumId,
}
}