Open xemwebe opened 3 years ago
I tried to update spotty binary to 0.35 but this version as an issues with special characters in login name. That why I leave 0.20. I understand this can be an issues for others. More work must be done to allow special characters with Spotty 0.35.
You might be the first to try it on Arch, I didn't. In your case, the HTTP server used to serve the downloaded song is running but not data are available.
Well, that's a valid reason for not updating. Regarding the second part of your answer: Does that mean that downloading the songs from the spotify server does not work? Does the addon starts a server to let kodi download the song from this server? In the addons data folder, I could see some binary files which could be downloaded songs, but I have no idea what data format these files have.
I think they are wave file. But you have a partial transfer, I guess they're very small. Maybe this is linked to the authentification issues. The plugin generate the header of the file but can't download from Spotify. What was the issues with spotty 0.20 ?
With spotty 0.20, I could not authenticate at all. If you are interested, I could roll back to version 0.20 and send you the error logs (and I don't use any special characters, but long random strings of alphanumerical characters as password).
Here are the error messages I get when I try to use spotty 0.20:
2021-04-13 11:51:25.075 T:90584 INFO <general>: plugin.audio.spotify --> b'trying AP Port 443'
2021-04-13 11:51:40.232 T:90607 INFO <general>: plugin.audio.spotify --> b'trying AP Port 443'
2021-04-13 11:51:55.387 T:90650 INFO <general>: plugin.audio.spotify --> b'trying AP Port 443'
2021-04-13 11:52:03.507 T:577 INFO <general>: JSONRPC Server: New connection added
2021-04-13 11:52:10.541 T:90682 INFO <general>: plugin.audio.spotify --> b'trying AP Port 443'
2021-04-13 11:52:23.259 T:90715 INFO <general>: initializing python engine.
2021-04-13 11:52:23.988 T:90715 ERROR <general>: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <class 'TypeError'>
Error Contents: '>=' not supported between instances of 'tuple' and 'int'
Traceback (most recent call last):
File "/var/lib/kodi/.kodi/addons/plugin.audio.spotify/resources/lib/spotipy/client.py", line 121, in _internal_call
r.raise_for_status()
File "/var/lib/kodi/.kodi/addons/script.module.requests/lib/requests/models.py", line 940, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://api.spotify.com/v1/me/
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/var/lib/kodi/.kodi/addons/plugin.audio.spotify/resources/lib/plugin_content.py", line 57, in __init__
self.browse_main()
File "/var/lib/kodi/.kodi/addons/plugin.audio.spotify/resources/lib/plugin_content.py", line 353, in browse_main
cur_user_label = self.sp.me()["display_name"]
File "/var/lib/kodi/.kodi/addons/plugin.audio.spotify/resources/lib/spotipy/client.py", line 570, in me
return self._get('me/')
File "/var/lib/kodi/.kodi/addons/plugin.audio.spotify/resources/lib/spotipy/client.py", line 148, in _get
return self._internal_call('GET', url, payload, kwargs)
File "/var/lib/kodi/.kodi/addons/plugin.audio.spotify/resources/lib/spotipy/client.py", line 124, in _internal_call
raise SpotifyException(r.status_code,
spotipy.client.SpotifyException: http status: 401, code:-1 - https://api.spotify.com/v1/me/:
The access token expired
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/var/lib/kodi/.kodi/addons/plugin.audio.spotify/plugin.py", line 14, in <module>
PluginContent()
File "/var/lib/kodi/.kodi/addons/plugin.audio.spotify/resources/lib/plugin_content.py", line 62, in __init__
log_exception(__name__, exc)
File "/var/lib/kodi/.kodi/addons/plugin.audio.spotify/resources/lib/utils.py", line 90, in log_exception
log_msg(format_exc(sys.exc_info()), xbmc.LOGDEBUG)
File "/usr/lib/python3.9/traceback.py", line 167, in format_exc
return "".join(format_exception(*sys.exc_info(), limit=limit, chain=chain))
File "/usr/lib/python3.9/traceback.py", line 120, in format_exception
return list(TracebackException(
File "/usr/lib/python3.9/traceback.py", line 493, in __init__
context = TracebackException(
File "/usr/lib/python3.9/traceback.py", line 508, in __init__
self.stack = StackSummary.extract(
File "/usr/lib/python3.9/traceback.py", line 340, in extract
if limit >= 0:
TypeError: '>=' not supported between instances of 'tuple' and 'int'
-->End of Python script error report<--
2021-04-13 11:52:24.022 T:90666 ERROR <general>: GetDirectory - Error getting plugin://plugin.audio.spotify/
I'm running Arch as well (Kodi 19, Arch 5.11.13) , using the default Spotty binary. I'm able to authenticate (using the connect via phone method) however when I try to play a song I too am getting there error:
CCurlFile::FillBuffer - Failed: Transferred a partial file(18)
If you go to this URL : https://www.spotify.com/fr/account/apps/ Can you see the app Spotify for Kodi ?
I created a new issue but can see that you guys are already talking about it here. I'm using default spotty and also getting partial file. If I follow your link I see the app Spotify for Kodi
In my environment (Kodi 19 on Arch Linux, Kernel 5.11.12), I could not connect to spotify using this plugin, because the spotty binary that is packaged with the plugin crashes. I could solve this issue by replacing resources/lib/spotty/x86-linux/spotty-x86_64 (which claims to be version 0.20.0) by an updated binary based on the repository https://github.com/michaelherger/spotty which is version 0.35.0. With this version, I can connect to spotify and everything seems to work, except for the most important part: I don't get any sound, but instead a bunch of error messages:
This raises a couple of questions: