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