Merge branch 'develop' into feature/multi-backend

This commit is contained in:
Stein Magnus Jodal 2010-11-23 01:15:15 +01:00
commit 360cf4d036
11 changed files with 124 additions and 31 deletions

View File

@ -1,3 +1,5 @@
.. _backend-concepts:
**********************************************
The backend, controller, and provider concepts
**********************************************

View File

@ -32,7 +32,7 @@ seek.
Mixer controller
================
Manages volume. See :class:`mopidy.mixers.BaseMixer`.
Manages volume. See :class:`mopidy.mixers.base.BaseMixer`.
Current playlist controller

View File

@ -24,10 +24,10 @@ enable one of the hardware device mixers, you must the set
:attr:`mopidy.settings.MIXER` setting to point to one of the classes found
below, and possibly add some extra settings required by the mixer you choose.
All mixers should subclass :class:`mopidy.mixers.BaseMixer` and override
All mixers should subclass :class:`mopidy.mixers.base.BaseMixer` and override
methods as described below.
.. automodule:: mopidy.mixers
.. automodule:: mopidy.mixers.base
:synopsis: Mixer API
:members:
:undoc-members:

View File

@ -10,13 +10,20 @@ Contributors to Mopidy in the order of appearance:
- Kristian Klette <klette@klette.us>
Donations
=========
Showing your appreciation
=========================
If you already enjoy Mopidy, or don't enjoy it and want to help us making
Mopidy better, you can `donate money <http://pledgie.com/campaigns/12647>`_ to
Mopidy's development.
Mopidy better, the best way to do so is to contribute back to the community.
You can contribute code, documentation, tests, bug reports, or help other
users, spreading the word, etc.
If you want to show your appreciation in a less time consuming way, you can
`flattr us <https://flattr.com/thing/82288/Mopidy>`_, or `donate money
<http://pledgie.com/campaigns/12647>`_ to Mopidy's development.
We promise that any money donated -- to Pledgie, not Flattr, due to the size of
the amounts -- will be used to cover costs related to Mopidy development, like
service subscriptions (Spotify, Last.fm, etc.) and hardware devices like an
used iPod Touch for testing Mopidy with MPod.
Any donated money will be used to cover service subscriptions (e.g. Spotify
and Last.fm) and hardware devices (e.g. an used iPod Touch for testing Mopidy
with MPod) needed for developing Mopidy.

View File

@ -10,12 +10,74 @@ This change log is used to track all major changes to Mopidy.
No description yet.
**Important changes**
- If you use the Spotify backend, you need to upgrade to libspotify 0.0.6 and
the latest pyspotify from the Mopidy developers. Follow the instructions at
:ref:`/installation/libspotify/`.
**Changes**
- Install ``mopidy.desktop`` file that makes Mopidy available from e.g. Gnome
application menus.
- Add :command:`mopidy-scan` command to generate ``tag_cache`` files without
any help from the original MPD server.
- Settings:
- Automatically expand ``~`` to the user's home directory and make the path
absolute for settings with names ending in ``_PATH`` or ``_FILE``.
- Rename the following settings. The settings validator will warn you if you
need to change your local settings.
- ``LOCAL_MUSIC_FOLDER`` to :attr:`mopidy.settings.LOCAL_MUSIC_PATH`
- ``LOCAL_PLAYLIST_FOLDER`` to
:attr:`mopidy.settings.LOCAL_PLAYLIST_PATH`
- ``LOCAL_TAG_CACHE`` to :attr:`mopidy.settings.LOCAL_TAG_CACHE_FILE`
- ``SPOTIFY_LIB_CACHE`` to :attr:`mopidy.settings.SPOTIFY_CACHE_PATH`
- Packaging and distribution:
- Install ``mopidy.desktop`` file that makes Mopidy available from e.g. Gnome
application menus.
- Create infrastructure for creating Debian packages of Mopidy.
- Spotify backend:
- Support high bitrate (320k). See
:attr:`mopidy.settings.SPOTIFY_HIGH_BITRATE` for details.
- Local backend:
- Add :command:`mopidy-scan` command to generate ``tag_cache`` files without
any help from the original MPD server.
- Support UTF-8 encoded tag caches with non-ASCII characters.
- Models:
- Rename and generalize ``Playlist._with(**kwargs)`` to
:meth:`mopidy.models.ImmutableObject.copy`.
- Add ``musicbrainz_id`` field to :class:`mopidy.models.Artist`,
:class:`mopidy.models.Album`, and :class:`mopidy.models.Track`.
- Introduce the :ref:`provider concept <backend-concepts>`. Split the backend
API into a :ref:`backend controller API <backend-controller-api>` (for
frontend use) and a :ref:`backend provider API <backend-provider-api>` (for
backend implementation use), which includes the following changes:
- Rename ``BaseBackend`` to :class:`mopidy.backends.base.Backend`.
- Rename ``BaseCurrentPlaylistController`` to
:class:`mopidy.backends.base.CurrentPlaylistController`.
- Split ``BaseLibraryController`` to
:class:`mopidy.backends.base.LibraryController` and
:class:`mopidy.backends.base.BaseLibraryProvider`.
- Split ``BasePlaybackController`` to
:class:`mopidy.backends.base.PlaybackController` and
:class:`mopidy.backends.base.BasePlaybackProvider`.
- Split ``BaseStoredPlaylistsController`` to
:class:`mopidy.backends.base.StoredPlaylistsController` and
:class:`mopidy.backends.base.BaseStoredPlaylistsProvider`.
- Other API and package structure cleaning:
- Move ``BaseMixer`` to :class:`mopidy.mixers.base.BaseMixer`.
- Add docs for the current non-stable output API,
:class:`mopidy.outputs.base.BaseOutput`.
0.2.0 (2010-10-24)

