Wallpaper Engine:壁纸引擎

Wallpaper Engine:壁纸引擎

Personal Slideshow
rulerguy6 2024 年 4 月 18 日 下午 8:59
Preventing the wallpaper from using images in subfolders
This is almost certainly a me problem, so if there's no solution then no worries, but is there a way to lock this to showing one level of a folder, and ignore nested folders? Just the way I have my images set up I have lots of sub-folders that I want this wallpaper to ignore when I set a directory.

I've been looking around with this guide to see how you may have set this up
https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=795674740
But any info you have would be of help too.
最后由 rulerguy6 编辑于; 2024 年 4 月 18 日 下午 9:21
< >
正在显示第 1 - 4 条,共 4 条留言
rulerguy6 2024 年 4 月 18 日 下午 9:43 
For what it's worth, I was able to add some really dumb regex matching in the index.html file, specifically when you add files to the playlist in userDirectoryFilesAddedOrChanged. But If you had a better way in mind to do this I'd be happy to try it out.
Squee  [开发者] 2024 年 4 月 23 日 上午 8:38 
I haven't worked on that code in a long time. But I love me some good regular expressions, as they are powerful for string operations and by memory JS offers little to handle such things out of the box. The only alternative I can think of, was split the string with the directory separator, and check if the resulting array length changes.

And that guide is exactly what I used to setup the original wallpaper which the current monstrosity grew out of. It was original just to test what's in that guide haha. That's why a lot of the logic is badly done in the code. It's a rewrite of a rewrite of a rewrite.

if it works, I would say just use it. I really do not have the energy to deal with my wallpapers. I hope to get around to the wish at some point tho, but as things are going it could still take months. Juggling to many things IRL atm that even minor changes like this feel huge.
could you explain how or if you got this to work, I have the same problem but idk how to fix it
rulerguy6 5 月 4 日 下午 5:49 
could you explain how or if you got this to work, I have the same problem but idk how to fix it


If you right-click your wallpaper you can choose "open to explorer" to see the files on your device, there should be an index.html file you can open with a text editor.

You should see a block of code that looks like this, around line 1540,

for( var i = 0; i < files.length; i++)
{
this.playlist.addFile( files[ i ] );
}

I just added a check around that line in the middle to look for a text match, like this

for( var i = 0; i < files.length; i++)
{
var regex = files.match("string_to_exclude");
if(!regex)
{
this.playlist.addFile( files[ i ] );
}
}

Whatever you put between those quotes, it'll look for that in the filepath of every file it's trying to add to the playlist. If it's there it won't add it to the playlist. So for example if your wallpaper is looking in a folder "Pictures", and you want to exclude the subfolder "Vacation", you would put "Vacation" in the quotes and none of the pictures in that subfolder will be added to the playlist.
最后由 rulerguy6 编辑于; 5 月 4 日 下午 5:50
< >
正在显示第 1 - 4 条,共 4 条留言
每页显示数: 1530 50