diff --git a/app/src/main/java/dev/brahmkshatriya/echo/extensions/ExtensionLoader.kt b/app/src/main/java/dev/brahmkshatriya/echo/extensions/ExtensionLoader.kt index e2669a93..db7524bc 100644 --- a/app/src/main/java/dev/brahmkshatriya/echo/extensions/ExtensionLoader.kt +++ b/app/src/main/java/dev/brahmkshatriya/echo/extensions/ExtensionLoader.kt @@ -117,17 +117,17 @@ class ExtensionLoader( val musicExtensions = extensionListFlow.value.orEmpty() list?.forEach { extension -> extension.get(throwableFlow) { - inject(requiredTrackerClients, trackerExtensions) { + inject(extension.name, requiredTrackerClients, trackerExtensions) { setTrackerExtensions(it) } } extension.get(throwableFlow) { - inject(requiredLyricsClients, lyricsExtensions) { + inject(extension.name, requiredLyricsClients, lyricsExtensions) { setLyricsExtensions(it) } } extension.get(throwableFlow) { - inject(requiredMusicClients, musicExtensions) { + inject(extension.name, requiredMusicClients, musicExtensions) { setMusicExtensions(it) } } @@ -147,6 +147,7 @@ class ExtensionLoader( } private fun > T.inject( + name: String, required: List, extensions: List, set: T.(List) -> Unit @@ -155,7 +156,7 @@ class ExtensionLoader( else { val filtered = extensions.filter { it.metadata.id in required } if (filtered.size == required.size) set(filtered) - else throw RequiredExtensionsException(required) + else throw RequiredExtensionsException(name, required) } }