Log more errors.
This commit is contained in:
parent
1949c2ec0b
commit
cb7ca7c575
1 changed files with 7 additions and 1 deletions
|
|
@ -38,7 +38,9 @@ internal class CoilMediaFetcher(
|
||||||
private val options: Options
|
private val options: Options
|
||||||
) : Fetcher {
|
) : Fetcher {
|
||||||
override suspend fun fetch(): FetchResult? {
|
override suspend fun fetch(): FetchResult? {
|
||||||
if (mediaData?.source == null) return null
|
if (mediaData?.source == null) return null.also {
|
||||||
|
Timber.e("MediaData source is null")
|
||||||
|
}
|
||||||
return when (mediaData.kind) {
|
return when (mediaData.kind) {
|
||||||
is MediaRequestData.Kind.Content -> fetchContent(mediaData.source, options)
|
is MediaRequestData.Kind.Content -> fetchContent(mediaData.source, options)
|
||||||
is MediaRequestData.Kind.Thumbnail -> fetchThumbnail(mediaData.source, mediaData.kind, options)
|
is MediaRequestData.Kind.Thumbnail -> fetchThumbnail(mediaData.source, mediaData.kind, options)
|
||||||
|
|
@ -72,6 +74,8 @@ internal class CoilMediaFetcher(
|
||||||
source = mediaSource,
|
source = mediaSource,
|
||||||
).map { byteArray ->
|
).map { byteArray ->
|
||||||
byteArray.asSourceResult(options)
|
byteArray.asSourceResult(options)
|
||||||
|
}.onFailure {
|
||||||
|
Timber.e(it)
|
||||||
}.getOrNull()
|
}.getOrNull()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -82,6 +86,8 @@ internal class CoilMediaFetcher(
|
||||||
height = scalingFunction(kind.height.toFloat()).roundToLong(),
|
height = scalingFunction(kind.height.toFloat()).roundToLong(),
|
||||||
).map { byteArray ->
|
).map { byteArray ->
|
||||||
byteArray.asSourceResult(options)
|
byteArray.asSourceResult(options)
|
||||||
|
}.onFailure {
|
||||||
|
Timber.e(it)
|
||||||
}.getOrNull()
|
}.getOrNull()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue