diff --git a/src/_data/facets.json b/src/_data/facets.json
index fc6bfe0d..da2a8fb5 100644
--- a/src/_data/facets.json
+++ b/src/_data/facets.json
@@ -160,6 +160,13 @@
"category": "Misc",
"desc": "Connect to Rocksky to setup the Rocksky scrobbler."
},
+ {
+ "url": "facets/data/sources/index.html",
+ "title": "Sources",
+ "category": "Data",
+ "featured": true,
+ "desc": "An overview of all audio inputs. Disable a source to hide its tracks without removing them."
+ },
{
"url": "facets/misc/split-view/index.html",
"title": "Split View",
diff --git a/src/components/input/opensubsonic/element.js b/src/components/input/opensubsonic/element.js
index 1859516b..8a8a1805 100644
--- a/src/components/input/opensubsonic/element.js
+++ b/src/components/input/opensubsonic/element.js
@@ -42,7 +42,7 @@ class OpensubsonicInput extends DiffuseElement {
sources(tracks) {
return Object.values(serversFromTracks(tracks)).map((server) => {
return {
- label: `${server.host} (${server.username ?? server.apiKey})`,
+ label: server.host,
uri: buildURI(server),
};
});
diff --git a/src/components/orchestrator/sources/element.js b/src/components/orchestrator/sources/element.js
index 01b09dcc..32b73fef 100644
--- a/src/components/orchestrator/sources/element.js
+++ b/src/components/orchestrator/sources/element.js
@@ -34,6 +34,9 @@ class Sources extends BroadcastableDiffuseElement {
* @param {string} uri
*/
async toggle(uri) {
+ const q = uri.indexOf("?");
+ const key = q === -1 ? uri : uri.slice(0, q);
+
const output = this.#output.value;
if (!output) {
console.warn("Output element is not available yet.");
@@ -54,10 +57,10 @@ class Sources extends BroadcastableDiffuseElement {
}
}
- if (disabled.includes(uri)) {
- disabled = disabled.filter((u) => u !== uri);
+ if (disabled.includes(key)) {
+ disabled = disabled.filter((u) => u !== key);
} else {
- disabled = [...disabled, uri];
+ disabled = [...disabled, key];
}
const value = JSON.stringify(disabled);
diff --git a/src/facets/connect/common.js b/src/facets/connect/common.js
index c986d3c8..11e1be46 100644
--- a/src/facets/connect/common.js
+++ b/src/facets/connect/common.js
@@ -219,11 +219,11 @@ export function setup(
: nothing}
`,
diff --git a/src/facets/connect/opensubsonic/index.inline.js b/src/facets/connect/opensubsonic/index.inline.js
index f5aba343..aa389648 100644
--- a/src/facets/connect/opensubsonic/index.inline.js
+++ b/src/facets/connect/opensubsonic/index.inline.js
@@ -46,10 +46,7 @@ const { setItems, setError } = setup({
description: html`
- Connect to an OpenSubsonic server to use it as audio input.
-
-
- Supports authentication via username + password, or an API key.
+ Connect to an OpenSubsonic server to use it as audio input. Supports authentication via username + password, or an API key.