jcsaaddupuy / python-xbmc Goto Github PK
View Code? Open in Web Editor NEWSimple python module that allow xbmc full control over HTTP Json API.
License: Do What The F*ck You Want To Public License
Simple python module that allow xbmc full control over HTTP Json API.
License: Do What The F*ck You Want To Public License
I installed this module using pip3 in ubuntu 12.04
sudo pip3 install xbmc-json
The installation completed OK.
However when importing the class I am getting this error:
Traceback (most recent call last):
File "/usr/local/bin/pvr", line 97, in <module>
from xbmcjson import XBMC, PLAYER_VIDEO
ImportError: cannot import name 'XBMC'
Is python3.4 fully supported?
Why xbmcjson import fails in android system.
OS = Android 4.4.2 (kernel: Linux 3.0.36+)
05:17:09 T:1866865248 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <type 'exceptions.SyntaxError'>
Error Contents: ('invalid syntax', ('<string>', 4, 2, ' '))
Traceback (most recent call last):
File "/mnt/internal_sd/Android/data/org.xbmc.kodi/files/.kodi/addons/plugin.program.test/default.py", line 5, in <module>
from xbmcjson import XBMC
File "/mnt/internal_sd/Android/data/org.xbmc.kodi/files/.kodi/addons/plugin.program.test/xbmcjson.py", line 106, in <module>
exec (s)
SyntaxError: ('invalid syntax', ('<string>', 4, 2, ' '))
-->End of Python script error report<--
got this error when i ran your example script
File "xbmcplay.py", line 10, in
xbmc.GUI.ActivateWindow({"window": "home"})
File "build/bdist.linux-x86_64/egg/xbmcjson/xbmcjson.py", line 96, in hook
File "build/bdist.linux-x86_64/egg/xbmcjson/xbmcjson.py", line 69, in execute
File "/usr/lib/python2.7/urllib2.py", line 127, in urlopen
return _opener.open(url, data, timeout)
File "/usr/lib/python2.7/urllib2.py", line 410, in open
response = meth(req, response)
File "/usr/lib/python2.7/urllib2.py", line 523, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib/python2.7/urllib2.py", line 448, in error
return self._call_chain(_args)
File "/usr/lib/python2.7/urllib2.py", line 382, in _call_chain
result = func(_args)
File "/usr/lib/python2.7/urllib2.py", line 531, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
urllib2.HTTPError: HTTP Error 404: Not Found
I have a video file. If I run the following on 3.4 (from PyCharm), it pauses, then plays again, without any change in position
Apologies if I am missing something basic.
print(xbmc.Player.GetActivePlayers())
xbmc.Player.PlayPause([PLAYER_VIDEO])
xbmc.Player.Seek(1,2000)
xbmc.Player.PlayPause([PLAYER_VIDEO])
Response is:
{'jsonrpc': '2.0', 'id': 0, 'result': [{'playerid': 1, 'type': 'video'}]}
Process finished with exit code 0
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.