We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 9cc55ea + e099e21 commit 16887c1Copy full SHA for 16887c1
Music-Player/music_player.py
@@ -53,9 +53,21 @@ def add_to_playlist(filename):
53
playlist.insert(index, filename_path)
54
index += 1
55
56
+def clear_playlist():
57
+ global playlist
58
+ stop_music()
59
+ # Clear the internal playlist list
60
+ playlist.clear()
61
+ # Clear the Listbox GUI element
62
+ playlistbox.delete(0, END)
63
+ statusbar['text'] = "Playlist Cleared"
64
+
65
66
67
menubar.add_cascade(label="File", menu=subMenu)
68
subMenu.add_command(label="Open", command=browse_file)
69
+subMenu.add_command(label="Clear Playlist", command=clear_playlist)
70
+subMenu.add_separator()
71
subMenu.add_command(label="Exit", command=root.destroy)
72
73
0 commit comments