Skip to content

Commit 196aa6d

Browse files
authored
Fix settings breadcrumb for disabled provider instances (#1909)
1 parent b49fd39 commit 196aa6d

1 file changed

Lines changed: 10 additions & 9 deletions

File tree

src/views/settings/Settings.vue

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -683,15 +683,16 @@ const activeTab = computed(() => {
683683
684684
if (name === "editprovider") {
685685
const instanceId = router.currentRoute.value.params.instanceId as string;
686-
const provider = api.getProvider(instanceId);
687-
if (provider) {
688-
if (provider.type === ProviderType.MUSIC) return "music_providers";
689-
if (provider.type === ProviderType.PLAYER) return "player_providers";
690-
if (provider.type === ProviderType.METADATA) return "metadata_providers";
691-
if (provider.type === ProviderType.PLUGIN) return "plugin_providers";
692-
if (provider.type === ProviderType.AUDIO_ANALYSIS)
693-
return "audio_analysis_providers";
694-
}
686+
// disabled instances are not loaded, so fall back to the manifest type
687+
const providerType =
688+
api.getProvider(instanceId)?.type ||
689+
api.providerManifests[instanceId.split("--")[0]]?.type;
690+
if (providerType === ProviderType.MUSIC) return "music_providers";
691+
if (providerType === ProviderType.PLAYER) return "player_providers";
692+
if (providerType === ProviderType.METADATA) return "metadata_providers";
693+
if (providerType === ProviderType.PLUGIN) return "plugin_providers";
694+
if (providerType === ProviderType.AUDIO_ANALYSIS)
695+
return "audio_analysis_providers";
695696
}
696697
697698
if (name === "addproviderdetails") {

0 commit comments

Comments
 (0)