Debug 2210211742:

When mixing songs they now are mixing in playLIST window
Updating deletion window when deleting song from pl
This commit is contained in:
BarsTiger
2021-10-22 17:43:47 +03:00
parent 1a9c3bfcc5
commit d76f7fadb2

View File

@@ -915,9 +915,9 @@ def getplaylist():
newindex = 0
playlist = readpl(ui.playlistsComboBox.currentText())
ui.songList.clear()
for item in list(playlist):
ui.songList.append(str(playlist[item]['author'] + " - " + playlist[item]['name']))
listplaylist = list(playlist)
for item in listplaylist:
ui.songList.append(str(playlist[item]['author'] + " - " + playlist[item]['name']))
def playallpl(index=0):
global listplaylist
@@ -982,13 +982,16 @@ def delSongFromPl():
json.dump(playlist, playlistfile, indent=3, ensure_ascii=False)
playlistfile.close()
generateDeletionList()
getplaylist()
def mixPlaylist():
global listplaylist
try:
random.shuffle(listplaylist)
print("Mixed!")
ui.songList.clear()
for item in listplaylist:
ui.songList.append(str(playlist[item]['author'] + " - " + playlist[item]['name']))
except:
pass