From e13f19efb9191dd66d7f34a67b7a19cde531cd4c Mon Sep 17 00:00:00 2001 From: Rafael Vargas Date: Thu, 30 Dec 2021 20:35:54 -0400 Subject: [PATCH] Song now represents if it has any problems --- vulkanbot/music/Song.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/vulkanbot/music/Song.py b/vulkanbot/music/Song.py index 9ddc478..3fbe61e 100644 --- a/vulkanbot/music/Song.py +++ b/vulkanbot/music/Song.py @@ -11,6 +11,7 @@ class Song(ISong): """Create a song with only the URL to the youtube song""" self.__identifier = identifier self.__info = {} + self.__problematic = False self.__playlist: IPlaylist = playlist def finish_down(self, info: dict) -> None: @@ -54,11 +55,15 @@ class Song(ISong): @property def identifier(self) -> str: return self.__identifier + + @property + def problematic(self) -> bool: + return self.__problematic def destroy(self) -> None: - """Destroy the song from the playlist due to any type of error""" + """Mark this song with problems and removed from the playlist due to any type of error""" + self.__problematic = True self.__playlist.destroy_song(self) - del self def embed(self, title: str) -> Embed: """Configure the embed to show the song information"""