Closed Inetov closed 4 years ago
As you noticed, 50 images is indeed not very convenient because it significantly reduces the set of images used for randomly picking one image. As a result, you're more likely to get the same images.
For this reason, the existing scripts are written with two different approaches:
update-lockscreen.bat
has a similar approach as stock Windows Spotlight: To minimize disk space, a few images are downloaded from the Spotlight API, which offers many images and is less likely to return the same ones over and over. On next refresh, all images in cache are wiped so fresh images are downloaded, randomly selected by the API. Refresh is not done on metered networks.
update-archive-and-lockscreen.bat
uses a large cache initially built using spotlight-download-archive.bat. With hundreds of images in your cache, you're unlikely to get the same images over and over. The cache grows when new images are found, but takes less that 1 GB. This approach will minimize bandwidth and relies much less on the API. If it goes down some day, you have a copy of all the images you have ever seen, and plenty of new images you've never seen yet.
I'm using both scripts on various machines and the randomess is as good as stock Spotlight 😉
What difference between 50 images and 1 GB archive?) Without the frequency of use rating - we will getting the same ones again.
the randomess is as good as stock Spotlight 😉
yes but stock Spotlight has like/dislike buttons and make it a lot harder)
ok, actually, I understand that my request also requires great improvements, but I propose to leave it open - at least as an idea)
Sure, leaving this open.
@Inetov @ORelio
If you use original Spotlight on Windows, you have the option to rate pictures on the top right corner: I like it or I don't like it. Windows then uses the pre-defined PID for every Windows PC (see explanation here) along with the API requests to present you tailored wallpapers.
We just either need to remove the PID from the API request or let the script generate random numbers. As of right now we continously use the PID 209567 which explains why we always get the same pictures over and over again.
Edit: Changing the "lo" paramater which is constantly on 80217 to a random number would probably also add much more variaty.
https://arc.msn.com/v3/Delivery/Cache?pid=209567&fmt=json&rafb=0&ua=WindowsShellClient%2F0&disphorzres=9999&dispvertres=9999&lo=80217&pl=en-US&lc=en-US&ctry=us&time=2017-12-31T23:59:59Z
Interesting! So according to the link you posted, the PID should be 338387
?
List of Subscription IDs
The same link also downloads Store Apps recommendations, Start Menu Tiles icon etc. From
CreativeFramework::TargetedContent::GetAdUnitIdFromSubscriptionId
arrays:
Subscription ID Internal Ad ID Public Ad ID LockScreen* 338380 338387*
I looked more into it. Yes, seems like the PID is not a pre-defined UUID of a Windows PC, but a general public ID to retrieve wallpapers which are specifically picked for Lockscreens by Microsoft. So 338387 should be the right one. It's also utilized here.
I still don't know about the "lo" parameter yet.
I've removed the rafb and lo parameters as it's unclear what they do and the API request works fine without them
Merged, thanks 👍
Windows 11 got a feature to use Spotlight for wallpapers. It seems for background they are using different pool of images than for lock screen. Does anyone know how a request for these new images may look like?
@yrtnsky Don't know yet. I'd recommend creating a new issue so that other people see it better.
Save a record that the picture was used (no matter for wallpapper or lockscreen) and select new ones based on the rating of frequency of use. It may also make sense to save the datetime of use. Thus, we will see new pictures more often, and old ones will be displayed only if there are no new ones in the cache.
Now I have 50 images in the directory, many of which I have never seen, but when I run the script I getting the same ones over and over again.
I think it's may be very useful feature.