ORelio / Spotlight-Downloader

Download Windows Spotlight images and apply them to wallpaper or lockscreen.
182 stars 27 forks source link

feature request: new pictures more often #12

Closed Inetov closed 4 years ago

Inetov commented 4 years ago

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.

ORelio commented 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:

I'm using both scripts on various machines and the randomess is as good as stock Spotlight 😉

Inetov commented 4 years ago

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)

ORelio commented 4 years ago

Sure, leaving this open.

bytes0101 commented 4 years ago

@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

ORelio commented 4 years ago

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*
bytes0101 commented 4 years ago

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.

bytes0101 commented 4 years ago

18

I've removed the rafb and lo parameters as it's unclear what they do and the API request works fine without them

ORelio commented 4 years ago

Merged, thanks 👍

yrtnsky commented 1 year ago

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?

ORelio commented 1 year ago

@yrtnsky Don't know yet. I'd recommend creating a new issue so that other people see it better.