Merge branch 'master' of git://github.com/jodal/mopidy

This commit is contained in:
Johannes Knutsen 2010-02-14 01:20:25 +01:00
commit 3ece9c23b9
2 changed files with 18 additions and 1 deletions

View File

@ -24,10 +24,25 @@ modular, so we can extend it with other backends in the future, like file
playback and other online music services such as Last.fm.
Code style
==========
We generally follow the `PEP-8 <http://www.python.org/dev/peps/pep-0008/>`_
style guidelines, with a couple of notable exceptions:
- We only indent continuation lines with an addition four spaces relative to
the previous line.
- An exception to the previous exception: When continuing control flow
statements like ``if``, ``for`` and ``while``, indent the continuation lines
with eight spaces, so that it is indented an additional level compared to the
following block of code.
Running tests
=============
To run tests, you need a couple of dependiencies. Some can be installed through Debian/Ubuntu package management::
To run tests, you need a couple of dependencies. Some can be installed through
Debian/Ubuntu package management::
sudo aptitude install python-coverage

View File

@ -74,6 +74,7 @@ class BaseCurrentPlaylistController(object):
:param id: track ID
:type id: int
:rtype: :class:`mopidy.models.Track`
"""
matches = filter(lambda t: t.id == id, self._playlist.tracks)
if matches:
@ -87,6 +88,7 @@ class BaseCurrentPlaylistController(object):
:param uri: track URI
:type uri: string
:rtype: :class:`mopidy.models.Track`
"""
matches = filter(lambda t: t.uri == uri, self._playlist.tracks)
if matches: