mirror of
https://codeberg.org/PLG-Development/PLG-MuDiCS
synced 2026-07-06 00:47:09 +00:00
chore(control): run only on all online selected displays
This commit is contained in:
@@ -151,15 +151,14 @@ export async function run_on_all_selected_displays<T extends unknown[]>(
|
|||||||
...args: T
|
...args: T
|
||||||
) {
|
) {
|
||||||
for (const display_id of get(selected_display_ids)) {
|
for (const display_id of get(selected_display_ids)) {
|
||||||
const display_ip = (await get_display_by_id(display_id))?.ip;
|
const display = await get_display_by_id(display_id);
|
||||||
if (display_ip) {
|
if (!display || !display.ip || display.status !== 'app_online') continue;
|
||||||
await run_function(display_ip, ...args);
|
await run_function(display.ip, ...args);
|
||||||
if (update_screenshot_afterwards) {
|
if (update_screenshot_afterwards) {
|
||||||
await screenshot_loop(display_id);
|
await screenshot_loop(display_id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
export async function get_display_groups(): Promise<DisplayGroup[]> {
|
export async function get_display_groups(): Promise<DisplayGroup[]> {
|
||||||
return await db.display_groups.orderBy('position').toArray();
|
return await db.display_groups.orderBy('position').toArray();
|
||||||
|
|||||||
Reference in New Issue
Block a user