musikr: miss covers when they cannot be decoded
This commit is contained in:
@@ -82,8 +82,12 @@ class MutableStoredCovers(
|
|||||||
is CoverResult.Miss -> return CoverResult.Miss()
|
is CoverResult.Miss -> return CoverResult.Miss()
|
||||||
}
|
}
|
||||||
val innerCover =
|
val innerCover =
|
||||||
coverStorage.write(memoryCover.id + transcoding.tag) {
|
try {
|
||||||
transcoding.transcodeInto(memoryCover.data(), it)
|
coverStorage.write(memoryCover.id + transcoding.tag) {
|
||||||
|
transcoding.transcodeInto(memoryCover.data(), it)
|
||||||
|
}
|
||||||
|
} catch (e: Exception) {
|
||||||
|
return CoverResult.Miss()
|
||||||
}
|
}
|
||||||
return CoverResult.Hit(StoredCover(innerCover))
|
return CoverResult.Hit(StoredCover(innerCover))
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user