feat(w-engine): Add favorite section (#270)

* feat!: add favorite section

* fix: change visual for 1 scroll: wallpaper and favorite wallpaper

* feat!: update for v1.2.0

* fix: rm line downgrade quality

* fix: add downgrade quality for improve storage cache

* feat!: update thumbnail

* feat!: add favorites list in data.json

* feat!: add save favorites list across start plugin
This commit is contained in:
Tadomika-Ari
2026-08-07 22:24:22 -04:00
committed by GitHub
parent 3319112aed
commit 7fa96aceef
4 changed files with 112 additions and 8 deletions
+3 -1
View File
@@ -27,6 +27,7 @@ local data = {
saved_wallpaper = {}, -- output -> the Noctalia wallpaper from before we took over
options = {}, -- id -> { engine = {...}, properties = {...} }, see buildLaunchArgs
defaults = {}, -- { engine = {...} } applied to every wallpaper, see optionsFor
favorites = {}, -- favorites wallpapers list
}
-- linux-wallpaperengine switches that take no value. Stored as booleans; the
@@ -103,6 +104,7 @@ local function loadData()
data.saved_wallpaper = asTable(decoded.saved_wallpaper)
data.options = asTable(decoded.options)
data.defaults = asTable(decoded.defaults)
data.favorites = asTable(decoded.favorites)
end
local function saveData()
@@ -233,7 +235,7 @@ local function resolveColorSource(id, callback)
-- names contain spaces and non-ASCII, so paths are quoted.
local cmd = "ffmpeg -y -loglevel error -ss 1 -i "
.. shellQuote(dir .. file)
.. " -frames:v 1 -vf scale=960:-2 "
.. " -frames:v 1 -vf scale=960:-2"
.. shellQuote(frame)
noctalia.runAsync(cmd, function(result)
-- A wallpaper shorter than the seek offset produces no output and no error,