mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-05 04:53:01 +00:00
use setters to manipulate artist and playlist objects
This commit is contained in:
@@ -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 = []
|
||||
|
||||
Reference in New Issue
Block a user