Some updates for using spotdl as library

This commit is contained in:
Ritiek Malhotra
2018-12-29 14:56:00 +05:30
parent 9f09a13063
commit 0d0a85b761
3 changed files with 12 additions and 10 deletions

View File

@@ -2,13 +2,16 @@ import logzero
_log_format = "%(color)s%(levelname)s:%(end_color)s %(message)s"
_formatter = logzero.LogFormatter(fmt=_log_format)
_log_level = 0
# Set up a temporary logger with default log level so that
# it can be used before log level argument is determined
logzero.setup_default_logger(formatter=_formatter)
logzero.setup_default_logger(formatter=_formatter, level=_log_level)
# options
args = None
# Options
# Initialize an empty object which can be assigned attributes
# (useful when using spotdl as a library)
args = type('', (), {})()
# Apple has specific tags - see mutagen docs -
# http://mutagen.readthedocs.io/en/latest/api/mp4.html