Skip to content

Commit

Permalink
Release v1.0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
jodal committed May 19, 2015
2 parents da9b0a1 + b0a7761 commit 2ae56ed
Show file tree
Hide file tree
Showing 9 changed files with 102 additions and 217 deletions.
12 changes: 12 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,18 @@ Changelog
This changelog is used to track all major changes to Mopidy.


v1.0.5 (2015-05-19)
===================

Bug fix release.

- Core: Add workaround for playlist providers that do not support
creating playlists. (Fixes: :issue:`1162`, PR :issue:`1165`)

- M3U: Fix encoding error when saving playlists with non-ASCII track
titles. (Fixes: :issue:`1175`, PR :issue:`1176`)


v1.0.4 (2015-04-30)
===================

Expand Down
201 changes: 10 additions & 191 deletions docs/clients/mpd.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,38 +12,8 @@ http://mpd.wikia.com/wiki/Clients.
:local:


Test procedure
==============

In some cases, we've used the following test procedure to compare the feature
completeness of clients:

#. Connect to Mopidy
#. Search for "foo", with search type "any" if it can be selected
#. Add "The Pretender" from the search results to the current playlist
#. Start playback
#. Pause and resume playback
#. Adjust volume
#. Find a playlist and append it to the current playlist
#. Skip to next track
#. Skip to previous track
#. Select the last track from the current playlist
#. Turn on repeat mode
#. Seek to 10 seconds or so before the end of the track
#. Wait for the end of the track and confirm that playback continues at the
start of the playlist
#. Turn off repeat mode
#. Turn on random mode
#. Skip to next track and confirm that it random mode works
#. Turn off random mode
#. Stop playback
#. Check if the app got support for single mode and consume mode
#. Kill Mopidy and confirm that the app handles it without crashing



Console clients
===============
MPD console clients
===================

ncmpcpp
-------
Expand Down Expand Up @@ -83,8 +53,8 @@ A command line client. Version 0.16 and upwards seems to work nicely with
Mopidy.


Graphical clients
=================
MPD graphical clients
=====================

GMPC
----
Expand Down Expand Up @@ -132,151 +102,30 @@ client for OS X. It is unmaintained, but generally works well with Mopidy.

.. _android_mpd_clients:

Android clients
===============

We've tested all five MPD clients we could find for Android with Mopidy 0.8.1
on a Samsung Galaxy Nexus with Android 4.1.2, using our standard test
procedure.

MPD Android clients
===================

MPDroid
-------

Test date:
2012-11-06
Tested version:
1.03.1 (released 2012-10-16)

.. image:: mpd-client-mpdroid.jpg
:width: 288
:height: 512

You can get `MPDroid from Google Play
<https://play.google.com/store/apps/details?id=com.namelessdev.mpdroid>`_.

- MPDroid started out as a fork of PMix, and is now much better.

- MPDroid's user interface looks nice.

- Everything in the test procedure works.

- In contrast to all other Android clients, MPDroid does support single mode or
consume mode.

- When Mopidy is killed, MPDroid handles it gracefully and asks if you want to
try to reconnect.

MPDroid is a good MPD client, and really the only one we can recommend.


BitMPC
------

Test date:
2012-11-06
Tested version:
1.0.0 (released 2010-04-12)

You can get `BitMPC from Google Play
<https://play.google.com/store/apps/details?id=bitendian.bitmpc>`_.

- The user interface lacks some finishing touches. E.g. you can't enter a
hostname for the server. Only IPv4 addresses are allowed.

- When we last tested the same version of BitMPC using Android 2.1:

- All features exercised in the test procedure worked.

- BitMPC lacked support for single mode and consume mode.

- BitMPC crashed if Mopidy was killed or crashed.

- When we tried to test using Android 4.1.1, BitMPC started and connected to
Mopidy without problems, but the app crashed as soon as we fired off our
search, and continued to crash on startup after that.

In conclusion, BitMPC is usable if you got an older Android phone and don't
care about looks. For newer Android versions, BitMPC will probably not work as
it hasn't been maintained for 2.5 years.


Droid MPD Client
----------------

Test date:
2012-11-06
Tested version:
1.4.0 (released 2011-12-20)

You can get `Droid MPD Client from Google Play
<https://play.google.com/store/apps/details?id=com.soreha.droidmpdclient>`_.

- No intutive way to ask the app to connect to the server after adding the
server hostname to the settings.

- To find the search functionality, you have to select the menu,
then "Playlist manager", then the search tab. I do not understand why search
is hidden inside "Playlist manager".

- The tabs "Artists" and "Albums" did not contain anything, and did not cause
any requests.

- The tab "Folders" showed a spinner and said "Updating data..." but did not
send any requests.

- Searching for "foo" did nothing. No request was sent to the server.

- Droid MPD client does not support single mode or consume mode.

- Not able to complete the test procedure, due to the above problems.

In conclusion, not a client we can recommend.


PMix
----

Test date:
2012-11-06
Tested version:
0.4.0 (released 2010-03-06)

You can get `PMix from Google Play
<https://play.google.com/store/apps/details?id=org.pmix.ui>`_.

PMix haven't been updated for 2.5 years, and has less working features than
it's fork MPDroid. Ignore PMix and use MPDroid instead.


MPD Remote
----------

Test date:
2012-11-06
Tested version:
1.0 (released 2012-05-01)

You can get `MPD Remote from Google Play
<https://play.google.com/store/apps/details?id=fr.mildlyusefulsoftware.mpdremote>`_.

