asbjornolling / mopidyapi Goto Github PK
View Code? Open in Web Editor NEWA Python 3.6+ Mopidy client library, that uses HTTP and Websockets to talk to its JSON RPC API.
License: GNU General Public License v3.0
A Python 3.6+ Mopidy client library, that uses HTTP and Websockets to talk to its JSON RPC API.
License: GNU General Public License v3.0
If not using flask, the self.flask_object of MopidyWSClient is never initialized and make the library crash at line 86 of MopidyWSClient.
Quick fix is to initilize it in the constructor with
self.flask_object = flask_object
before
if flask_object is not None:
There is an error with the get_image of the Library Controller. (Python 3.6.3)
The following code:
m = MopidyAPI()
track = m.playback.get_current_track()
m.library.get_images([track.uri])
Get this error:
2019-05-20 19:35:49.845 | ERROR | mopidyapi.httpclient:rpc_call:84 - An error has been caught in function 'rpc_call', process 'MainProcess' (18154), thread 'MainThread' (1996312576):
Traceback (most recent call last):File "", line 1, in
File "/usr/local/lib/python3.6/site-packages/mopidyapi/controllers/library.py", line 159, in get_images
return self.client.rpc_call('core.library.get_images', *args, **kwargs)
| | | | -> {}
| | | -> (['spotify:track:1mgWnqeUOurHJIyorDtuqF'],)
| | -> <bound method MopidyAPI.rpc_call of <mopidyapi.httpclient.MopidyAPI object at 0x76c6e4f0>>
| -> <mopidyapi.httpclient.MopidyAPI object at 0x76c6e4f0>
-> <mopidyapi.controllers.library.LibraryController object at 0x76c6e5f0>File "/usr/local/lib/python3.6/site-packages/mopidyapi/httpclient.py", line 84, in rpc_call
return deserialize_mopidy(r['result'])
| -> {'jsonrpc': '2.0', 'id': 0, 'result': {'spotify:track:1mgWnqeUOurHJIyorDtuqF': [{'width': 640, 'model': 'Image', 'uri': 'htt...
-> <function deserialize_mopidy at 0x76003738>
File "/usr/local/lib/python3.6/site-packages/mopidyapi/parsedata.py", line 44, in deserialize_mopidy
raise ValueError(f"Uncaught type: {type(data)}")
-> <class 'ValueError'>ValueError: Uncaught type: <class 'dict'>
First of all, thank you a lot for creating this module. It makes interfacing with mopidy from python code so much easier.
Since the release of version 1.0.1 in April, this project improved quite a bit. The thing I'm most interested in is the automatic reconnect on network loss. I restart mopidy quite often, and mopidyapi does not always keep the connection.
Would it be possible to publish a new PyPi package containing these changes?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.