jjmontesl / python-clementine-remote Goto Github PK
View Code? Open in Web Editor NEWPython library and command line tool for the Clementine Music Player remote protocol
License: Apache License 2.0
Python library and command line tool for the Clementine Music Player remote protocol
License: Apache License 2.0
I installed with 2.7 (which did not complain or refuse) using pipsi, which on my system defaults to python 2.7.
When attempting to run --version
, I got an error because in 2.x, print is a keyword not a function:
$ clementine-remote --help
Traceback (most recent call last):
File "/home/sean/.local/bin/clementine-remote", line 7, in <module>
from clementineremote.cli import main
File "/home/sean/.local/venvs/python-clementine-remote/local/lib/python2.7/site-packages/clementineremote/cli.py", line 74
clementine.on_message = print
The fix for just that one command was simple: drop from __future__ import print_function
at the top of the cli.py file. (No idea if that would have further ramifications down the line.)
I was able to fix by installing with the python3 virtualenv instead (pipsi install --python python3 python-clementine-remote
).
Ideally, if you require python3, a python2 install would fail.
Please, implement volumeup
and volumedown
commands.
Or it could be just change set_volume
command to accept +/โNN
values.
Currently, I have to do volumeup
like that:
clementine-remote set_volume `clementine-remote status | awk '$4 ~/volume=/ { gsub(/[a-z=,]/,""); print $4+4 }'`
I have python-clementine-remote 1.0.3 installed from pip. When trying to run the client, I get the following error message:
Traceback (most recent call last):
File "/home/petersohn/.local/bin/clementine-remote", line 5, in <module>
from clementineremote.cli import main
File "/home/petersohn/.local/lib/python3.9/site-packages/clementineremote/__init__.py", line 17, in <module>
from .clementine import ClementineRemote
File "/home/petersohn/.local/lib/python3.9/site-packages/clementineremote/clementine.py", line 21, in <module>
import clementineremote.remotecontrolmessages_pb2 as cr
File "/home/petersohn/.local/lib/python3.9/site-packages/clementineremote/remotecontrolmessages_pb2.py", line 32, in <module>
_descriptor.EnumValueDescriptor(
File "/home/petersohn/.local/lib/python3.9/site-packages/google/protobuf/descriptor.py", line 755, in __new__
_message.Message._CheckCalledFromGeneratedFile()
TypeError: Descriptors cannot not be created directly.
If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0.
If you cannot immediately regenerate your protos, some other possible workarounds are:
1. Downgrade the protobuf package to 3.20.x or lower.
2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).
More information: https://developers.google.com/protocol-buffers/docs/news/2022-05-06#python-updates
I have protobuf 4.21.2 installed from pip.
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.