summaryrefslogtreecommitdiff
path: root/services
diff options
context:
space:
mode:
Diffstat (limited to 'services')
-rw-r--r--services/Wallpapers.qml5
1 files changed, 2 insertions, 3 deletions
diff --git a/services/Wallpapers.qml b/services/Wallpapers.qml
index d72423b..2044c87 100644
--- a/services/Wallpapers.qml
+++ b/services/Wallpapers.qml
@@ -10,7 +10,6 @@ Searcher {
id: root
readonly property string currentNamePath: Paths.strip(`${Paths.state}/wallpaper/path.txt`)
- readonly property list<string> extensions: ["jpg", "jpeg", "png", "webp", "tif", "tiff"]
property bool showPreview: false
readonly property string current: showPreview ? previewPath : actualCurrent
@@ -89,7 +88,7 @@ Searcher {
running: true
command: ["find", Paths.expandTilde(Config.paths.wallpaperDir), "-type", "d", "-path", '*/.*', "-prune", "-o", "-not", "-name", '.*', "-type", "f", "-print"]
stdout: StdioCollector {
- onStreamFinished: wallpapers.model = text.trim().split("\n").filter(w => root.extensions.includes(w.slice(w.lastIndexOf(".") + 1))).sort()
+ onStreamFinished: wallpapers.model = text.trim().split("\n").filter(w => Images.isValidImageByName(w)).sort()
}
}
@@ -100,7 +99,7 @@ Searcher {
command: ["inotifywait", "-r", "-e", "close_write,moved_to,create", "-m", Paths.expandTilde(Config.paths.wallpaperDir)]
stdout: SplitParser {
onRead: data => {
- if (root.extensions.includes(data.slice(data.lastIndexOf(".") + 1)))
+ if (Images.isValidImageByName(data))
getWallsProc.running = true;
}
}