View File

@ -27,11 +27,11 @@ Possible targets for the next version
- Write-support for Spotify, i.e. playlist management.
- Virtual directories with e.g. starred tracks from Spotify.
- Support for 320 kbps audio.
- **[WIP: possibly v0.3]** Support for 320 kbps audio.
- Local backend:
- Better library support.
- Better music library support.
- **[DONE: v0.3]** A script for creating a tag cache.
- An alternative to tag cache for caching metadata, i.e. Sqlite.
@ -43,7 +43,7 @@ Stuff we want to do, but not right now, and maybe never
- Packaging and distribution:
- **[PENDING]** Create `Homebrew <http://mxcl.github.com/homebrew/>`_
- **[BLOCKED]** Create `Homebrew <http://mxcl.github.com/homebrew/>`_
recipies for all our dependencies and Mopidy itself to make OS X
installation a breeze. See `Homebrew's issue #1612
<http://github.com/mxcl/homebrew/issues/issue/1612>`_.
@ -68,8 +68,9 @@ Stuff we want to do, but not right now, and maybe never
- Publish the server's presence to the network using `Zeroconf
<http://en.wikipedia.org/wiki/Zeroconf>`_/Avahi.
- **[WIP: feature/mpris-frontend]** D-Bus/`MPRIS <http://www.mpris.org/>`_
- REST/JSON web service with a jQuery client as example application. Maybe
based upon `Tornado <http://github.com/facebook/tornado>`_ and `jQuery
- **[WIP: feature/http-frontend]** REST/JSON web service with a jQuery client
as example application. Maybe based upon `Tornado
<http://github.com/facebook/tornado>`_ and `jQuery
Mobile <http://jquerymobile.com/>`_.
- DNLA/UPnP so Mopidy can be controlled from i.e. TVs.
- `XMMS2 <http://www.xmms2.org/>`_

View File

@ -5,7 +5,7 @@ libspotify installation
Mopidy uses `libspotify
<http://developer.spotify.com/en/libspotify/overview/>`_ for playing music from
the Spotify music service. To use :mod:`mopidy.backends.libspotify` you must
install libspotify and `pyspotify <http://github.com/winjer/pyspotify>`_.
install libspotify and `pyspotify <http://github.com/mopidy/pyspotify>`_.
.. warning::
@ -22,14 +22,14 @@ install libspotify and `pyspotify <http://github.com/winjer/pyspotify>`_.
Installing libspotify on Linux
==============================
Download and install libspotify 0.0.4 for your OS and CPU architecture from
Download and install libspotify 0.0.6 for your OS and CPU architecture from
https://developer.spotify.com/en/libspotify/.
For 64-bit Linux the process is as follows::
wget http://developer.spotify.com/download/libspotify/libspotify-0.0.4-linux6-x86_64.tar.gz
tar zxfv libspotify-0.0.4-linux6-x86_64.tar.gz
cd libspotify-0.0.4-linux6-x86_64/
wget http://developer.spotify.com/download/libspotify/libspotify-0.0.6-linux6-x86_64.tar.gz
tar zxfv libspotify-0.0.6-linux6-x86_64.tar.gz
cd libspotify-0.0.6-linux6-x86_64/
sudo make install prefix=/usr/local
sudo ldconfig
@ -46,6 +46,11 @@ libspotify::
brew install libspotify
To update your existing libspotify installation using Homebrew::
brew update
brew install `brew outdated`
When libspotify has been installed, continue with
:ref:`pyspotify_installation`.
@ -69,7 +74,8 @@ In OS X no additional dependencies are needed.
Check out the pyspotify code, and install it::
git clone git://github.com/jodal/pyspotify.git
wget --no-check-certificate -O pyspotify.tar.gz https://github.com/mopidy/pyspotify/tarball/mopidy
tar zxfv pyspotify.tar.gz
cd pyspotify/pyspotify/
sudo rm -rf build/ # If you are upgrading pyspotify
sudo python setup.py install

View File

@ -1,6 +1,6 @@
******************************
:mod:`mopidy.frontends.lastfm`
******************************
***************************************************
:mod:`mopidy.frontends.lastfm` -- Last.fm Scrobbler
***************************************************
.. automodule:: mopidy.frontends.lastfm
:synopsis: Last.fm scrobbler frontend

View File

@ -1,6 +1,6 @@
***************************
:mod:`mopidy.frontends.mpd`
***************************
*****************************************
:mod:`mopidy.frontends.mpd` -- MPD server
*****************************************
.. automodule:: mopidy.frontends.mpd
:synopsis: MPD frontend

View File

@ -35,6 +35,12 @@ class LibspotifySessionManager(SpotifySessionManager, BaseThread):
"""Callback used by pyspotify"""
logger.info(u'Connected to Spotify')
self.session = session
if settings.SPOTIFY_HIGH_BITRATE:
logger.debug(u'Prefer high bitrate')
self.session.set_preferred_bitrate(1)
else:
logger.debug(u'Prefer normal bitrate')
self.session.set_preferred_bitrate(0)
self.connected.set()
def logged_out(self, session):

View File

@ -183,3 +183,12 @@ SPOTIFY_USERNAME = u''
#:
#: Used by :mod:`mopidy.backends.libspotify`.
SPOTIFY_PASSWORD = u''
#: Do you prefer high bitrate (320k)?
#:
#: Used by :mod:`mopidy.backends.libspotify`.
#
#: Default::
#:
#: SPOTIFY_HIGH_BITRATE = False # 160k
SPOTIFY_HIGH_BITRATE = False