j-a-n / lovelace-wallpanel

🖼️ Wall panel mode and photo screensaver for your Home Assistant Dashboards
GNU General Public License v3.0
407 stars 34 forks source link

New Unsplash API issue #237

Open mxplante opened 1 month ago

mxplante commented 1 month ago

When using the new Unplash API, background isn't working. According to the documentation it should be as follow: https://api.unsplash.com/photos/random?client_id=&query=

However this query returns a json from which you should use a the url property ex: "urls": { "raw": "https://images.unsplash.com/photo-1600606585687-c15e3de5725f?ixid=<someid>&ixlib=rb-4.0.3", "full": "https://images.unsplash.com/photo-1600606585687-c15e3de5725f?crop=entropy&cs=srgb&fm=jpg&ixid=<someid>&ixlib=rb-4.0.3&q=85", "regular": "https://images.unsplash.com/photo-1600606585687-c15e3de5725f?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=<someid>&ixlib=rb-4.0.3&q=80&w=1080", "small": "https://images.unsplash.com/photo-1600606585687-c15e3de5725f?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=<someid>&ixlib=rb-4.0.3&q=80&w=400", "thumb": "https://images.unsplash.com/photo-1600606585687-c15e3de5725f?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=<someid>&ixlib=rb-4.0.3&q=80&w=200", "small_s3": "https://s3.us-west-2.amazonaws.com/images.unsplash.com/small/photo-1600606585687-c15e3de5725f" },

when running the addon, the network traces keeps pinging non-stop the following example url: wallpanel.js?hacstag=3095064164252:304 Failed to load image: https://source.unsplash.com/random/2552x1436?sig=1718721925

using the latest version 4.25.2

j-a-n commented 3 weeks ago

I cannot reproduce this issue. Wallpanel is using the urls.raw value from the API response. Are there any errors or warnings in the browser console?

mxplante commented 3 weeks ago

Yes the was: when running the addon, the network traces keeps pinging non-stop the following example url: wallpanel.js?hacstag=3095064164252:304 Failed to load image: https://source.unsplash.com/random/2552x1436?sig=1718721925