From 99de85b5c295d673dda1e43bbd7220b8aa4cbddc Mon Sep 17 00:00:00 2001 From: Andrea Mistrali Date: Mon, 22 Feb 2021 14:33:01 +0100 Subject: [PATCH] Only leftmost subpath is replaced --- beetsplug/mpdstats.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/beetsplug/mpdstats.py b/beetsplug/mpdstats.py index 8c32d5867..37093a97a 100644 --- a/beetsplug/mpdstats.py +++ b/beetsplug/mpdstats.py @@ -127,7 +127,7 @@ class MPDClientWrapper(object): entry = self.get('currentsong') if 'file' in entry: if not is_url(entry['file']): - file = entry['file'].replace(self.strip_path, '') + file = entry['file'].replace(self.strip_path, '', count=1) result = os.path.join(self.music_directory, file) else: result = entry['file']