mirror of
https://codeberg.org/PLG-Development/PLG-MuDiCS
synced 2026-07-06 00:47:09 +00:00
add file thumbnails
This commit is contained in:
@@ -3,10 +3,12 @@ import { displays, run_on_all_selected_displays, update_displays_with_map, updat
|
||||
import { ping_ip } from "./api_handler";
|
||||
import type { Display } from "./types";
|
||||
import { change_file_path, update_folder_elements_recursively } from "./stores/files";
|
||||
import { db } from "./indexdb/file_thumbnails.db";
|
||||
|
||||
const update_display_status_interval_seconds = 20;
|
||||
|
||||
export async function on_start() {
|
||||
await db.thumbnail_blobs.clear();
|
||||
await update_all_display_status();
|
||||
await setInterval(update_all_display_status, update_display_status_interval_seconds * 1000);
|
||||
|
||||
@@ -28,5 +30,5 @@ async function update_all_display_status() {
|
||||
|
||||
async function on_display_start(display: Display) {
|
||||
await update_folder_elements_recursively(display, '/');
|
||||
await update_screenshot(display.id);
|
||||
await update_screenshot(display.id);
|
||||
}
|
||||
Reference in New Issue
Block a user