Release Headphones Manager
#1
I wrote a small addon that gives the ability to add/resume artists on a headphones server. It's nothing fancy, just something I have been using for a while, thought I'd share it. Feel free to edit and spread it if wanted, I won't be doing any big updates on this one.

https://github.com/petwri/plugin.audio.h...es_manager

Usage: Simply set host/port/api in settings according to headphones config, launch it, that's it. Should work on all Kodi versions.
Reply
#2
Doesn't work on Jarvis (android)

Code:
ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <type 'exceptions.ImportError'>
Error Contents: No module named requests
Traceback (most recent call last):
File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/plugin.audio.headphones_manager/addon.py", line 3, in <module>
import requests
ImportError: No module named requests
-->End of Python script error report<--

script.module.requests is installed
Reply
#3
Should be fixed now.
Reply
#4
(2016-03-07, 19:54)Paranoidjack Wrote: Doesn't work on Jarvis (android)

Code:
ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <type 'exceptions.ImportError'>
Error Contents: No module named requests
Traceback (most recent call last):
File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/plugin.audio.headphones_manager/addon.py", line 3, in <module>
import requests
ImportError: No module named requests
-->End of Python script error report<--

script.module.requests is installed

Please let me know if it is working now. Thanks
Reply
#5
Yes, it's working - thanks for the fix.
Reply
#6
(2016-02-25, 11:01)pwriesnik Wrote: I wrote a small addon that gives the ability to add/resume artists on a headphones server.
Could you please explain a bit more what this "Manager" actually does?

Is adding artists something that cannot be done in the Headphones web interface?
Why is there a need for Resume?
Reply
#7
(2016-06-17, 10:13)oyvindo Wrote:
(2016-02-25, 11:01)pwriesnik Wrote: I wrote a small addon that gives the ability to add/resume artists on a headphones server.
Could you please explain a bit more what this "Manager" actually does?

Is adding artists something that cannot be done in the Headphones web interface?
Why is there a need for Resume?

