Skip to content

A continuation of HomeBox the inventory and organization system built for the Home User

Try to choose a media device that have the word "back" in it, if it doesn't find one falls back to the first. (#573)

EdWorth1206797fcb58fc9
diff --git a/frontend/pages/scanner.vue b/frontend/pages/scanner.vue
index e11b2847..80f8644d 100644
--- a/frontend/pages/scanner.vue
+++ b/frontend/pages/scanner.vue
@@ -34,7 +34,14 @@
sources.value = devices;
if (devices.length > 0) {
- selectedSource.value = devices[0].deviceId;
+ for (let i = 0; i < devices.length; i++) {
+ if (devices[i].label.toLowerCase().includes("back")) {
+ selectedSource.value = devices[i].deviceId;
+ }
+ }
+ if (!selectedSource.value) {
+ selectedSource.value = devices[0].deviceId;
+ }
} else {
errorMessage.value = t("scanner.no_sources");
}