feat: skip two-way copy for cuda devices when decoding video wallpapers + cache wallpapers as blobs in new database

This commit is contained in:
2026-10-29 17:44:19 +01:00
parent c0744b29b6
commit 76f5a23c2a
20 changed files with 2739 additions and 330 deletions
+19 -8
View File
@@ -27,7 +27,7 @@ Searcher {
property bool recentlyChanged
property bool showPreview: false
function getCategoryFor(w: FileSystemEntry): string {
function getCategoryFor(w: WallpaperEntry): string {
let category = w.parentDir.slice(Paths.wallsdir.length + 1);
if (category.includes("/"))
category = category.slice(0, category.indexOf("/"));
@@ -46,12 +46,12 @@ Searcher {
}
function thumbnailFor(path: string): string {
if (!isVideoPath(path))
return path;
if (!path)
return "";
for (const entry of root.list) {
if (entry.path === path && entry.thumbnailPath)
return entry.thumbnailPath;
if (entry.path === path)
return entry.thumbnailPath || path;
}
return path;
@@ -147,12 +147,13 @@ Searcher {
onTriggered: monitorCrops.writeAdapter()
}
FileSystemModel {
WallpaperDb {
id: wallpapers
filter: FileSystemModel.Media
dbPath: `${Paths.state}/wallpapers.sqlite`
cacheSize: wallpaper.largestBufferSize
requireHardwareCodec: true
path: Config.general.wallpaperPath
recursive: true
}
Process {
@@ -171,9 +172,19 @@ Searcher {
WallpaperService {
id: wallpaper
dbPath: wallpapers.dbPath
path: root.current
}
Connections {
target: wallpapers
function onCacheStored(path: string): void {
if (path === root.current)
wallpaper.invalidateCache();
}
}
Variants {
model: Quickshell.screens