mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-03 20:13:02 +00:00
fix client: download fallback to github release client
+ add fallback release version data to version.txt + move classproperty class to utils + update Dockerfile to install from source using pip install + move version info to Metadata class in settings.py
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
from dataclasses import asdict
|
||||
from importlib import metadata
|
||||
from typing import Any
|
||||
from flask_openapi3 import Tag
|
||||
from flask_openapi3 import APIBlueprint
|
||||
@@ -9,6 +8,7 @@ from swingmusic.api.auth import admin_required
|
||||
from swingmusic.db.userdata import PluginTable
|
||||
from swingmusic.lib.index import index_everything
|
||||
from swingmusic.config import UserConfig
|
||||
from swingmusic.settings import Metadata
|
||||
from swingmusic.utils.auth import get_current_userid
|
||||
|
||||
bp_tag = Tag(name="Settings", description="Customize stuff")
|
||||
@@ -102,7 +102,11 @@ def get_all_settings():
|
||||
config[key] = sorted(list(value))
|
||||
|
||||
config["plugins"] = [p for p in PluginTable.get_all()]
|
||||
config["version"] = metadata.version("swingmusic")
|
||||
config["version"] = Metadata.version
|
||||
|
||||
if config["version"] == "0.0.0":
|
||||
# fallback to version.txt (useful for docker builds)
|
||||
config["version"] = open("version.txt", "r").read().strip()
|
||||
|
||||
# only return lastfmSessionKey for the current user
|
||||
current_user = get_current_userid()
|
||||
|
||||
Reference in New Issue
Block a user