mirror of
https://github.com/Wojtek242/qobuz-dl.git
synced 2024-11-22 11:05:25 +01:00
Merge pull request #210 from TheDen/add-show-config-db-info
add flag to show configuration and db info
This commit is contained in:
commit
b89ba3be3d
@ -150,6 +150,12 @@ def main():
|
|||||||
if arguments.reset:
|
if arguments.reset:
|
||||||
sys.exit(_reset_config(CONFIG_FILE))
|
sys.exit(_reset_config(CONFIG_FILE))
|
||||||
|
|
||||||
|
if arguments.show_config:
|
||||||
|
print(f"Configuation: {CONFIG_FILE}\nDatabase: {QOBUZ_DB}\n---")
|
||||||
|
with open(CONFIG_FILE, "r") as f:
|
||||||
|
print(f.read())
|
||||||
|
sys.exit()
|
||||||
|
|
||||||
if arguments.purge:
|
if arguments.purge:
|
||||||
try:
|
try:
|
||||||
os.remove(QOBUZ_DB)
|
os.remove(QOBUZ_DB)
|
||||||
|
@ -149,6 +149,12 @@ def qobuz_dl_args(
|
|||||||
action="store_true",
|
action="store_true",
|
||||||
help="purge/delete downloaded-IDs database",
|
help="purge/delete downloaded-IDs database",
|
||||||
)
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
"-sc",
|
||||||
|
"--show-config",
|
||||||
|
action="store_true",
|
||||||
|
help="show configuration",
|
||||||
|
)
|
||||||
|
|
||||||
subparsers = parser.add_subparsers(
|
subparsers = parser.add_subparsers(
|
||||||
title="commands",
|
title="commands",
|
||||||
|
Loading…
Reference in New Issue
Block a user