ORelio / Spotlight-Downloader

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

Filenames of the images #26

Closed TobiTobsen77 closed 3 months ago

TobiTobsen77 commented 3 years ago

Hello, would it be possible to rename the downloaded images automatically to the image title which is stored in the metadata? When there is a large amount of images in the download folder it would be much more easy to sort and manage them with the real title information in the file name. That would be a nice feature for a further version. Thank you

ORelio commented 3 years ago

Hi, That could be possible, but Spotlight downloader relies on the file name to check if an image has already been downloaded, so it can't do that easily if the image is renamed. Additionally, images may not have a name in metadata, especially in some locales, so some images can't be renamed. I'll see what I can do for that.

TobiTobsen77 commented 3 years ago

Hello, perhaps its possible to generate a log file which stores the original filenames of the downloaded images. And the the logfiöle could be be used to check what has already been downloaded. Images without a name in the title line couldnt be renamed of course. Another question: Is it possible to generate the metafiles when the option --all-locales is used? I have tried this but no metafiles were stored. I am asking because I played around with a script which renames the images with the title from the metafiles.

ORelio commented 3 years ago

Yes, a database - even a simple one - would be needed.

Regarding your second question, --metadata combined with --all-locales will produce random metadata languages. If you still want this, you can add --inconsistent-metadata to save metadata files anyway.

ORelio commented 3 months ago

Microsoft started giving more meaningful file names to the images returned by the new Spotlight API discussed in #29 and implemented in SpotlightDownloader v1.5.0. Some older images still have random file names, though.

soulpowa commented 3 months ago

Thank you for updating this. I was able to find about 370 new images with the new API tool. As the filenames appear to be updated now, would this cause the tool to download duplicate images because of the new naming convention?

ORelio commented 3 months ago

Possibly. Images from the new API are indexed differently, so SpotlightDownloader cannot determine if an image returned by API v4 is the same as an image returned by API v3. However, API v4 returns 4K images so at least you'll get a higher res image. Personally, I started a new archive folder for API v4 images.