Images not loaded
TheDukeSr opened this issue · 11 comments
Hi,
My setup is Kodi running on central MySQL server for database.
The Fanart and Poster Images are not loaded.
I think it's because the use of a central database that supplies a different path then a "standard" kodi install.
In Debug window I see a SMB string inside the html url for the image, and kodi IP address is repeated twice:
<div class="kodi_fanart" style="margin-top: 0px;background-position:100% 0;/* background-image:url('http://<<username>>:<<password>>@<<IP ADDRESS>>:<<PORT>>/image/image%3A%2F%2Fsmb%253A%252F%252F<<IP ADDRESS>>%252FMedia%252FFilms%252FBloodshot%2520%25282020%2529%252Ffanart.jpg'); */">
In the above code you'll find "2F%2Fsmb%253", and thereafter for a second time the kodi IP address...
So it looks like the SMB path gets included in the URL path.
If you need more info, please let me know.
I hope you can make a fix for this.
Regards, John.
That URL looks correct assuming you are sharing files through samba on the same host that is running kodi. If you open that URL in your browser what happens?
Also if you log into your kodi web interface and navigate to movies or tv, do the images load? If so, inspect one of the images and inspect what url path it is using to load the images. It should look similar to the URL you have posted above.
Images in browser load correct. Alltough i find it strange it does not start with smb:// but a smb tag inside the http url.
Could it be that my Hass is HTTPS, So not loading from insecure HTTP sources?
That's plausible, not sure how comfortable you are with your browser's developer tools but you should see the requests for the images in the network tab and you will see them as red or cancelled if it was a https vs http issue.
Used a different browser and pc, and got this:
Using latest Chrome browser, windows 10.
Mixed Content: The page at 'https://MYDOMAIN.duckdns.org:PORT/lovelace/media' was loaded over HTTPS, but requested an insecure element 'http://USER:PASS@LOCALIP:PORT/image/image%3A%2F%2Fsmb%253A%252F%252FLOCALIP%252FMedia%252FFilms%252FThe%2520Hunt%2520%25282020%2529%252Ffanart.jpg'. This request was automatically upgraded to HTTPS, For more information see https://blog.chromium.org/2019/10/no-more-mixed-messages-about-https.html
Check this out, also info for developers!
https://blog.chromium.org/2019/10/no-more-mixed-messages-about-https.html
After disabling the mixed content block for this domain, another warning pops up:
[Deprecation] Subresource requests whose URLs contain embedded credentials (e.g. https://user:pass@host/) are blocked. See https://www.chromestatus.com/feature/5669008342777856 for more details.
So the USER@PASS used to acces pictures from kodi does not work anymore also.. ;-(
Another similair addon does work! It gets images from website url's.
Maybe it's an option to make something like that?
https://github.com/custom-components/sensor.radarr_upcoming_media
Hope you can fix this this.
Unfortunately there isn't much I can do about this. The component is displaying images the same way kodi's web interface does. I think your options are:
- Enable SSL on your kodi installation. I've never tried this, but per the docs it's an option.
- Disable SSL on your HA instance. This is probably not ideal in your case.
- Check to see if there is an option in kodi to not download artwork but use the urls instead. Not sure if this options exists or not.
Many people use SSL in HA because it's needed when using Google integration (besides security offcourse). So to disable SSL in HA is not an option for me.
I'll look into the possebility to make kodi use SSL. Or fork this and see If i can fix the SMB path or use online images from imdb.
In the mean time you now know about this potential problem in case more people are posting this.
Regards, and Thnx for this nice addon.
Thanks for bringing this to my attention, I"ll add a section to the README about Known Issues and include some notes about this. Do let me know if you come up with a solution, or one of my suggestions above works for you.
Quick Fix (but only for the browser where security can be disabled, so no mobile browser solution yet):
- Disable user and password in Kodi Webserver settings.
- Make sure This plugin does not use User or Password for Kodi integration from previous configurations.
- In Browser Disable security for this domain.
How to:
Remove Kodi User and Password in core.config_entries file in *.storage* folder:_
"version": 1,
"domain": "kodi",
"title": "Kodi Server",
"data": {
"name": "Kodi Server",
"host": "<<LOCAL IP>>",
"port": <<WEBPORT>>,
"ws_port": 9090,
>>>>> "username": "",
>>>>> "password": "",
"ssl": false,
"timeout": 5
How to:
Disable browser security for this domain:
See also: https://blog.chromium.org/2019/10/no-more-mixed-messages-about-https.html
Steps:
- Click on the LOCK at the front of the URL.
- Click on Site Settings, and allow "Unsecure content".
In developer tools you'll still see some warnings like the one below. but it works perfectly!
Mixed Content: The page at 'https://<<MYDOMAIN>>.duckdns.org:<<PORT>>/lovelace/media' was loaded over HTTPS, but requested an insecure image 'http://<<KODI_LOCAL_IP>>:<<LOCAL_HTTP_PORT>>/image/image%3A%2F%2Fsmb%253A%252F%252F<<KODI_LOCAL_IP>>)%252FMedia%252FFilms%252FThe%2520Hunt%2520%25282020%2529%252Ffanart.jpg'. This content should also be served over HTTPS.
Thanks for posting a workaround! I think there are several ways this could be approached, but all are outside the scope of the component. I put a reference to this issue in the README under the known issues so if anyone encounters this in the future they can read about possible workarounds.
Hello
Is there anyting new about this?
Im also using MySQL database, and i'm not a fan of removing my password from Kodi.
So is there a workaround with keeping password on Kodi?
@RuneNyhuus I haven't looked at this since the issue was closed as it's outside the scope of what this component provides. If you can't remove the password you could try one of the other recommendations in this comment above.