Merge pull request #1884 from rahul-gill/main

fix: bad quality album art issue #1868
This commit is contained in:
Shabinder Singh 2022-10-24 03:19:00 +05:30 committed by GitHub
commit e16dc0720e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -202,14 +202,14 @@ class SpotifyProvider(
artists = it.artists?.map { artist -> artist?.name.toString() } ?: listOf(),
albumArtists = it.album?.artists?.mapNotNull { artist -> artist?.name } ?: emptyList(),
durationSec = (it.duration_ms / 1000).toInt(),
albumArtPath = fileManager.getImageCachePath(it.album?.images?.firstOrNull()?.url ?: ""),
albumArtPath = fileManager.getImageCachePath(it.album?.images?.maxByOrNull { img -> img?.width ?: 0 }?.url ?: ""),
albumName = it.album?.name,
year = it.album?.release_date,
comment = "Genres:${it.album?.genres?.joinToString()}",
trackUrl = it.href,
downloaded = it.updateStatusIfPresent(type, subFolder),
source = Source.Spotify,
albumArtURL = it.album?.images?.firstOrNull()?.url.toString(),
albumArtURL = it.album?.images?.maxByOrNull { img -> img?.width ?: 0 }?.url.toString(),
outputFilePath = fileManager.finalOutputDir(
it.name.toString(),
type,