Skip to content

Commit

Permalink
Fix bug with invalid playlist type (#232)
Browse files Browse the repository at this point in the history
  • Loading branch information
solaluset authored Jan 22, 2025
1 parent 01bf4d3 commit e3b1809
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions musicbot/song.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,13 @@ def update(self, data: Union[dict, "Song"]):
if thumbnails:
# last thumbnail has the best resolution
data["thumbnail"] = thumbnails[-1]["url"]

from musicbot.settings import SavedPlaylist

if "playlist" in data and not isinstance(
data["playlist"], SavedPlaylist
):
del data["playlist"]
for k, v in data.items():
if hasattr(self, k) and v:
setattr(self, k, v)

0 comments on commit e3b1809

Please sign in to comment.