write LASTFM_API_KEY to config file

+ remove alive bar
This commit is contained in:
mungai-njoroge
2023-08-31 21:36:34 +03:00
parent 4271a6f4a0
commit da88bbd9cc
9 changed files with 34 additions and 69 deletions
+4 -2
View File
@@ -5,19 +5,21 @@ create the config directory and copy the assets to the app directory.
import os
import shutil
import sys
from configparser import ConfigParser
from app import settings
from app.utils.filesystem import get_home_res_path
config = ConfigParser()
config_path = get_home_res_path("pyinstaller.config.ini")
config_path = get_home_res_path("runtime.config.ini")
config.read(config_path)
try:
IS_BUILD = config["DEFAULT"]["BUILD"] == "True"
settings.Keys.LASTFM_API = config["DEFAULT"]["LASTFM_API_KEY"]
except KeyError:
# If the key doesn't exist, it means that the app is being executed in dev mode.
# If the key doesn't exist, the app is in dev mode.
IS_BUILD = False