From 55b617e0a19dc946937f535187ad72b2ab64efe6 Mon Sep 17 00:00:00 2001 From: Kepoor Hampond Date: Wed, 29 Nov 2017 08:43:30 -0800 Subject: [PATCH] todo --- irs/utils.py | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/irs/utils.py b/irs/utils.py index 2c03832..6d370fe 100644 --- a/irs/utils.py +++ b/irs/utils.py @@ -393,8 +393,8 @@ class FancyPrinting: if self.media.type == "song": song = self.media.contents[0] - self.title = (BYELLOW + "{0} " + END + YELLOW + "{1} " + DIM + "{2} ") - .format(song["title"], song["artist"], song["album"]) + self.title = (BYELLOW + "{0} " + DIM + "{1} ") + .format(song["artist"], song["album"]) elif self.media.type in ("playlist", "album"): data = self.media["list_data"] self.title = (YELLOW + "Playlist: " + BOLD + "{0} " + DIM + "{2} ") @@ -405,9 +405,19 @@ class FancyPrinting: loader_draft.set_interval(self.loader_interval, 0.05, loader=True) # TODO: Get the logs to start w/ diff content depending on media type - # for song in self.media["contents"]: - # self.media_drafts.append(self.draft.log(song["title"])) + for song in self.media["contents"]: + if self.media.type == "song": + self.media_drafts.append(self.draft.log( + BYELLOW + song["title"] + "\t" + )) + elif self.media.type == "playlist": + self.media_drafts.append(self.draft.log( + )) + elif self.media.type == "album": + self.media_drafts.append(self.draft.log( + + )) def loader_interval(self): if self.frame > len(self.frames) - 2: @@ -416,6 +426,14 @@ class FancyPrinting: return (BCYAN + "{0} " + END + self.title + END + BCYAN + " {0}" + END) .format(self.frames[self.frame]) + # TODO: + # def install_progress(package, step, finished=False): + # spaces = " " * (15 - len(package)) + # if finished: + # return DIM + BBLUE + " > " + BYELLOW + package + spaces + BGREEN + "Installed" + END + # else: + # return BBLUE + " > " + BYELLOW + package + spaces + BLUE + step + END + # =========== # CONFIG FILE