Skip to content

Commit

Permalink
fix: shuffle all throwing error "object does not support item assignm…
Browse files Browse the repository at this point in the history
…ent"
  • Loading branch information
iamtalhaasghar committed Mar 22, 2023
1 parent 655acc3 commit 13fb47b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions mps_youtube/commands/songlist.py
Expand Up @@ -213,9 +213,10 @@ def shuffle_playlist():
""" Shuffle entire loaded playlist. """
songs = content.get_last_query()

if songs:
random.shuffle(songs)
paginatesongs(list(songs))
if songs:
temp_songs = list(songs)
random.shuffle(temp_songs)
paginatesongs(temp_songs)
g.message = c.y + "Shuffled entire playlist" + c.w
g.content = content.generate_songlist_display()

Expand Down

0 comments on commit 13fb47b

Please sign in to comment.