MilhouseVH / texturecache.py

Utility script to manage the XBMC texture cache
http://forum.xbmc.org/showthread.php?tid=158373
GNU General Public License v2.0
181 stars 34 forks source link

Doesn't accept user/pass #69

Open psonnosp opened 3 years ago

psonnosp commented 3 years ago

Hi!

When I run texturecache.py c tvshows I get this

C:\Program Files\Kodi Texture Cache Manager>texturecache.py c
Traceback (most recent call last):
  File "C:\Program Files\Kodi Texture Cache Manager\texturecache.py", line 8663, in <module>
    main(sys.argv[1:])
  File "C:\Program Files\Kodi Texture Cache Manager\texturecache.py", line 8353, in main
    if not checkConfig(argv[0]): sys.exit(2)
  File "C:\Program Files\Kodi Texture Cache Manager\texturecache.py", line 7893, in checkConfig
    data = wcomms.sendJSON(REQUEST, "libPing", checkResult=False, useWebServer=True)
  File "C:\Program Files\Kodi Texture Cache Manager\texturecache.py", line 2230, in sendJSON
    return self.sendWeb("POST", "/jsonrpc", id, request, {"Content-Type": "application/json"}, timeout=timeout)
  File "C:\Program Files\Kodi Texture Cache Manager\texturecache.py", line 2177, in sendWeb
    raise httplib.HTTPException("Remote web host requires webserver.username/webserver.password properties")
http.client.HTTPException: Remote web host requires webserver.username/webserver.password properties

even though both webserver.username and webserver.password are correct in the cfg-file. And it's only when I use c I get the error, nc, s, d, and P works just fine but maybe those commands is executed in a different way?

So how do I fix this?

RolandFelnhofer commented 2 years ago

Same applies to me, more than a year later.

RolandFelnhofer commented 2 years ago

I have solved the issue. - At least for me. webserver.username and webserver.password do not hold the username and password of a the web server holding any content to cache, it's the password and username of the Kodi web server!

psonnosp commented 2 years ago

Great to finally get a response but sorry I don't follow, what did you do to solve it?

RolandFelnhofer commented 2 years ago

I initial thought, that 'webserver.username' and 'webserver.password' are used to access the media file source. I access them from this installation via https but this was an error. It's the password for the Kodi web server API. I had also special characters in my password which are encoded in guisettings.xml. All I finally did, was, to copy and decode the value from '\<setting id="services.webserverusername">' and '\<setting id="services.webserverpassword">' in guisettings.xml to 'webserver.username =' and 'webserver.password =' in texturecache.cfg (which i placed into ~/.config/

Then it worked!

First I was also confused because 'texturecache.py config' doesn't show 'webserver.username' and 'webserver.password', even they are set.