This app looks terrible in the screen shots, got just 100+ downloads, and got a
terrible rating. I honestly didn't take the time to test it.


.. _ios_mpd_clients:

iOS clients
===========
MPD iOS clients
===============

MPoD
----

Test date:
2012-11-06
Tested version:
1.7.1

.. image:: mpd-client-mpod.jpg
:width: 320
:height: 480
Expand All @@ -285,26 +134,10 @@ The `MPoD <http://www.katoemba.net/makesnosenseatall/mpod/>`_ iPhone/iPod Touch
app can be installed from `MPoD at iTunes Store
<https://itunes.apple.com/us/app/mpod/id285063020>`_.

- The user interface looks nice.

- All features exercised in the test procedure worked with MPaD, except seek,
which I didn't figure out to do.

- Search only works in the "Browse" tab, and not under in the "Artist",
"Album", or "Song" tabs. For the tabs where search doesn't work, no queries
are sent to Mopidy when searching.

- Single mode and consume mode is supported.


MPaD
----

Test date:
2012-11-06
Tested version:
1.7.1

.. image:: mpd-client-mpad.jpg
:width: 480
:height: 360
Expand All @@ -313,25 +146,11 @@ The `MPaD <http://www.katoemba.net/makesnosenseatall/mpad/>`_ iPad app can be
purchased from `MPaD at iTunes Store
<https://itunes.apple.com/us/app/mpad/id423097706>`_

- The user interface looks nice, though I would like to be able to view the
current playlist in the large part of the split view.

- All features exercised in the test procedure worked with MPaD.

- Search only works in the "Browse" tab, and not under in the "Artist",
"Album", or "Song" tabs. For the tabs where search doesn't work, no queries
are sent to Mopidy when searching.

- Single mode and consume mode is supported.

- The server menu can be very slow top open, and there is no visible feedback
when waiting for the connection to a server to succeed.


.. _mpd-web-clients:

Web clients
===========
MPD web clients
===============

The following web clients use the MPD protocol to communicate with Mopidy. For
other web clients, see :ref:`http-clients`.
Expand Down
2 changes: 1 addition & 1 deletion mopidy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@
warnings.filterwarnings('ignore', 'could not open display')


__version__ = '1.0.4'
__version__ = '1.0.5'
18 changes: 12 additions & 6 deletions mopidy/core/playlists.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,13 +118,19 @@ def create(self, name, uri_scheme=None):
:rtype: :class:`mopidy.models.Playlist`
"""
if uri_scheme in self.backends.with_playlists:
backend = self.backends.with_playlists[uri_scheme]
backends = [self.backends.with_playlists[uri_scheme]]
else:
# TODO: this fallback looks suspicious
backend = list(self.backends.with_playlists.values())[0]
playlist = backend.playlists.create(name).get()
listener.CoreListener.send('playlist_changed', playlist=playlist)
return playlist
backends = self.backends.with_playlists.values()
for backend in backends:
try:
playlist = backend.playlists.create(name).get()
except Exception:
playlist = None
# Workaround for playlist providers that return None from create()
if not playlist:
continue
listener.CoreListener.send('playlist_changed', playlist=playlist)
return playlist

def delete(self, uri):
"""
Expand Down
16 changes: 1 addition & 15 deletions mopidy/m3u/playlists.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,6 @@ def save(self, playlist):
self._playlists[playlist.uri] = playlist
return playlist

def _write_m3u_extinf(self, file_handle, track):
title = track.name.encode('latin-1', 'replace')
runtime = track.length // 1000 if track.length else -1
file_handle.write('#EXTINF:' + str(runtime) + ',' + title + '\n')

def _sanitize_m3u_name(self, name, encoding=sys.getfilesystemencoding()):
name = self._invalid_filename_chars.sub('|', name.strip())
# make sure we end up with a valid path segment
Expand All @@ -113,15 +108,6 @@ def _save_m3u(self, playlist, encoding=sys.getfilesystemencoding()):
name, _ = os.path.splitext(os.path.basename(path).decode(encoding))
else:
raise ValueError('M3U playlist needs name or URI')
extended = any(track.name for track in playlist.tracks)

with open(path, 'w') as file_handle:
if extended:
file_handle.write('#EXTM3U\n')
for track in playlist.tracks:
if extended and track.name:
self._write_m3u_extinf(file_handle, track)
file_handle.write(track.uri + '\n')

translator.save_m3u(path, playlist.tracks, 'latin1')
# assert playlist name matches file name/uri
return playlist.copy(uri=uri, name=name)
16 changes: 16 additions & 0 deletions mopidy/m3u/translator.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from __future__ import absolute_import, unicode_literals

import codecs
import logging
import os
import re
Expand Down Expand Up @@ -108,3 +109,18 @@ def parse_m3u(file_path, media_dir=None):

track = Track()
return tracks


def save_m3u(filename, tracks, encoding='latin1', errors='replace'):
extended = any(track.name for track in tracks)
# codecs.open() always uses binary mode, just being explicit here
with codecs.open(filename, 'wb', encoding, errors) as m3u:
if extended:
m3u.write('#EXTM3U' + os.linesep)
for track in tracks:
if extended and track.name:
m3u.write('#EXTINF:%d,%s%s' % (
track.length // 1000 if track.length else -1,
track.name,
os.linesep))
m3u.write(track.uri + os.linesep)

0 comments on commit 2ae56ed

Please sign in to comment.