diff --git a/luci-theme-argon/root/usr/libexec/argon/online_wallpaper b/luci-theme-argon/root/usr/libexec/argon/online_wallpaper index daafcd3..a71fdf3 100755 --- a/luci-theme-argon/root/usr/libexec/argon/online_wallpaper +++ b/luci-theme-argon/root/usr/libexec/argon/online_wallpaper @@ -17,14 +17,16 @@ fetch_pic_url() { ;; unsplash) curl -fks --max-time 3 \ - "https://source.unsplash.com/1920x1080/daily?wallpapers" | - sed -E 's#^.*href="([^?]+)\?.*$#\1?fm=jpg\&fit=crop\&w=1920\&h=1080#' + --header "Authorization: Client-ID kmFIroj2ELqXJPtC0XUoyww-Tr_lDU8Ho8uxjptIrCo" \ + "https://api.unsplash.com/photos/random?count=1&orientation=landscape" | + jsonfilter -e "@[0]['urls']['regular']" ;; unsplash_*) local collection_id=${WEB_PIC_SRC#unsplash_} curl -fks --max-time 3 \ - "https://source.unsplash.com/collection/${collection_id}/1920x1080" | - sed -E 's#^.*href="([^?]+)\?.*$#\1?fm=jpg\&fit=crop\&w=1920\&h=1080#' + --header "Authorization: Client-ID kmFIroj2ELqXJPtC0XUoyww-Tr_lDU8Ho8uxjptIrCo" \ + "https://api.unsplash.com/photos/random?count=1&orientation=landscape" | + jsonfilter -e "@[0]['urls']['regular']" ;; wallhaven) curl -fks --max-time 3 \