From 09ffd91845c7b1637a06cdf410ad577a78eda379 Mon Sep 17 00:00:00 2001 From: Thomas Adamcik Date: Wed, 5 May 2010 22:56:52 +0200 Subject: [PATCH] Fix playlistinfo handling to match mpd behaviour --- mopidy/mpd/frontend.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/mopidy/mpd/frontend.py b/mopidy/mpd/frontend.py index d7064370..64cbb61e 100644 --- a/mopidy/mpd/frontend.py +++ b/mopidy/mpd/frontend.py @@ -429,11 +429,14 @@ class MpdFrontend(object): argument is given, displays information only for the song ``SONGPOS`` or the range of songs ``START:END``. - *ncmpc:* + *ncmpc and mpc:* - uses negative indexes, like ``playlistinfo "-1"``, to request - information on the last track in the playlist. + the entire playlist """ + if songpos == "-1": + songpos = None + if songpos is not None: songpos = int(songpos) start = songpos