musikr: miss covers when they cannot be decoded
This commit is contained in:
parent
102ed85c42
commit
ef7ef8da95
1 changed files with 6 additions and 2 deletions
|
@ -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))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue