Summary
The Video Wallpaper picker regenerates thumbnails that already exist on disk every time the picker is opened or reloaded.
Environment
- Noctalia:
v5.0.0-beta.9-dirty
- Video Wallpaper:
noctalia/mpvpaper 1.1.1
- Cache directory:
~/.cache/noctalia/mpvpaper
Reproduction
- Configure a video directory containing one or more non-GIF videos.
- Open the Video Wallpaper picker and wait until thumbnails are generated.
- Close and reopen (or reload) the picker.
Actual behavior
The picker starts a new mpv --frames=1 --vo=image extraction for every video and overwrites its existing JPG cache entry.
On my system, the cache already contained 348 JPGs, yet opening the picker started 9 active extraction processes and created new .jpg.d temporary directories.
Expected behavior
If cachePath(video.path) exists, use it immediately and do not queue an mpv extraction.
Cause
In mpvpaper/panel.luau, queueThumb() only checks the panel-local thumbPaths and thumbPending tables:
if thumbPaths[video.path] ~= nil or thumbPending[video.path] then
return
end
table.insert(thumbQueue, video.path)
pumpThumbQueue()
Those tables start empty when the panel is loaded, so an existing on-disk cache is never restored.
A minimal fix is to check the disk cache before enqueueing:
local cached = cachePath(video.path)
if noctalia.fileExists(cached) then
thumbPaths[video.path] = cached
return
end
This retains the current cache-key behavior; it intentionally does not invalidate a source video replaced at the same path.
Summary
The Video Wallpaper picker regenerates thumbnails that already exist on disk every time the picker is opened or reloaded.
Environment
v5.0.0-beta.9-dirtynoctalia/mpvpaper1.1.1~/.cache/noctalia/mpvpaperReproduction
Actual behavior
The picker starts a new
mpv --frames=1 --vo=imageextraction for every video and overwrites its existing JPG cache entry.On my system, the cache already contained 348 JPGs, yet opening the picker started 9 active extraction processes and created new
.jpg.dtemporary directories.Expected behavior
If
cachePath(video.path)exists, use it immediately and do not queue anmpvextraction.Cause
In
mpvpaper/panel.luau,queueThumb()only checks the panel-localthumbPathsandthumbPendingtables:Those tables start empty when the panel is loaded, so an existing on-disk cache is never restored.
A minimal fix is to check the disk cache before enqueueing:
This retains the current cache-key behavior; it intentionally does not invalidate a source video replaced at the same path.