queue ended now goes back to first track, stopped
artist view now has a min height
cover art fallback for track mapping
use dark colors before light ones for gradient
This commit is contained in:
austinried
2021-08-17 18:58:12 +09:00
parent d068288391
commit 52223e6979
6 changed files with 29 additions and 12 deletions

View File

@@ -15,13 +15,21 @@ export const selectTrackPlayerMap = {
export const createTrackPlayerMapSlice = (set: SetState<Store>, get: GetState<Store>): TrackPlayerMapSlice => ({
mapSongtoTrackExt: async song => {
let artwork = require('@res/fallback.png')
if (song.coverArt) {
const filePath = await get().fetchCoverArtFilePath(song.coverArt)
if (filePath) {
artwork = filePath
}
}
return {
id: song.id,
title: song.title,
artist: song.artist || 'Unknown Artist',
album: song.album || 'Unknown Album',
url: song.streamUri,
artwork: song.coverArt ? await get().fetchCoverArtFilePath(song.coverArt) : require('@res/fallback.png'),
artwork,
coverArt: song.coverArt,
duration: song.duration,
artistId: song.artistId,