diff --git a/mopidy/frontends/mpd/dispatcher.py b/mopidy/frontends/mpd/dispatcher.py index 0054a6f1..660e1739 100644 --- a/mopidy/frontends/mpd/dispatcher.py +++ b/mopidy/frontends/mpd/dispatcher.py @@ -248,7 +248,7 @@ class MpdContext(object): def create_unique_name(self, playlist_name): name = playlist_name - i = 1 + i = 2 while name in self.playlist_uri_from_name: name = '%s [%d]' % (playlist_name, i) i += 1 diff --git a/tests/frontends/mpd/protocol/stored_playlists_test.py b/tests/frontends/mpd/protocol/stored_playlists_test.py index 1936e4c4..d837b0fa 100644 --- a/tests/frontends/mpd/protocol/stored_playlists_test.py +++ b/tests/frontends/mpd/protocol/stored_playlists_test.py @@ -71,7 +71,7 @@ class PlaylistsHandlerTest(protocol.BaseTestCase): self.sendRequest('listplaylists') self.assertInResponse('playlist: a') - self.assertInResponse('playlist: a [1]') + self.assertInResponse('playlist: a [2]') self.assertInResponse('OK') def test_listplaylists_ignores_playlists_without_name(self):