Giter VIP home page Giter VIP logo

Comments (12)

Elkropac avatar Elkropac commented on August 15, 2024 1

I have "Local playback on this device" selected in plugin

from plugin.audio.spotify.

ldsz avatar ldsz commented on August 15, 2024

Hi, of course, we can merge the spotty running test and decode UTF removed,
Can you tell me why you expose lms ? what was the error ?
About the killall Spotty, I think we have to find the architecture first, the following test is made inside utils.py :
if architecture.startswith('AMD64') or architecture.startswith('x86_64'):

from plugin.audio.spotify.

Elkropac avatar Elkropac commented on August 15, 2024

I will use your new version and base my commits on it.

Without lms exposed, i get no sound , when i use spotify connect from other device. On other hand, with lms exposed i get some conflicts with spotty launched twice over itself?

I have no logs now of error on lms, but i remember, there was something in logs when i started debugging it.

Ah, i remembered, i captured packets using tshark and got this, without lms exposed

POST /lms/jsonrpc.js HTTP/1.1
Host: localhost:52308
X-Scanner: 1
Content-Type: application/json
Content-Length: 81

{"id": 1,"method":"slim.request","params":["None",["spottyconnect","volume",50]]}HTTP/1.1 404 Not Found
Content-Type: text/html;charset=utf-8
Server: CherryPy/unknown
Date: Sat, 17 Apr 2021 18:09:17 GMT
Content-Length: 1670

<!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"></meta>
    <title>404 Not Found</title>
    <style type="text/css">
    #powered_by {
        margin-top: 20px;
        border-top: 2px solid black;
        font-style: italic;
    }

    #traceback {
        color: red;
    }
    </style>
</head>
    <body>
        <h2>404 Not Found</h2>
        <p>The path '/lms/jsonrpc.js' was not found.</p>
        <pre id="traceback">Traceback (most recent call last):
  File "/home/prehravac/.kodi/addons/plugin.audio.spotify/resources/lib/cherrypy/_cprequest.py", line 630, in respond
    self._do_respond(path_info)
  File "/home/prehravac/.kodi/addons/plugin.audio.spotify/resources/lib/cherrypy/_cprequest.py", line 689, in _do_respond
    response.body = self.handler()
  File "/home/prehravac/.kodi/addons/plugin.audio.spotify/resources/lib/cherrypy/lib/encoding.py", line 221, in __call__
    self.body = self.oldhandler(*args, **kwargs)
  File "/home/prehravac/.kodi/addons/plugin.audio.spotify/resources/lib/cherrypy/lib/jsontools.py", line 58, in json_handler
    value = cherrypy.serving.request._json_inner_handler(*args, **kwargs)
  File "/home/prehravac/.kodi/addons/plugin.audio.spotify/resources/lib/cherrypy/_cperror.py", line 416, in __call__
    raise self
cherrypy._cperror.NotFound: (404, "The path '/lms/jsonrpc.js' was not found.")
</pre>
    <div id="powered_by">
      <span>
        Powered by <a href="http://www.cherrypy.org">CherryPy unknown</a>
      </span>
    </div>
    </body>
</html>

from plugin.audio.spotify.

Elkropac avatar Elkropac commented on August 15, 2024

I noticed, you removed "/lms" from arguments in connect_daemon.py

from plugin.audio.spotify.

ldsz avatar ldsz commented on August 15, 2024

yes, it's to correct this issues. The lms path doesn't exist.

from plugin.audio.spotify.

Elkropac avatar Elkropac commented on August 15, 2024

Well, it does not like it with "localhost:52308/" in connect_daemon.py, line 35 :)

POST //jsonrpc.js HTTP/1.1
Host: localhost:52308
X-Scanner: 1
Content-Type: application/json
Content-Length: 81

{"id": 1,"method":"slim.request","params":["None",["spottyconnect","volume",50]]}HTTP/1.1 400 Bad Request
Content-Length: 50
Content-Type: text/plain

Absolute URI not allowed if server is not a proxy.

and after removing "/" from connect_daemon.py, line 35 , I get this , again

POST /jsonrpc.js HTTP/1.1
Host: localhost:52308
X-Scanner: 1
Content-Type: application/json
Content-Length: 76

{"id": 1,"method":"slim.request","params":["None",["spottyconnect","stop"]]}HTTP/1.1 404 Not Found
Content-Type: text/html;charset=utf-8
Server: CherryPy/unknown
Date: Sun, 18 Apr 2021 10:15:54 GMT
Content-Length: 1463

<!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"></meta>
    <title>404 Not Found</title>
    <style type="text/css">
    #powered_by {
        margin-top: 20px;
        border-top: 2px solid black;
        font-style: italic;
    }

    #traceback {
        color: red;
    }
    </style>
</head>
    <body>
        <h2>404 Not Found</h2>
        <p>The path '/jsonrpc.js' was not found.</p>
        <pre id="traceback">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/_cperror.py", line 416, in __call__
    raise self
cherrypy._cperror.NotFound: (404, "The path '/jsonrpc.js' was not found.")
</pre>
    <div id="powered_by">
      <span>
        Powered by <a href="http://www.cherrypy.org">CherryPy unknown</a>
      </span>
    </div>
    </body>
</html>

from plugin.audio.spotify.

ldsz avatar ldsz commented on August 15, 2024

can you try with version 1.2.2 ?

from plugin.audio.spotify.

Elkropac avatar Elkropac commented on August 15, 2024

I was testing with code, you merged today from my branch, ie with 1.2.2 . When I expose lms in httpproxy.py and /lms in connect_daemon.py , i get sound from kodi, when i use "spotify connect" from my mobile. Without this modification, i get no sound (spotify on my mobile connects to kodi, it shows, it's playing, but there is no sound).

On other hand (with lms exposed), i have some zombie spotty processes, when i want to play music directly from kodi spotify plugin. I don't know, if it's related

from plugin.audio.spotify.

ldsz avatar ldsz commented on August 15, 2024

With up-to-date code or 1.2.2, I get sound with spotify connect if I select Kodi as playback device inside the plugin menu first.
Is it the same for you or with lms expose you don't have to select kodi in the plugin ?

from plugin.audio.spotify.

jmbreuer avatar jmbreuer commented on August 15, 2024

I have "Local playback on this device" selected in plugin

Sounds like a viable fix to the issue I'm also experiencing then

from plugin.audio.spotify.

ldsz avatar ldsz commented on August 15, 2024

@Elkropac Thank you for your PRs, I'm now able to use Spotify Connect at start, without device's selection.

from plugin.audio.spotify.

Elkropac avatar Elkropac commented on August 15, 2024

@ldsz Thanks for your merges. Hope, everything works ok.

from plugin.audio.spotify.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.