add telemetry using posthog

+ move build variables into a python file
+ rewrite logic to check if there's an internet connection
+ move IS_BUILD into settings
+ update pyintaller to 6.0.0
+ update other packages to latest
This commit is contained in:
mungai-njoroge
2023-09-25 20:27:20 +03:00
parent 50ebead026
commit ba88cf4a23
12 changed files with 456 additions and 215 deletions
+4 -13
View File
@@ -5,29 +5,20 @@ create the config directory and copy the assets to the app directory.
import os
import shutil
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("runtime.config.ini")
config.read(config_path)
IS_BUILD = config["DEFAULT"]["BUILD"] == "True"
if IS_BUILD:
settings.Keys.LASTFM_API = config["DEFAULT"]["LASTFM_API_KEY"]
class CopyFiles:
"""Copies assets to the app directory."""
"""
Copies assets to the app directory.
"""
def __init__(self) -> None:
assets_dir = "assets"
if IS_BUILD:
if settings.IS_BUILD:
assets_dir = get_home_res_path("assets")
files = [