From cbd8ed45f94ce186c83618aeff023fa211bfa055 Mon Sep 17 00:00:00 2001 From: Rafael Vargas Date: Fri, 14 Jan 2022 19:51:24 -0400 Subject: [PATCH] [Fix] - Command remove with -1 as argument --- vulkan/music/Playlist.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vulkan/music/Playlist.py b/vulkan/music/Playlist.py index 8d5c744..a5914f9 100644 --- a/vulkan/music/Playlist.py +++ b/vulkan/music/Playlist.py @@ -175,7 +175,10 @@ class Playlist(IPlaylist): return config.ERROR_MOVING def remove_song(self, position) -> str: - if position not in range(1, len(self.__queue) + 1) and position != -1: + if position == -1: + position = len(self.__queue) + + if position not in range(1, len(self.__queue) + 1): return config.LENGTH_ERROR else: song = self.__queue[position-1]