Permalink
Browse files

Merge branch 'develop' into feature/mpris-frontend

Conflicts:
	data/mopidy.desktop
  • Loading branch information...
2 parents 3210c9d + 65f8acb commit 18854c6f3b605c67d046d56038d7dfda181b60c3 @jodal jodal committed Jan 11, 2011
Showing with 1,964 additions and 1,022 deletions.
  1. +2 −1 MANIFEST.in
  2. +3 −3 README.rst
  3. 0 bin/mopidy
  4. +4 −4 bin/mopidy-scan
  5. +1 −1 data/mopidy.desktop
  6. +78 −52 docs/Makefile
  7. +1 −1 docs/_themes/nature/static/nature.css_t
  8. +30 −0 docs/api/backends/concepts.rst
  9. +65 −0 docs/api/backends/controllers.rst
  10. +0 −90 docs/api/backends/index.rst
  11. +0 −7 docs/api/backends/libspotify.rst
  12. +41 −0 docs/api/backends/providers.rst
  13. +5 −13 docs/api/{frontends/index.rst → frontends.rst}
  14. +0 −7 docs/api/frontends/lastfm.rst
  15. +7 −4 docs/api/index.rst
  16. +13 −66 docs/api/mixers.rst
  17. +3 −3 docs/api/models.rst
  18. +12 −14 docs/api/outputs.rst
  19. +0 −27 docs/api/settings.rst
  20. +14 −7 docs/authors.rst
  21. +103 −5 docs/changes.rst
  22. +3 −3 docs/conf.py
  23. +1 −1 docs/development/contributing.rst
  24. +20 −16 docs/development/roadmap.rst
  25. +1 −0 docs/index.rst
  26. +37 −8 docs/installation/gstreamer.rst
  27. +136 −56 docs/installation/index.rst
  28. +64 −30 docs/installation/libspotify.rst
  29. 0 docs/{api → modules}/backends/dummy.rst
  30. 0 docs/{api → modules}/backends/local.rst
  31. +7 −0 docs/modules/backends/spotify.rst
  32. +7 −0 docs/modules/frontends/lastfm.rst
  33. +3 −3 docs/{api → modules}/frontends/mpd.rst
  34. +8 −0 docs/modules/index.rst
  35. +9 −0 docs/modules/mixers/alsa.rst
  36. +9 −0 docs/modules/mixers/denon.rst
  37. +9 −0 docs/modules/mixers/dummy.rst
  38. +9 −0 docs/modules/mixers/gstreamer_software.rst
  39. +9 −0 docs/modules/mixers/nad.rst
  40. +9 −0 docs/modules/mixers/osa.rst
  41. +9 −0 docs/modules/outputs/gstreamer.rst
  42. +32 −5 docs/settings.rst
  43. +11 −13 mopidy/backends/base/__init__.py
  44. +2 −2 mopidy/backends/base/current_playlist.py
  45. +60 −7 mopidy/backends/base/library.py
  46. +86 −63 mopidy/backends/base/playback.py
  47. +107 −16 mopidy/backends/base/stored_playlists.py
  48. +42 −37 mopidy/backends/dummy/__init__.py
  49. +0 −60 mopidy/backends/libspotify/__init__.py
  50. +50 −35 mopidy/backends/local/__init__.py
  51. +32 −6 mopidy/backends/local/translator.py
  52. +74 −0 mopidy/backends/spotify/__init__.py
  53. +6 −6 mopidy/backends/{libspotify → spotify}/library.py
  54. +10 −10 mopidy/backends/{libspotify → spotify}/playback.py
  55. +33 −19 mopidy/backends/{libspotify → spotify}/session_manager.py
  56. BIN mopidy/backends/{libspotify → spotify}/spotify_appkey.key
  57. +2 −2 mopidy/backends/{libspotify → spotify}/stored_playlists.py
  58. +20 −9 mopidy/backends/{libspotify → spotify}/translator.py
  59. +1 −0 mopidy/core.py
  60. +13 −3 mopidy/frontends/base.py
  61. +23 −29 mopidy/frontends/lastfm.py
  62. +10 −0 mopidy/frontends/mpd/protocol/playback.py
  63. +28 −10 mopidy/frontends/mpd/translator.py
  64. +0 −55 mopidy/mixers/__init__.py
  65. +5 −1 mopidy/mixers/alsa.py
  66. +55 −0 mopidy/mixers/base.py
  67. +6 −5 mopidy/mixers/denon.py
  68. +1 −1 mopidy/mixers/dummy.py
  69. +1 −1 mopidy/mixers/gstreamer_software.py
  70. +1 −1 mopidy/mixers/nad.py
  71. +13 −2 mopidy/mixers/osa.py
  72. +41 −28 mopidy/models.py
  73. +34 −4 mopidy/outputs/base.py
  74. +15 −4 mopidy/scanner.py
  75. +22 −13 mopidy/settings.py
  76. +6 −7 mopidy/utils/path.py
  77. +7 −0 mopidy/utils/settings.py
  78. +0 −1 requirements-lastfm.txt
  79. +11 −0 requirements/README.rst
  80. 0 requirements-docs.txt → requirements/docs.txt
  81. 0 requirements-external-mixers.txt → requirements/external_mixers.txt
  82. +1 −0 requirements/lastfm.txt
  83. 0 requirements-tests.txt → requirements/tests.txt
  84. +1 −1 setup.py
  85. +1 −1 tests/backends/base/current_playlist.py
  86. +1 −1 tests/backends/base/library.py
  87. +9 −9 tests/backends/base/playback.py
  88. +6 −6 tests/backends/base/stored_playlists.py
  89. 0 tests/backends/libspotify/__init__.py
  90. +0 −44 tests/backends/libspotify/backend_integrationtest.py
  91. +2 −3 tests/backends/local/current_playlist_test.py
  92. +4 −4 tests/backends/local/library_test.py
  93. +2 −4 tests/backends/local/playback_test.py
  94. +8 −8 tests/backends/local/stored_playlists_test.py
  95. +35 −1 tests/backends/local/translator_test.py
  96. +16 −0 tests/data/albumartist_tag_cache
  97. +20 −0 tests/data/musicbrainz_tag_cache
  98. +1 −1 tests/data/scanner/advanced/subdir1/subsubdir/song8.mp3
  99. +1 −1 tests/data/scanner/advanced/subdir1/subsubdir/song9.mp3
  100. +13 −0 tests/data/utf8_tag_cache
  101. +4 −4 tests/frontends/mpd/current_playlist_test.py
  102. +12 −0 tests/frontends/mpd/playback_test.py
  103. +3 −3 tests/frontends/mpd/regression_test.py
  104. +47 −32 tests/frontends/mpd/serializer_test.py
  105. +122 −16 tests/models_test.py
  106. +28 −0 tests/scanner_test.py
  107. +0 −6 tests/utils/path_test.py
  108. +35 −0 tests/utils/settings_test.py
