kodi-pvr / pvr.hts

Kodi's Tvheadend HTSP client addon
GNU General Public License v2.0
135 stars 93 forks source link

Wrong URL for getting picon images from server. #438

Closed frere-jacques closed 4 years ago

frere-jacques commented 4 years ago

Hi, I am running Libreelec 9.2 and with Tvheadend HTSP Client 4.4.20.1. I have since ever the problem that I don't see the channel picons in Kodi although they seem to work fine in EPG of TVH settings page. Recently I found in the log most likely the source of the problem. In my KODI.log I found lot of issues like the following: 2019-12-07 18:27:19.736 T:139925983164544 DEBUG: ------ Window Init (MyPVRChannels.xml) ------ 2019-12-07 18:27:19.736 T:139925983164544 INFO: Loading skin file: MyPVRChannels.xml, load type: KEEP_IN_MEMORY 2019-12-07 18:27:19.764 T:139925983164544 DEBUG: CGUIMediaWindow::GetDirectory (pvr://channels/tv/Alle Kanäle/) 2019-12-07 18:27:19.764 T:139925983164544 DEBUG: ParentPath = [] 2019-12-07 18:27:19.805 T:139925538207488 ERROR: CCurlFile::Stat - Failed: Couldn't connect to server(7) for http://user/passwd@192.168.199.11:9981/imagecache/2 2019-12-07 18:27:19.806 T:139925538207488 DEBUG: GetImageHash - unable to stat url http://user/passwd@192.168.199.11:9981/imagecache/2

If I take the url and replace the / in the credentials with a : I get a correct image. So it seems the URL is set up wrongly. This is somewhat strange because the main functions are working.

tudstudent commented 4 years ago

Good find! Just tested your find and in my browser it is now displaying the correct icon! Hope to have this typo fixed soon. @Jalle19 is it possible to push this fix?

frere-jacques commented 4 years ago

Actually, if you have the same problem, you might be able to fix it yourself.

So I talked to other people on the internet about my problem and nobody else seemed to share this. You are actually the first one I met.

I am using LibreELEC and my installation had some history with custom builds and so on. So I recently installed LibreELEC freshly from scratch and now everything is working fine and as expected. My idea is that during update procedures of LibreELEC maybe not all code and functions are updated. Or maybe my buggy version had a higher release number or whatsoever. Since you seem to be from Dresden you can read my final rant about that here: https://www.kodinerds.net/index.php/Thread/68732-Wie-man-ein-unl%C3%B6sbares-Chaos-und-Probleme-erzeugt/

frere-jacques commented 4 years ago

I even checked the source code here and in that function it's correctly with a :. That was a strong hint for me that's a problem of my system. And maybe yours too.

tudstudent commented 4 years ago

I am using OSMC (OSMC Vera 4K+). Did you enable special logging, to extract that line?

Did a reinstall of my Vera yesterday (it is now running stock OSMC and the accompanied PVR addon). When I am in tvh browser I can see the picon (and when copying the URL it is 100% similar to the one you mention above with : ":"). So need to check if I see the same in my log. And in parallel, which file is the source file to check.

frere-jacques commented 4 years ago

No, it's in normal logging. I don't know your system, but on LibreELEC you find the current log, even if logging ist not enabled under .kodi/temp/kodi.log. If it's the same for you, you can ssh to that machine and do something like: cat .kodi/temp/kodi.log | grep GetImageHash

Then you get the corresponding lines shown in the terminal.

frere-jacques commented 4 years ago

Didn't saw the last question. You can't check the source code on your system. I browsed through the source code here on github and followed the trace of the call of GetImageHash and found the place where the string is created. And indeed there is a : instead of /. Maybe OSMC is outdated and included an old version of this addon. For a freshly official LibreELEC installation on a generic platform I can confirm that my problem is not persistent anymore.

tudstudent commented 4 years ago

I know where my regular log is, just wanted to now if you enabled debug logging ;)

