From 13160269992a3cdf81f54ac3a0b2c81c06a9aa16 Mon Sep 17 00:00:00 2001 From: Krateng Date: Thu, 5 Dec 2019 23:23:48 +0100 Subject: [PATCH] Added initial prompt for name --- maloja/controller.py | 7 +++++++ maloja/data_files/settings/default.ini | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/maloja/controller.py b/maloja/controller.py index 37692f0..d3dc571 100755 --- a/maloja/controller.py +++ b/maloja/controller.py @@ -78,6 +78,13 @@ def setup(): pass + if settings.get_settings("NAME") is None: + print("Please enter your name. This will be displayed e.g. when comparing your charts to another user. Leave this empty if you would not like to specify a name right now.") + name = input() + if name == "": name = "Generic Maloja User" + settings.update_settings("settings/settings.ini",{"NAME":name},create_new=True) + + def getInstance(): try: output = subprocess.check_output(["pidof","Maloja"]) diff --git a/maloja/data_files/settings/default.ini b/maloja/data_files/settings/default.ini index 0087509..bd3cdc6 100644 --- a/maloja/data_files/settings/default.ini +++ b/maloja/data_files/settings/default.ini @@ -51,7 +51,7 @@ SCROBBLES_GOLD = 250 SCROBBLES_PLATINUM = 500 SCROBBLES_DIAMOND = 1000 # name for comparisons -NAME = "Generic Maloja User" +NAME = None [Misc]