From 246afa79cc36e45cbda455af612cb9e5ffd8ee06 Mon Sep 17 00:00:00 2001 From: Hawk Lee Date: Mon, 7 Jul 2025 21:35:28 +0800 Subject: [PATCH] feat(browser): Add video workflow support and seamless cache upgrade This release introduces a major new feature: the ability to detect and load workflows embedded in video files (MP4, WebM, etc.). It also includes a seamless cache migration system that automatically upgrades users to the new cache version without manual intervention. --- js/aiia_browser.js | 6 +++--- pyproject.toml | 7 +++++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/js/aiia_browser.js b/js/aiia_browser.js index 628f9bc..08c1ffc 100644 --- a/js/aiia_browser.js +++ b/js/aiia_browser.js @@ -24,7 +24,7 @@ function setSetting(key, value) { } catch (e) { console.error(`[AIIA] Error setting localStorage for key ${key}:`, e); } } -const CACHE_PREFIX = "aiia-cache:v2:"; +const CACHE_PREFIX = "aiia-cache:v3:"; function getCacheKey(path, filename) { return `${CACHE_PREFIX}${path ? `${path}/` : ''}${filename}`; } function getCache(key) { try { const data = localStorage.getItem(key); return data ? JSON.parse(data) : null; } catch (e) { console.error(`[AIIA] Error parsing cache for key ${key}:`, e); return null; } } function setCache(key, value) { try { localStorage.setItem(key, JSON.stringify(value)); } catch (e) { console.error(`[AIIA] Error setting cache for key ${key}:`, e); } } @@ -1335,13 +1335,13 @@ app.registerExtension({ setup() { // --- START: One-time cache cleanup --- try { - const migrationKey = "aiia-cache-v2-migrated"; + const migrationKey = "aiia-cache-v3-migrated"; if (!localStorage.getItem(migrationKey)) { console.log("[AIIA Browser] Checking for old cache entries to migrate..."); const keysToRemove = []; for (let i = 0; i < localStorage.length; i++) { const key = localStorage.key(i); - if (key.startsWith("aiia-cache:") && !key.startsWith("aiia-cache:v2:")) { + if (key.startsWith("aiia-cache:") && !key.startsWith("aiia-cache:v3:")) { keysToRemove.push(key); } } diff --git a/pyproject.toml b/pyproject.toml index 00950d6..c7eac5b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,6 +3,10 @@ name = "aiia" description = """A suite of powerful, intuitive, and highly customizable nodes for ComfyUI, featuring a high-performance Media Browser and OOM-safe video tools. --- +### Changelog v1.3.0 +- **Major Feature**: Video workflow detection and loading is now supported! The browser can now detect and load workflows embedded in video files (e.g., MP4, WebM), just like with images. +- **Cache System**: Implemented a seamless cache upgrade to v3. This automatically clears old cache versions and rebuilds it to support new features without requiring any user action. + ### Changelog v1.2.1 - **Bug Fix**: Restored the asynchronous loading behavior of the media browser. File lists now appear instantly while metadata (like thumbnails and workflow info) loads in the background, fixing a user experience regression from v1.2.0. @@ -11,13 +15,12 @@ description = """A suite of powerful, intuitive, and highly customizable nodes f - Added one-click workflow loading and file downloading directly from the browser. - Implemented a manual refresh button and automatic refresh on view switching. - Redesigned icon buttons into a clean, hover-activated overlay. - - Enhanced backend for more robust thumbnailing and metadata extraction. - **Bug Fixes**: - Fixed a race condition preventing the 'Load Workflow' button from appearing in list view. - Correctly sets workflow names on load for both standard and API formats. - Resolved issues with the icon sizing slider, ensuring instant and correct view updates. """ -version = "1.2.1" +version = "1.3.0" license = {file = "LICENSE"} [project.urls]