use setters to manipulate artist and playlist objects

This commit is contained in:
geoffrey45
2023-03-26 18:57:25 +03:00
parent 5487dad27b
commit fe6c12d856
6 changed files with 33 additions and 23 deletions
+11
View File
@@ -40,3 +40,14 @@ class Playlist:
else:
self.image = "None"
self.thumb = "None"
def set_duration(self, duration: int):
self.duration = duration
def clear_lists(self):
"""
Removes data from lists to make it lighter for sending
over the API.
"""
self.trackhashes = []
self.artisthashes = []