This commit is contained in:
vfsfitvnm
2022-10-13 19:48:27 +02:00
parent 7ed138ea51
commit 92141f4f49
4 changed files with 99 additions and 88 deletions

View File

@@ -16,7 +16,7 @@ object ArtistSaver : Saver<Artist, List<Any?>> {
override fun restore(value: List<Any?>): Artist = Artist(
id = value[0] as String,
name = value[1] as String,
name = value[1] as String?,
thumbnailUrl = value[2] as String?,
info = value[3] as String?,
timestamp = value[4] as Long?,

View File

@@ -83,7 +83,7 @@ val DetailedSong.asMediaItem: MediaItem
fun String?.thumbnail(size: Int): String? {
return when {
this?.startsWith("https://lh3.googleusercontent.com") == true -> "$this-w$size-h$size"
this?.startsWith("https://yt3.ggpht.com") == true -> "$this-s$size"
this?.startsWith("https://yt3.ggpht.com") == true -> "$this-w$size-h$size-s$size"
else -> this
}
}