jerrykuku / luci-theme-argon

Argon is a clean and tidy OpenWrt LuCI theme that allows users to customize their login interface with images or videos. It also supports automatic and manual switching between light and dark modes.
Apache License 2.0
3.94k stars 786 forks source link

Enhance wallhaven.cc features and fix update for Unsplash #422

Closed AcidSlide closed 8 months ago

AcidSlide commented 1 year ago

Note: In line 58 to 60, this is a hack which I'm not sure if I'm the only one encountering when using Microsoft Edge specifically for wallhaven.cc only. It seems there are times (after investigating using the developer tools), first pull of the image as background results in a 403 (forbidden). But calling the generated url for the image manually will results in proper loading.

Update [2023-06-30]: Unsplash wallpaper URL fix

AcidSlide commented 1 year ago

A sample /etc/argon/config file using wallhaven.cc


config global
        option bing_background '1'
        option online_wallpaper 'wallhaven_711'
    option use_api_key '--redacted--'
    option use_exact_resolution '0'
        option primary '#5e72e4'
        option dark_primary '#483d8b'
        option blur '10'
        option blur_dark '10'
        option transparency '0.5'
        option transparency_dark '0.5'
        option mode 'normal'

The above loads list of images from #landscape which has a corresponding tag id of id:711. You can check using this link: https://wallhaven.cc/search?q=id%3A711&sorting=random&ref=fp&seed=MCfMTb&page=2

eth54321 commented 1 year ago

Thanks for the quick response to my issue. Much appreciated.

AcidSlide commented 1 year ago

Thanks for the quick response to my issue. Much appreciated.

Uhm what issue?

AcidSlide commented 1 year ago

I've updated the script again since unsplash has deprecated the original url used for retrieving images from unsplash. See first comment for details.

easyteacher commented 1 year ago

https://source.unsplash.com/ is working again

AcidSlide commented 1 year ago

https://source.unsplash.com/ is working again

I'll adjust the patch so it both can use the source.unsplash.com and api.unsplash.com depending on the config