You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now, spotDL auto-detects whether it is in a terminal or not and disables some features (like colors or progress bars) based on it, which is inherited from the rich library. This behaviour is not always desirable, and for this reason many programs (e.g. GNU coreutils) give an out in the form of a flag. Currently, it is possible to use the FORCE_COLOR and NO_COLOR environment variables, which rich uses, to override this, but it is not documented and is inconsistent with how the rest of the program is configured (through flags), so it would be nice to have a flag to configure this.
Possible implementation
I think a --color={always, never, auto} flag would the best option, as it is consistent with most other CLI programs. As spotDL uses the rich library with the global console (i.e. get_console()), this can be achieved with the reconfigure() function, particulary, with reconfigure(force_terminal=..., force_interactive=...). I've made a possible implementation, which adds an additional parameter to the init_logging functions, where rich is configured.
PD: Thanks for this amazing program!
The text was updated successfully, but these errors were encountered:
Requested Feature
Right now, spotDL auto-detects whether it is in a terminal or not and disables some features (like colors or progress bars) based on it, which is inherited from the
rich
library. This behaviour is not always desirable, and for this reason many programs (e.g. GNU coreutils) give an out in the form of a flag. Currently, it is possible to use theFORCE_COLOR
andNO_COLOR
environment variables, which rich uses, to override this, but it is not documented and is inconsistent with how the rest of the program is configured (through flags), so it would be nice to have a flag to configure this.Possible implementation
I think a
--color={always, never, auto}
flag would the best option, as it is consistent with most other CLI programs. As spotDL uses the rich library with the global console (i.e.get_console()
), this can be achieved with thereconfigure()
function, particulary, withreconfigure(force_terminal=..., force_interactive=...)
. I've made a possible implementation, which adds an additional parameter to theinit_logging
functions, where rich is configured.PD: Thanks for this amazing program!
The text was updated successfully, but these errors were encountered: