From dffcd76c14c3bfb8cb8bbd05e249f92086bba29c Mon Sep 17 00:00:00 2001 From: Kepoor Hampond Date: Thu, 30 Nov 2017 08:37:49 -0800 Subject: [PATCH] sdf df --- irs/utils.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/irs/utils.py b/irs/utils.py index 1cb7a1f..f7d90ca 100644 --- a/irs/utils.py +++ b/irs/utils.py @@ -415,7 +415,7 @@ class FancyPrinting: )) elif self.media.type == "album": self.media_drafts.append(self.draft.log( - + )) def loader_interval(self): @@ -427,7 +427,11 @@ class FancyPrinting: def format_song(self, s, step, finished=False): # s = song name/song data if type(s) is list: - if sum(s, key=len) # Make sure this works + if sum(len(no_colors(s_)) for s_ in s) >= int(COLS * 0.6): + allowed_length = int((COLS * 0.6) / len(s)) + for i, s_ in enumerate(s): + # TODO: replace total contents without color with ones with color and `...` + spaces = " " * (20 - len(s)) if finished: