home-assistant / android

:iphone: Home Assistant Companion for Android
https://companion.home-assistant.io/
Apache License 2.0
2.07k stars 587 forks source link

notifications - adds a test if a image-url source contains a GIF file #4326

Open BitWuehler opened 1 month ago

BitWuehler commented 1 month ago

Adds a test if a image-url source contains a GIF file

Summary

Today I wanted to show a GIF in a notification an Android 14. I saw that this was added befor two weeks, Sadly this only works with URLs that ends with ".gif". Some URLs don't have the filename in the URL so i added a http header check for that.

Link to pull request in Documentation repository

The Documentation should be fine. The function is already described there.

Edit: I just checked the generated APK on my phone. Now the GIF works fine in notifications also with an URL without the filename.

home-assistant[bot] commented 1 month ago

Please take a look at the requested changes, and use the Ready for review button when you are done, thanks :+1:

Learn more about our pull request process.

jpelgrom commented 1 month ago

I think you've misunderstood what I was saying... There is a requiresAuth parameter that should be handled. At this point, paths are never relative because it is transformed here. If you're saying there is no way to serve a GIF from one of HA's built in proxies, that's also fine! No need for these complicated checks I think.