From 52d1b223f83e7fe978434b62d283eb4e45000d40 Mon Sep 17 00:00:00 2001 From: taziden Date: Tue, 25 Oct 2016 18:05:40 +0200 Subject: [PATCH] Don't strip all leading whitespaces Sometimes, a folder can legitimately contain a leading whitespace which you don't want to strip. --- mpd/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mpd/client.py b/mpd/client.py index 396102a..a0ccaf2 100755 --- a/mpd/client.py +++ b/mpd/client.py @@ -139,7 +139,7 @@ def main(queue_length): # Take the last song from current playlist and iterate from it playlist = client.playlist() if len(playlist) > 0: - current_song = playlist[-1].replace("file:", "").strip() + current_song = playlist[-1].replace("file: ", "").rstrip() # If current playlist is empty else: # Add a random song to start with