View
@@ -1,6 +1,7 @@
-include LICENSE pylintrc *.rst *.txt data/mopidy.desktop
+include LICENSE pylintrc *.rst data/mopidy.desktop
include mopidy/backends/libspotify/spotify_appkey.key
recursive-include docs *
prune docs/_build
+recursive-include requirements *
recursive-include tests *.py
recursive-include tests/data *
View
@@ -13,7 +13,7 @@ To install Mopidy, check out
* `Documentation (latest release) <http://www.mopidy.com/docs/master/>`_
* `Documentation (development version) <http://www.mopidy.com/docs/develop/>`_
-* `Source code <http://github.com/jodal/mopidy>`_
-* `Issue tracker <http://github.com/jodal/mopidy/issues>`_
+* `Source code <http://github.com/mopidy/mopidy>`_
+* `Issue tracker <http://github.com/mopidy/mopidy/issues>`_
* IRC: ``#mopidy`` at `irc.freenode.net <http://freenode.net/>`_
-* `Download development snapshot <http://github.com/jodal/mopidy/tarball/develop#egg=mopidy-dev>`_
+* `Download development snapshot <http://github.com/mopidy/mopidy/tarball/develop#egg=mopidy-dev>`_
View
0 bin/mopidy 100644 → 100755
No changes.
View
@@ -17,15 +17,15 @@ if __name__ == '__main__':
def debug(uri, error):
print >> sys.stderr, 'Failed %s: %s' % (uri, error)
- print >> sys.stderr, 'Scanning %s' % settings.LOCAL_MUSIC_FOLDER
+ print >> sys.stderr, 'Scanning %s' % settings.LOCAL_MUSIC_PATH
- scanner = Scanner(settings.LOCAL_MUSIC_FOLDER, store, debug)
+ scanner = Scanner(settings.LOCAL_MUSIC_PATH, store, debug)
scanner.start()
print >> sys.stderr, 'Done'
for a in tracks_to_tag_cache_format(tracks):
if len(a) == 1:
- print a[0]
+ print (u'%s' % a).encode('utf-8')
else:
- print u': '.join([unicode(b) for b in a]).encode('utf-8')
+ print (u'%s: %s' % a).encode('utf-8')
View
@@ -7,5 +7,5 @@ Icon=audio-x-generic
TryExec=mopidy
Exec=mopidy
Terminal=true
-Categories=AudioVideo;Audio;Player;ConsoleOnly
+Categories=AudioVideo;Audio;Player;ConsoleOnly;
StartupNotify=true
View
@@ -4,101 +4,127 @@
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
-PAPER =
+PAPER =
+BUILDDIR = _build
# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
-ALLSPHINXOPTS = -d _build/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
+ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
-.PHONY: help clean html dirhtml pickle json htmlhelp qthelp latex changes linkcheck doctest
+.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest
help:
@echo "Please use \`make <target>' where <target> is one of"
- @echo " html to make standalone HTML files"
- @echo " dirhtml to make HTML files named index.html in directories"
- @echo " pickle to make pickle files"
- @echo " json to make JSON files"
- @echo " htmlhelp to make HTML files and a HTML help project"
- @echo " qthelp to make HTML files and a qthelp project"
- @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
- @echo " changes to make an overview of all changed/added/deprecated items"
- @echo " linkcheck to check all external links for integrity"
- @echo " doctest to run all doctests embedded in the documentation (if enabled)"
+ @echo " html to make standalone HTML files"
+ @echo " dirhtml to make HTML files named index.html in directories"
+ @echo " singlehtml to make a single large HTML file"
+ @echo " pickle to make pickle files"
+ @echo " json to make JSON files"
+ @echo " htmlhelp to make HTML files and a HTML help project"
+ @echo " qthelp to make HTML files and a qthelp project"
+ @echo " devhelp to make HTML files and a Devhelp project"
+ @echo " epub to make an epub"
+ @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
+ @echo " latexpdf to make LaTeX files and run them through pdflatex"
+ @echo " text to make text files"
+ @echo " man to make manual pages"
+ @echo " changes to make an overview of all changed/added/deprecated items"
+ @echo " linkcheck to check all external links for integrity"
+ @echo " doctest to run all doctests embedded in the documentation (if enabled)"
clean:
- -rm -rf _build/*
+ -rm -rf $(BUILDDIR)/*
html:
- $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) _build/html
+ $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
@echo
- @echo "Build finished. The HTML pages are in _build/html."
+ @echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
dirhtml:
- $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) _build/dirhtml
+ $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
@echo
- @echo "Build finished. The HTML pages are in _build/dirhtml."
+ @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
+
+singlehtml:
+ $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
+ @echo
+ @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
pickle:
- $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) _build/pickle
+ $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
@echo
@echo "Build finished; now you can process the pickle files."
json:
- $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) _build/json
+ $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
@echo
@echo "Build finished; now you can process the JSON files."
htmlhelp:
- $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) _build/htmlhelp
+ $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
@echo
@echo "Build finished; now you can run HTML Help Workshop with the" \
- ".hhp project file in _build/htmlhelp."
+ ".hhp project file in $(BUILDDIR)/htmlhelp."
qthelp:
- $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) _build/qthelp
+ $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
@echo
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
- ".qhcp project file in _build/qthelp, like this:"
- @echo "# qcollectiongenerator _build/qthelp/Mopidy.qhcp"
+ ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
+ @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/Mopidy.qhcp"
+ @echo "To view the help file:"
+ @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/Mopidy.qhc"
+
+devhelp:
+ $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
+ @echo
+ @echo "Build finished."
@echo "To view the help file:"
- @echo "# assistant -collectionFile _build/qthelp/Mopidy.qhc"
+ @echo "# mkdir -p $$HOME/.local/share/devhelp/Mopidy"
+ @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/Mopidy"
+ @echo "# devhelp"
+
+epub:
+ $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
+ @echo
+ @echo "Build finished. The epub file is in $(BUILDDIR)/epub."
latex:
- $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) _build/latex
+ $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
+ @echo
+ @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
+ @echo "Run \`make' in that directory to run these through (pdf)latex" \
+ "(use \`make latexpdf' here to do that automatically)."
+
+latexpdf:
+ $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
+ @echo "Running LaTeX files through pdflatex..."
+ make -C $(BUILDDIR)/latex all-pdf
+ @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
+
+text:
+ $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
+ @echo
+ @echo "Build finished. The text files are in $(BUILDDIR)/text."
+
+man:
+ $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
@echo
- @echo "Build finished; the LaTeX files are in _build/latex."
- @echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
- "run these through (pdf)latex."
+ @echo "Build finished. The manual pages are in $(BUILDDIR)/man."
changes:
- $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) _build/changes
+ $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
@echo
- @echo "The overview file is in _build/changes."
+ @echo "The overview file is in $(BUILDDIR)/changes."
linkcheck:
- $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) _build/linkcheck
+ $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
@echo
@echo "Link check complete; look for any errors in the above output " \
- "or in _build/linkcheck/output.txt."
+ "or in $(BUILDDIR)/linkcheck/output.txt."
doctest:
- $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) _build/doctest
+ $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
@echo "Testing of doctests in the sources finished, look at the " \
- "results in _build/doctest/output.txt."
-
-public: clean dirhtml
- rm -rf /tmp/mopidy-html && cp -r _build/dirhtml /tmp/mopidy-html
- git stash save
- cd .. && \
- git checkout gh-pages && \
- git pull && \
- rm -r * && \
- cp -r /tmp/mopidy-html/* . && \
- mv _sources sources && \
- (find . -type f | xargs sed -i -e 's/_sources/sources/g') && \
- mv _static static && \
- (find . -type f | xargs sed -i -e 's/_static/static/g') && \
- if [ -d _images ]; then mv _images images; fi && \
- (find . -type f | xargs sed -i -e 's/_images/images/g') && \
- git add *
+ "results in $(BUILDDIR)/doctest/output.txt."
@@ -214,7 +214,7 @@ p.admonition-title:after {
pre {
padding: 10px;
- background-color: #fafafa;
+ background-color: #eeeeee;
color: #222222;
line-height: 1.5em;
font-size: 1.1em;
@@ -0,0 +1,30 @@
+.. _backend-concepts:
+
+**********************************************
+The backend, controller, and provider concepts
+**********************************************
+
+Backend:
+ The backend is mostly for convenience. It is a container that holds
+ references to all the controllers.
+Controllers:
+ Each controller has responsibility for a given part of the backend
+ functionality. Most, but not all, controllers delegates some work to one or
+ more providers. The controllers are responsible for choosing the right
+ provider for any given task based upon i.e. the track's URI. See
+ :ref:`backend-controller-api` for more details.
+Providers:
+ Anything specific to i.e. Spotify integration or local storage is contained
+ in the providers. To integrate with new music sources, you just add new
+ providers. See :ref:`backend-provider-api` for more details.
+
+.. digraph:: backend_relations
+
+ Backend -> "Current\nplaylist\ncontroller"
+ Backend -> "Library\ncontroller"
+ "Library\ncontroller" -> "Library\nproviders"
+ Backend -> "Playback\ncontroller"
+ "Playback\ncontroller" -> "Playback\nproviders"
+ Backend -> "Stored\nplaylists\ncontroller"
+ "Stored\nplaylists\ncontroller" -> "Stored\nplaylist\nproviders"
+ Backend -> Mixer
@@ -0,0 +1,65 @@
+.. _backend-controller-api:
+
+**********************
+Backend controller API
+**********************
+
+
+The backend controller API is the interface that is used by frontends like
+:mod:`mopidy.frontends.mpd`. If you want to implement your own backend, see the
+:ref:`backend-provider-api`.
+
+
+The backend
+===========
+
+.. autoclass:: mopidy.backends.base.Backend
+ :members:
+ :undoc-members:
+
+
+Playback controller
+===================
+
+Manages playback, with actions like play, pause, stop, next, previous, and
+seek.
+
+.. autoclass:: mopidy.backends.base.PlaybackController
+ :members:
+ :undoc-members:
+
+
+Mixer controller
+================
+
+Manages volume. See :class:`mopidy.mixers.base.BaseMixer`.
+
+
+Current playlist controller
+===========================
+
+Manages everything related to the currently loaded playlist.
+
+.. autoclass:: mopidy.backends.base.CurrentPlaylistController
+ :members:
+ :undoc-members:
+
+
+Stored playlists controller
+===========================
+
+Manages stored playlist.
+
+.. autoclass:: mopidy.backends.base.StoredPlaylistsController
+ :members:
+ :undoc-members:
+
+
+Library controller
+==================
+
+Manages the music library, e.g. searching for tracks to be added to a playlist.
+
+.. autoclass:: mopidy.backends.base.LibraryController
+ :members:
+ :undoc-members:
Oops, something went wrong.

0 comments on commit 18854c6

Please sign in to comment.