API returns versionstring

This commit is contained in:
Krateng 2019-12-10 16:07:23 +01:00
parent 661473b482
commit 2ef5e88299
3 changed files with 8 additions and 3 deletions

View File

@ -1,5 +1,9 @@
# Maloja
[![](https://img.shields.io/pypi/v/malojaserver?style=for-the-badge)
![](https://img.shields.io/pypi/dm/malojaserver?style=for-the-badge)](https://pypi.org/project/malojaserver/)
[![](https://img.shields.io/pypi/l/malojaserver?style=for-the-badge)](https://github.com/krateng/maloja/blob/master/LICENSE)
Simple self-hosted music scrobble database to create personal listening statistics. No recommendations, no social network, no nonsense.
You can check [my own Maloja page](https://maloja.krateng.ch) to see what it looks like.

View File

@ -7,7 +7,7 @@ author = {
"email":"maloja@krateng.dev",
"github": "krateng"
}
version = 2,0,6
version = 2,0,7
versionstr = ".".join(str(n) for n in version)

View File

@ -253,7 +253,8 @@ def server_info():
return {
"name":settings.get_settings("NAME"),
"version":version
"version":version,
"versionstring":".".join(str(n) for n in version)
}
## All database functions are separated - the external wrapper only reads the request keys, converts them into lists and renames them where necessary, and puts the end result in a dict if not already so it can be returned as json
@ -280,7 +281,7 @@ def info_external(**keys):
response.set_header("Access-Control-Allow-Origin","*")
response.set_header("Content-Type","application/json")
result = info()
return result