install.rst 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. Installation
  2. =============
  3. Installing larigira is quite simple. You can install latest version from PyPI
  4. using ``pip install larigira``. Or you can ``git clone
  5. https://github.com/boyska/larigira.git`` and run ``python setup.py install``.
  6. As always, the usage of a virtualenv is recommended.
  7. The only supported python version is 3.4.
  8. Configuration
  9. ---------------
  10. larigira use MPD in a peculiar way. It can use mpd internal library, but it can
  11. also work with "regular" local files, outside of the library. To do so,
  12. however, it requires you to connect to MPD through the UNIX socket instead of
  13. the TCP port.
  14. So how to create this setup?
  15. inside ``~/.mpdconf``, add the following line::
  16. bind_to_address "~/.mpd/socket"
  17. For larigira, you need to set the ``MPD_HOST`` environment variable to
  18. ``$HOME/.mpd/socket``. If you don't do this, you'll find many::
  19. 15:37:10|ERROR[Player:93] Cannot insert song file:///tmp/larigira.1002/audiogen-randomdir-8eoklcee.mp3
  20. Traceback (most recent call last):
  21. File "/home/user/my/ror/larigira/larigira/mpc.py", line 91, in enqueue
  22. mpd_client.addid(uri, insert_pos)
  23. File "/home/user/.virtualenvs/larigira3/lib/python3.5/site-packages/python_mpd2-0.5.5-py3.5.egg/mpd.py", line 629, in decorator
  24. return wrapper(self, name, args, bound_decorator(self, returnValue))
  25. File "/home/user/.virtualenvs/larigira3/lib/python3.5/site-packages/python_mpd2-0.5.5-py3.5.egg/mpd.py", line 254, in _execute
  26. return retval()
  27. File "/home/user/.virtualenvs/larigira3/lib/python3.5/site-packages/python_mpd2-0.5.5-py3.5.egg/mpd.py", line 623, in decorator
  28. return function(self, *args, **kwargs)
  29. File "/home/user/.virtualenvs/larigira3/lib/python3.5/site-packages/python_mpd2-0.5.5-py3.5.egg/mpd.py", line 384, in _fetch_item
  30. pairs = list(self._read_pairs())
  31. File "/home/user/.virtualenvs/larigira3/lib/python3.5/site-packages/python_mpd2-0.5.5-py3.5.egg/mpd.py", line 311, in _read_pairs
  32. pair = self._read_pair(separator)
  33. File "/home/user/.virtualenvs/larigira3/lib/python3.5/site-packages/python_mpd2-0.5.5-py3.5.egg/mpd.py", line 302, in _read_pair
  34. line = self._read_line()
  35. File "/home/user/.virtualenvs/larigira3/lib/python3.5/site-packages/python_mpd2-0.5.5-py3.5.egg/mpd.py", line 291, in _read_line
  36. raise CommandError(error)
  37. mpd.CommandError: [400] {addid} Access denied