Comments (9)
Hi,
I'm running some tests but cheroot can be upgraded to the last version.
It's not the same for Cherrypy, as I remember some functions were removed or changed.
from plugin.audio.spotify.
So, it worked? I will try this updated version
from plugin.audio.spotify.
I have an issue with spotify connect, the first song is ok but the next one is not playing.
Local playback is ok for me.
from plugin.audio.spotify.
I have this in logs
2021-04-27 12:11:51.639 T:1086 ERROR <general>: [27/Apr/2021:12:11:51] HTTP
Traceback (most recent call last):
File "/home/prehravac/.kodi/addons/plugin.audio.spotify/resources/lib/cherrypy/_cprequest.py", line 638, in respond
self._do_respond(path_info)
File "/home/prehravac/.kodi/addons/plugin.audio.spotify/resources/lib/cherrypy/_cprequest.py", line 697, in _do_respond
response.body = self.handler()
File "/home/prehravac/.kodi/addons/plugin.audio.spotify/resources/lib/cherrypy/lib/encoding.py", line 219, in __call__
self.body = self.oldhandler(*args, **kwargs)
File "/home/prehravac/.kodi/addons/plugin.audio.spotify/resources/lib/cherrypy/_cpdispatch.py", line 54, in __call__
return self.callable(*self.args, **self.kwargs)
File "/home/prehravac/.kodi/addons/plugin.audio.spotify/resources/lib/httpproxy.py", line 204, in nexttrack
return self.silence(20)
File "/home/prehravac/.kodi/addons/plugin.audio.spotify/resources/lib/httpproxy.py", line 199, in silence
return cherrypy.lib.static.serve_fileobj(output_buffer.read(), content_type="audio/wav", name="%s.wav" % duration, debug=True)
File "/home/prehravac/.kodi/addons/plugin.audio.spotify/resources/lib/cherrypy/lib/static.py", line 184, in serve_fileobj
return _serve_fileobj(fileobj, content_type, content_length, debug=debug)
File "/home/prehravac/.kodi/addons/plugin.audio.spotify/resources/lib/cherrypy/lib/static.py", line 195, in _serve_fileobj
r = httputil.get_ranges(request.headers.get('Range'), content_length)
File "/home/prehravac/.kodi/addons/plugin.audio.spotify/resources/lib/cherrypy/lib/httputil.py", line 91, in get_ranges
stop = content_length - 1
TypeError: unsupported operand type(s) for -: 'NoneType' and 'int'
When i changed line 199 in httpproxy.py to
return cherrypy.lib.static.serve_fileobj(output_buffer.read(), content_type="audio/wav", name="20.wav", debug=True)
I don't know python, so i just removed the formated print :) I guess, this problem will be on more places.
This error goes away. It still behaves strangely, it drops connection on every track change
from plugin.audio.spotify.
You have a NoneType for content_length because the file is empty or doesn't exist. I have the same.
The code is ok but I'm missing the log about the file not requested or downloaded.
The first error is :
2021-04-26 20:59:02.556 T:4644 ERROR : [26/Apr/2021:20:59:02] TOOLS.STATIC os has no fstat attribute
2021-04-26 20:59:02.556 T:4644 ERROR : [26/Apr/2021:20:59:02] TOOLS.STATIC Content-Type: 'audio/wav'
2021-04-26 20:59:02.556 T:4644 ERROR : [26/Apr/2021:20:59:02] TOOLS.STATIC Content-Disposition: None
from plugin.audio.spotify.
Have you found out something?
Everytime i try to seek in song or to skip to next song (using spotify connect), i get this in log
2021-04-29 23:51:11.057 T:3055 ERROR <general>: [29/Apr/2021:23:51:11] NATIVE_ADAPTER Traceback (most recent call last):
File "/home/prehravac/.kodi/addons/plugin.audio.spotify/resources/lib/cherrypy/_cpnative_server.py", line 89, in respond
self.send_response(
File "/home/prehravac/.kodi/addons/plugin.audio.spotify/resources/lib/cherrypy/_cpnative_server.py", line 117, in send_response
req.write(seg)
File "/home/prehravac/.kodi/addons/plugin.audio.spotify/resources/lib/cheroot/server.py", line 1133, in write
self.conn.wfile.write(chunk)
File "/home/prehravac/.kodi/addons/plugin.audio.spotify/resources/lib/cheroot/makefile.py", line 438, in write
res = super().write(val, *args, **kwargs)
File "/home/prehravac/.kodi/addons/plugin.audio.spotify/resources/lib/cheroot/makefile.py", line 36, in write
self._flush_unlocked()
File "/home/prehravac/.kodi/addons/plugin.audio.spotify/resources/lib/cheroot/makefile.py", line 45, in _flush_unlocked
n = self.raw.write(bytes(self._write_buf))
File "/usr/lib/python3.9/socket.py", line 722, in write
return self._sock.send(b)
ConnectionResetError: [Errno 104] Connection reset by peer
I cannot figure out, which connection is reset. (I think it is download of wav file in proxy)
For a while, i thought, there is problem of 127.0.0.1 vs ::1 vs localhost connection,
because i got this on wireshark
in roughtly the same time as the error in log.
But even after trying to let the http proxy listen to all ip addresses (suboptimal - opens it to network) , i still get connectionresets in log
from plugin.audio.spotify.
I'm not sure to found a solution for now. I commented cherrypy.expose to have a simple solution :
- Local playback is working
- If you want to use spotify connect, you have to select "Spotify Connect : kodi" from the playback device menu first
With that modification I can update cheroot and cherrypy to the last version.
from plugin.audio.spotify.
Ok, thanks. I will try to debug more, maybe with strace. Can you show me picture of your sound selection, i think, i don't see your options there (i use pulseaudio to be able to send in another sounds/music from bluetooth and home assistant)
from plugin.audio.spotify.
It works now, strange. Today, I tested it with my wifes phone and it connects and changes tracks without problem. I have kodi plugin logged in on her account, but until today, i was testing spotify connect with my phone (and my account). There seems to be problem, when re-login to another account is involved.
from plugin.audio.spotify.
Related Issues (20)
- Waiting for authentication token... HOT 1
- Playback via Spotify Connect stops after one track HOT 1
- Track Playback not Starting - Changing Code in httpproxy.py:send_audio_stream Fixes It HOT 3
- Can't login on Windows 10 HOT 1
- Addon crashes when playing music HOT 1
- Previously saved Spotify login details fail to login after restarting Kodi 19.3 using LibreElec 10 HOT 2
- Please connect this device with the Spotify App on your phone to Login or enter your credentials in the Settings dialog" HOT 2
- spotify connect no sound HOT 1
- liked songs HOT 1
- Kodi crashes after install pluging on Windows
- Spotify won't play music on Nvidia Shield TV 2019 Android TV
- Spotify Connect - Contribution
- Audio not playing (with some logs) HOT 1
- Use without browser? HOT 2
- Spotify playback status not syncing
- created by accident HOT 1
- add-on still being maintained?
- Spotify Connect messes up add-on HOT 4
- Not working with LE11 and Kodi 20.0 (Nexus) HOT 7
- I have it up and running on the nighly from 20230210. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from plugin.audio.spotify.