Merge pull request #1235 from mps-youtube/develop

fix: no color support & suffle all bug fix
Esse commit está contido em:
Talha Asghar
2023-06-14 16:07:59 +05:00
commit de GitHub
2 arquivos alterados com 10 adições e 6 exclusões
+6 -3
Ver Arquivo
@@ -4,12 +4,15 @@ import os
import re
import sys
if sys.stdout.isatty():
white = "\x1b[%sm" % 0
ul = "\x1b[%sm" * 3 % (2, 4, 33)
ul = "\x1b[%sm" * 2 % (2, 4)
if not os.getenv('NO_COLOR'):
ul += "\x1b[%33m"
cols = ["\x1b[%sm" % n for n in range(91, 96)]
red, green, yellow, blue, pink = cols
red, green, yellow, blue, pink = [""]*5 if os.getenv('NO_COLOR') else cols
else:
ul = red = green = yellow = blue = pink = white = ""
+4 -3
Ver Arquivo
@@ -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()