mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-04 20:43:04 +00:00
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:
@@ -2,10 +2,18 @@
|
||||
Contains default configs
|
||||
"""
|
||||
import os
|
||||
import sys
|
||||
from typing import Any
|
||||
|
||||
from app import configs
|
||||
|
||||
join = os.path.join
|
||||
|
||||
if getattr(sys, "frozen", False) and hasattr(sys, "_MEIPASS"):
|
||||
IS_BUILD = True
|
||||
else:
|
||||
IS_BUILD = False
|
||||
|
||||
|
||||
class Release:
|
||||
APP_VERSION = "1.3.0"
|
||||
@@ -224,3 +232,10 @@ class TCOLOR:
|
||||
class Keys:
|
||||
# get last fm api key from os environment
|
||||
LASTFM_API = os.environ.get("LASTFM_API_KEY")
|
||||
POSTHOG_API_KEY = os.environ.get("POSTHOG_API_KEY")
|
||||
|
||||
@classmethod
|
||||
def load(cls):
|
||||
if IS_BUILD:
|
||||
cls.LASTFM_API = configs.LASTFM_API_KEY
|
||||
cls.POSTHOG_API_KEY = configs.POSTHOG_API_KEY
|
||||
|
||||
Reference in New Issue
Block a user