But here it is: 2020-02-17 15:25:32.375 T:3926909664 ERROR: CCurlFile::Stat - Failed: HTTP response code said error(22) for http://USERNAME:PASSWORD@server.servername.org:9981/imagecache/93 2020-02-17 15:25:33.089 T:3966939872 ERROR: CCurlFile::Stat - Failed: HTTP response code said error(22) for http://USERNAME:PASSWORD@server.servername.org:9981/imagecache/88 2020-02-17 15:25:33.093 T:3935302368 ERROR: CCurlFile::Stat - Failed: HTTP response code said error(22) for http://USERNAME:PASSWORD@server.servername.org:9981/imagecache/94 2020-02-17 15:25:33.247 T:3966939872 ERROR: CCurlFile::Stat - Failed: HTTP response code said error(22) for http://USERNAME:PASSWORD@server.servername.org:9981/imagecache/91 2020-02-17 15:25:33.414 T:3935302368 ERROR: CCurlFile::Stat - Failed: HTTP response code said error(22) for http://USERNAME:PASSWORD@server.servername.org:9981/imagecache/83 2020-02-17 15:25:33.598 T:3966939872 ERROR: CCurlFile::Stat - Failed: HTTP response code said error(22) for http://USERNAME:PASSWORD@server.servername.org:9981/imagecache/90 2020-02-17 15:25:33.599 T:3658994400 ERROR: CCurlFile::Stat - Failed: HTTP response code said error(22) for http://USERNAME:PASSWORD@server.servername.org:9981/imagecache/95 2020-02-17 15:25:33.625 T:3935302368 ERROR: CCurlFile::Stat - Failed: HTTP response code said error(22) for http://USERNAME:PASSWORD@server.servername.org:9981/imagecache/100 2020-02-17 15:25:34.596 T:3658994400 ERROR: CCurlFile::Stat - Failed: HTTP response code said error(22) for http://USERNAME:PASSWORD@server.servername.org:9981/imagecache/98 2020-02-17 15:25:34.612 T:3966939872 ERROR: CCurlFile::Stat - Failed: HTTP response code said error(22) for http://USERNAME:PASSWORD@server.servername.org:9981/imagecache/96 2020-02-17 15:25:35.254 T:3935302368 ERROR: CCurlFile::Stat - Failed: HTTP response code said error(22) for http://USERNAME:PASSWORD@server.servername.org:9981/imagecache/90 2020-02-17 15:25:35.477 T:3926909664 ERROR: CCurlFile::Stat - Failed: HTTP response code said error(22) for http://USERNAME:PASSWORD@server.servername.org:9981/imagecache/83 2020-02-17 15:25:35.986 T:3658994400 ERROR: CCurlFile::Stat - Failed: HTTP response code said error(22) for http://USERNAME:PASSWORD@server.servername.org:9981/imagecache/90 2020-02-17 15:25:36.450 T:3926909664 ERROR: CCurlFile::Stat - Failed: HTTP response code said error(22) for http://USERNAME:PASSWORD@server.servername.org:9981/imagecache/98 2020-02-17 15:25:36.519 T:3966939872 ERROR: CCurlFile::Stat - Failed: HTTP response code said error(22) for http://USERNAME:PASSWORD@server.servername.org:9981/imagecache/96 2020-02-17 15:25:36.616 T:3658994400 ERROR: CCurlFile::Stat - Failed: HTTP response code said error(22) for http://USERNAME:PASSWORD@server.servername.org:9981/imagecache/89 2020-02-17 15:25:36.672 T:3935302368 ERROR: CCurlFile::Stat - Failed: HTTP response code said error(22) for http://USERNAME:PASSWORD@server.servername.org:9981/imagecache/82 2020-02-17 15:25:36.814 T:3966939872 ERROR: CCurlFile::Stat - Failed: HTTP response code said error(22) for http://USERNAME:PASSWORD@server.servername.org:9981/imagecache/80 2020-02-17 15:25:36.873 T:3658994400 ERROR: CCurlFile::Stat - Failed: HTTP response code said error(22) for http://USERNAME:PASSWORD@server.servername.org:9981/imagecache/105 2020-02-17 15:25:36.992 T:3935302368 ERROR: CCurlFile::Stat - Failed: HTTP response code said error(22) for http://USERNAME:PASSWORD@server.servername.org:9981/imagecache/86 2020-02-17 15:25:37.050 T:3966939872 ERROR: CCurlFile::Stat - Failed: HTTP response code said error(22) for http://USERNAME:PASSWORD@server.servername.org:9981/imagecache/102 2020-02-17 15:25:37.147 T:3926909664 ERROR: CCurlFile::Stat - Failed: HTTP response code said error(22) for http://USERNAME:PASSWORD@server.servername.org:9981/imagecache/93 2020-02-17 15:25:37.222 T:3658994400 ERROR: CCurlFile::Stat - Failed: HTTP response code said error(22) for http://USERNAME:PASSWORD@server.servername.org:9981/imagecache/101 2020-02-17 15:25:37.335 T:3966939872 ERROR: CCurlFile::Stat - Failed: HTTP response code said error(22) for http://USERNAME:PASSWORD@server.servername.org:9981/imagecache/95 2020-02-17 15:25:37.410 T:3935302368 ERROR: CCurlFile::Stat - Failed: HTTP response code said error(22) for http://USERNAME:PASSWORD@server.servername.org:9981/imagecache/103 2020-02-17 15:25:38.893 T:3658994400 ERROR: CCurlFile::Stat - Failed: HTTP response code said error(22) for http://USERNAME:PASSWORD@server.servername.org:9981/imagecache/100 2020-02-17 15:25:38.912 T:3966939872 ERROR: CCurlFile::Stat - Failed: HTTP response code said error(22) for http://USERNAME:PASSWORD@server.servername.org:9981/imagecache/92 2020-02-17 15:25:39.051 T:3935302368 ERROR: CCurlFile::Stat - Failed: HTTP response code said error(22) for http://USERNAME:PASSWORD@server.servername.org:9981/imagecache/96 2020-02-17 15:25:39.114 T:3926909664 ERROR: CCurlFile::Stat - Failed: HTTP response code said error(22) for http://USERNAME:PASSWORD@server.servername.org:9981/imagecache/87 2020-02-17 15:25:39.210 T:3966939872 ERROR: CCurlFile::Stat - Failed: HTTP response code said error(22) for http://USERNAME:PASSWORD@server.servername.org:9981/imagecache/82 2020-02-17 15:25:39.267 T:3658994400 ERROR: CCurlFile::Stat - Failed: HTTP response code said error(22) for http://USERNAME:PASSWORD@server.servername.org:9981/imagecache/81 2020-02-17 15:25:39.394 T:3926909664 ERROR: CCurlFile::Stat - Failed: HTTP response code said error(22) for http://USERNAME:PASSWORD@server.servername.org:9981/imagecache/105 2020-02-17 15:25:39.468 T:3935302368 ERROR: CCurlFile::Stat - Failed: HTTP response code said error(22) for http://USERNAME:PASSWORD@server.servername.org:9981/imagecache/84 2020-02-17 15:25:39.627 T:3966939872 ERROR: CCurlFile::Stat - Failed: HTTP response code said error(22) for http://USERNAME:PASSWORD@server.servername.org:9981/imagecache/102 2020-02-17 15:25:39.663 T:3658994400 ERROR: CCurlFile::Stat - Failed: HTTP response code said error(22) for http://USERNAME:PASSWORD@server.servername.org:9981/imagecache/99