You could see it as a remote for the headphones server. It uses headphones API to control it. It doesn't add any new functionality that HP doesn't already have. And, regarding your second question, there is no "need" for resume, it's just that it is the same headphones command for adding artists as it is for resuming. Therefore, it just does different things, depending on whether the artist is already in the DB or not.
Reply
#8
gonna give this a try today, cheers
Reply
#9
Anyway to make this work with libreelec? Works great when connecting from ubuntu or windows but fails to connect from libreelec.
Reply
#10
It should not matter what OS you're using, you just need a running headphones webinterface. If you say it fails to connect, what do you mean by that? Can you post your kodi debug log?
Reply
#11
17:28:58 T:140159857182464 DEBUG: CPythonInvoker(23, /storage/.kodi/addons/plugin.audio.headphones_manager-master/addon.py): the source file to load is "/storage/.kodi/addons/plugin.audio.headphones_manager-master/addon.py"
17:28:58 T:140159857182464 DEBUG: CPythonInvoker(23, /storage/.kodi/addons/plugin.audio.headphones_manager-master/addon.py): setting the Python path to /storage/.kodi/addons/plugin.audio.headphones_manager-master:/usr/lib/python27.zip:/usr/lib/python2.7:/usr/lib/python2.7/plat-linux2:/usr/lib/python2.7/lib-tk:/usr/lib/python2.7/lib-old:/usr/lib/python2.7/lib-dynload:/usr/lib/python2.7/site-packages:/usr/lib/python2.7/site-packages/gtk-2.0
17:28:58 T:140159857182464 DEBUG: CPythonInvoker(23, /storage/.kodi/addons/plugin.audio.headphones_manager-master/addon.py): entering source directory /storage/.kodi/addons/plugin.audio.headphones_manager-master
17:28:58 T:140159857182464 DEBUG: CPythonInvoker(23, /storage/.kodi/addons/plugin.audio.headphones_manager-master/addon.py): instantiating addon using automatically obtained id of "plugin.audio.headphones_manager" dependent on version 2.1.0 of the xbmc.python api
17:28:58 T:140159857182464 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <type 'exceptions.ImportError'>
Error Contents: No module named requests
Traceback (most recent call last):
File "/storage/.kodi/addons/plugin.audio.headphones_manager-master/addon.py", line 3, in <module>
import requests
ImportError: No module named requests
-->End of Python script error report<--
17:28:58 T:140159857182464 INFO: Python script stopped
17:28:58 T:140159857182464 DEBUG: Thread LanguageInvoker 140159857182464 terminating
17:28:58 T:140160904693824 DEBUG: ------ Window Init (DialogKaiToast.xml) ------
17:28:58 T:140160904693824 DEBUG: LIRC: Update - NEW at 64760:160 0 KEY_OK_UP devinput (KEY_OK_UP)
17:29:03 T:140160904693824 DEBUG: LIRC: Update - NEW at 69743:ae 0 KEY_EXIT devinput (KEY_EXIT)
17:29:03 T:140160904693824 DEBUG: OnKey: menu (0xd8) pressed, action is Back
17:29:03 T:140160904693824 DEBUG: CGUIWindowManager:TonguereviousWindow: Deactivate
17:29:03 T:140160904693824 DEBUG: ------ Window Deinit (MyPrograms.xml) ------
17:29:03 T:140160904693824 DEBUG: CGUIWindowManager:TonguereviousWindow: Activate new
17:29:03 T:140160904693824 DEBUG: ------ Window Init (Home.xml) ------
17:29:03 T:140160904693824 ERROR: ExecuteAsync - Not executing non-existing script script.favourites
17:29:03 T:140159857182464 DEBUG: Thread LanguageInvoker start, auto delete: false
17:29:03 T:140159857182464 INFO: initializing python engine.
17:29:03 T:140159857182464 DEBUG: CPythonInvoker(24, /storage/.kodi/addons/script.skinshortcuts/default.py): start processing
17:29:03 T:140160904693824 DEBUG: LIRC: Update - NEW at 70126:ae 0 KEY_EXIT_UP devinput (KEY_EXIT_UP)
17:29:03 T:140159857182464 DEBUG: -->Python Interpreter Initialized<--
17:29:03 T:140159857182464 DEBUG: CPythonInvoker(24, /storage/.kodi/addons/script.skinshortcuts/default.py): the source file to load is "/storage/.kodi/addons/script.skinshortcuts/default.py"
17:29:03 T:140159857182464 DEBUG: CPythonInvoker(24, /storage/.kodi/addons/script.skinshortcuts/default.py): setting the Python path to /storage/.kodi/addons/script.skinshortcuts:/storage/.kodi/addons/script.module.simplejson/lib:/storage/.kodi/addons/script.module.unidecode/lib:/usr/lib/python27.zip:/usr/lib/python2.7:/usr/lib/python2.7/plat-linux2:/usr/lib/python2.7/lib-tk:/usr/lib/python2.7/lib-old:/usr/lib/python2.7/lib-dynload:/usr/lib/python2.7/site-packages:/usr/lib/python2.7/site-packages/gtk-2.0
17:29:03 T:140159857182464 DEBUG: CPythonInvoker(24, /storage/.kodi/addons/script.skinshortcuts/default.py): entering source directory /storage/.kodi/addons/script.skinshortcuts
17:29:03 T:140159857182464 DEBUG: CPythonInvoker(24, /storage/.kodi/addons/script.skinshortcuts/default.py): instantiating addon using automatically obtained id of "script.skinshortcuts" dependent on version 2.20.0 of the xbmc.python api
17:29:03 T:140159857182464 INFO: CPythonInvoker(24, /storage/.kodi/addons/script.skinshortcuts/default.py): script successfully run
17:29:03 T:140160904693824 DEBUG: ------ Window Deinit (DialogKaiToast.xml) ------
17:29:04 T:140159857182464 INFO: Python script stopped
17:29:04 T:140159857182464 DEBUG: Thread LanguageInvoker 140159857182464 terminating
17:29:07 T:140159175374592 DEBUG: plugin.dbmc: NotifySyncServer exception : timeout('timed out',)
17:29:25 T:140160024938240 DEBUG: Previous line repeats 1 times.
17:29:25 T:140160024938240 DEBUG: Thread JobWorker 140160024938240 terminating (autodelete)
17:29:25 T:140159266780928 DEBUG: Thread JobWorker 140159266780928 terminating (autodelete)
17:29:25 T:140159697786624 DEBUG: Thread JobWorker 140159697786624 terminating (autodelete)
17:29:27 T:140159175374592 DEBUG: plugin.dbmc: NotifySyncServer exception : timeout('timed out',)

My settings are: IP:192.168.1.115 Port:8084 API:XXXXXXXX
Reply
#12
Is the requests module installed?
Reply
#13
Yeah version 2.9.1
Reply
#14
I'll look into it.
Reply
#15
cheers i double checked the api key, which appears correct, i`ve tried the ip address as 127.0.0.1 and 192.168.1.115 and can confirm it work fine when being accessed from ubuntu running kodi
Reply

Logout Mark Read Team Forum Stats Members Help
Headphones Manager0