Open ghost opened 7 years ago
I have the same problem here, same conditions. Did you notice that it fails while tying to fetch something on localhost?
yes, probably there should be some service running, it also needs a reboot so I assume this is installed as a daemon, or not, in our case
Yeahr cloud be. I reinstalled and rebooted it many times and nothing changes there. Sounds a bit like broken installation. Do you use Kodi 17.1 too?
Openelec 8 so that is Kodi 17.1
Hi, Spotimc runs an embeded http server, which publishes track streams as wave files. This streams are protected by some basic token mechanism, which doesn't seem to work on the latest Kodi (haven't checked myself, just figuring this out from the 403 status codes). Will check the next week, seems that this can be fairly easy to solve (or at least disable the token mechanism in the meantime).
Hi, that would be really great. Thank you ;)
Hi, Since i'm not familiar with kodi's addons framework I could only deactivate the token based auth that is implemented in the proxy. For some reason the 'X-Spotify-Token' header attribute is missing in the request. Therefore, the function _check_request in the file resources/libs/pyspotify-ctypes-proxy/src/spotifyproxy/httpproxy.py returns a 403 error code.
In order to overcome this problem until the author fix the root cause, it's necessary to comment some lines of the _check_request function. My patched function looks like this:
def _check_request(self):
method = cherrypy.request.method.upper()
headers = cherrypy.request.headers
#Fail for other methods than get or head
if method not in ("GET", "HEAD"):
raise cherrypy.HTTPError(405)
#Error if no token or user agent are provided
# -- Steve19802: Start --
#if 'User-Agent' not in headers or 'X-Spotify-Token' not in headers:
# raise cherrypy.HTTPError(403)
# -- Steve19802: End --
#Error if the requester is not allowed
if headers['Remote-Addr'] not in self.__allowed_ips:
raise cherrypy.HTTPError(403)
#Check that the supplied token is correct
# -- Steve19802: Start --
#user_token = headers['X-Spotify-Token']
#user_agent = headers['User-Agent']
#correct_token = create_user_token(self.__base_token, user_agent)
#if user_token != correct_token:
# raise cherrypy.HTTPError(403)
# -- Steve19802: End --
return method
Running the latest OpenElec, I cannot use the app anymore. When I start a song it erorrs.
Linux datKassie 4.9.21 #1 SMP Fri Apr 14 21:26:30 CEST 2017 armv7l GNU/Linux RPi 2
Latest (beta5) from SuperRepo