So seems to be a problem still... Just tested again and same problem. URL in browser and doing it manually fixes the problem. So might be something strange in addon/kodi Problem is not in "/" versus ":", but at least somewhere in there. Since the link on itself will work in firefox (manually typed the user and pass).

frere-jacques commented 4 years ago

But actually you don't seem to have the same problem. You have correctly a : present. Maybe you replace your FQDN with the IP of the server to outrule a dns problem.

tudstudent commented 4 years ago

Changed DNS to IP, Pass to other pass without special char. All same result as mentioned above.

tudstudent commented 4 years ago

Okay, found the solution, for anyone who cares: https://jamiej.co.uk/blog/working-picons-tvheadend-kodi/

In the comments is the solution:

If icons appear in TVHeadend but not in Kodi: TVHeadend, Configuration, General, enable expert view, HTTP Server Settings, Authentication type: Both plain and digest. This is TVHeadend Summer 2019, Kodi 18.3

After changing this in thv it is now working. It was on Digest in my case, changed to both and fixed! Not sure if this is a weakness of Kodi or TVH but since it runs on local network no issue.

frere-jacques commented 4 years ago

Sorry, I think I can't help you any further. Only thing you can check is that authentification is set to plain and digest on server side, but since you get images in the browser it might be fine already.

Sadly I wouldn't count on getting Feedback here. See the date of my issue and no response yet.

You may check out kodinerds since you seem to be german or the forum of your os or you switch to a different os.

frere-jacques commented 4 years ago

Ok seems you found it yourself.

Kodi and this minimal OSs are really verbose and I am always hesitated to post full logs, because I am not always sure if not some credentials are contained.