diff --git a/app/src/main/kotlin/com/example/myapplication/navigation/AppNavHost.kt b/app/src/main/kotlin/com/example/myapplication/navigation/AppNavHost.kt index 8843484..d44bc0a 100644 --- a/app/src/main/kotlin/com/example/myapplication/navigation/AppNavHost.kt +++ b/app/src/main/kotlin/com/example/myapplication/navigation/AppNavHost.kt @@ -438,6 +438,18 @@ private fun PlayerDestination( } catch (_: Exception) { null } + // If episode has no logo, fetch the series item to get its logo + val currentSeriesId = seriesId ?: item?.seriesId + if (item?.logoImageTag == null && !currentSeriesId.isNullOrBlank() && server != null && server.apiKey.isNotBlank()) { + try { + val seriesItem = EmbyRepository.getItem(server, currentSeriesId) + if (seriesItem?.logoImageTag != null) { + item = item?.copy( + imageTags = (item?.imageTags ?: emptyMap()) + mapOf("Logo" to seriesItem.logoImageTag!!) + ) + } + } catch (_: Exception) { /* ignore */ } + } itemLoading = false }