mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-04 12:33:03 +00:00
steal some of @tcsenpai 's changes from the PR
+ ditch the LAST FM API KEY thing + expose the Musixmatch urls + use the kerve last fm api to download similar artist data + use google.it instead of the Google public dns to check internet connectivity (to make it work in all environments) + return og Dockerfile to fix ARM support
This commit is contained in:
+6
-9
@@ -235,26 +235,23 @@ class TCOLOR:
|
||||
|
||||
class Keys:
|
||||
# get last fm api key from os environment
|
||||
LASTFM_API_KEY = os.environ.get("LASTFM_API_KEY")
|
||||
PLUGIN_LYRICS_AUTHORITY = os.environ.get("PLUGIN_LYRICS_AUTHORITY")
|
||||
PLUGIN_LYRICS_ROOT_URL = os.environ.get("PLUGIN_LYRICS_ROOT_URL")
|
||||
PLUGIN_LYRICS_AUTHORITY = os.environ.get("apic-desktop.musixmatch.com")
|
||||
PLUGIN_LYRICS_ROOT_URL = os.environ.get("https://apic-desktop.musixmatch.com/ws/1.1/")
|
||||
SWINGMUSIC_APP_VERSION = os.environ.get("SWINGMUSIC_APP_VERSION")
|
||||
|
||||
@classmethod
|
||||
def load(cls):
|
||||
if IS_BUILD:
|
||||
cls.LASTFM_API_KEY = configs.LASTFM_API_KEY
|
||||
cls.PLUGIN_LYRICS_AUTHORITY = configs.PLUGIN_LYRICS_AUTHORITY
|
||||
cls.PLUGIN_LYRICS_ROOT_URL = configs.PLUGIN_LYRICS_ROOT_URL
|
||||
cls.SWINGMUSIC_APP_VERSION = configs.SWINGMUSIC_APP_VERSION
|
||||
|
||||
cls.verify_keys()
|
||||
|
||||
@classmethod
|
||||
def verify_keys(cls):
|
||||
if not cls.LASTFM_API_KEY:
|
||||
print("ERROR: LASTFM_API_KEY not set in environment")
|
||||
sys.exit(0)
|
||||
# if not cls.LASTFM_API_KEY:
|
||||
# print("ERROR: LASTFM_API_KEY not set in environment")
|
||||
# sys.exit(0)
|
||||
pass
|
||||
|
||||
@classmethod
|
||||
def get(cls, key: str):
|
||||
|
||||
Reference in New Issue
Block a user